Package org.neo4j.ogm.transaction
Class AbstractTransaction
java.lang.Object
org.neo4j.ogm.transaction.AbstractTransaction
- All Implemented Interfaces:
AutoCloseable,Transaction
- Author:
- vince
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.neo4j.ogm.transaction.Transaction
Transaction.Status, Transaction.Type -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTransaction(TransactionManager transactionManager) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this transaction can be committedvoidclose()close this transaction.voidcommit()commit a transaction that has pending writesvoidextend(Transaction.Type otherType) Extends the current transaction.longbooleanObtains the read-only status of a transaction.voidregisterNew(Object persisted) voidrollback()rollback a transaction that has pending writesfinal Transaction.Statusstatus()return the status of the current transactiontype()Returns type of the transaction - READ_ONLY / READ_WRITE The value corresponds to type returned byTransaction.isReadOnly()
-
Field Details
-
transactionManager
-
type
-
-
Constructor Details
-
AbstractTransaction
-
-
Method Details
-
rollback
public void rollback()Description copied from interface:Transactionrollback a transaction that has pending writes- Specified by:
rollbackin interfaceTransaction
-
commit
public void commit()Description copied from interface:Transactioncommit a transaction that has pending writes- Specified by:
commitin interfaceTransaction
-
canCommit
public boolean canCommit()Description copied from interface:TransactionIf this transaction can be committed- Specified by:
canCommitin interfaceTransaction- Returns:
- true if this transaction can be committed
-
extend
Extends the current transaction.- Parameters:
otherType- type of the other transaction
-
status
Description copied from interface:Transactionreturn the status of the current transaction- Specified by:
statusin interfaceTransaction- Returns:
- the Status value associated with the current transaction
-
isReadOnly
public boolean isReadOnly()Description copied from interface:TransactionObtains the read-only status of a transaction. Transaction are read-write by default- Specified by:
isReadOnlyin interfaceTransaction- Returns:
- true if this is a read-only transaction, false otherwise
-
type
Description copied from interface:TransactionReturns type of the transaction - READ_ONLY / READ_WRITE The value corresponds to type returned byTransaction.isReadOnly()- Specified by:
typein interfaceTransaction- Returns:
- type of the transaction
-
close
public void close()Description copied from interface:Transactionclose this transaction.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTransaction
-
extensions
public long extensions() -
registerNew
-
registeredNew
-