Class AbstractTransaction
java.lang.Object
org.tentackle.dbms.AbstractTransaction
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DbTransaction, RemoteTransaction
Base class for a transaction.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractTransaction(long txVoucher, String txName, long txNumber, int txLevel) Creates a transaction object. -
Method Summary
Modifier and TypeMethodDescriptionvoidDecrements the transaction level.Gets the session.intGets the transaction nesting level.Gets the transaction name.longGets the transaction number.longGets the transaction voucher.voidincrementTxLevel(String txName) Increments the transaction level.voidMarks the txLevel invalid.booleanReturns whether the txLevel is valid.voidsetSession(Db session) Sets the session.toString()
-
Constructor Details
-
AbstractTransaction
Creates a transaction object.- Parameters:
txVoucher- the transaction vouchertxName- the transaction name, null if default unnamedtxNumber- the transaction numbertxLevel- the initial nesting level (usually 1)
-
-
Method Details
-
getSession
-
setSession
-
getTxVoucher
public long getTxVoucher()Gets the transaction voucher.- Returns:
- the transaction voucher
-
getTxName
-
getTxNumber
public long getTxNumber()Gets the transaction number.- Returns:
- the transaction number
-
getTxLevel
public int getTxLevel()Gets the transaction nesting level.- Returns:
- the nesting level
-
incrementTxLevel
Increments the transaction level. -
decrementTxLevel
public void decrementTxLevel()Decrements the transaction level. -
invalidateTxLevel
public void invalidateTxLevel()Marks the txLevel invalid.Will suppress any checks and warnings.
-
isTxLevelValid
public boolean isTxLevelValid()Returns whether the txLevel is valid.- Returns:
- true if valid
-
toString
-