com.graphaware.tx.event.improved.api.LazyTransactionData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tx-api Show documentation
Show all versions of tx-api Show documentation
Improved Transaction API with Graph Snapshotting
The newest version!
/*
* Copyright (c) 2013-2020 GraphAware
*
* This file is part of the GraphAware Framework.
*
* GraphAware Framework is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of
* the GNU General Public License along with this program. If not, see
* .
*/
package com.graphaware.tx.event.improved.api;
import com.graphaware.tx.event.improved.data.BaseImprovedTransactionData;
import com.graphaware.tx.event.improved.data.NodeTransactionData;
import com.graphaware.tx.event.improved.data.RelationshipTransactionData;
import com.graphaware.tx.event.improved.data.TransactionDataContainer;
import com.graphaware.tx.event.improved.data.lazy.LazyNodeTransactionData;
import com.graphaware.tx.event.improved.data.lazy.LazyRelationshipTransactionData;
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.event.TransactionData;
/**
* {@link ImprovedTransactionData} delegating all work to {@link com.graphaware.tx.event.improved.data.lazy.LazyNodeTransactionData}
* and {@link com.graphaware.tx.event.improved.data.lazy.LazyRelationshipTransactionData}.
*/
public class LazyTransactionData extends BaseImprovedTransactionData implements ImprovedTransactionData, TransactionDataContainer {
private final NodeTransactionData nodeTransactionData;
private final RelationshipTransactionData relationshipTransactionData;
/**
* Create an instance from Neo4j {@link org.neo4j.graphdb.event.TransactionData}.
*
* @param transactionData data about the transaction.
*/
public LazyTransactionData(TransactionData transactionData, Transaction transaction) {
super(transactionData, transaction);
nodeTransactionData = new LazyNodeTransactionData(transactionData, this);
relationshipTransactionData = new LazyRelationshipTransactionData(transactionData, this);
}
@Override
public NodeTransactionData getNodeTransactionData() {
return nodeTransactionData;
}
@Override
public RelationshipTransactionData getRelationshipTransactionData() {
return relationshipTransactionData;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy