Package com.storedobject.core
Class AbstractTransaction
java.lang.Object
com.storedobject.core.AbstractTransaction
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.core.Transaction
Transaction.CommitListener
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommitListener
(Transaction.CommitListener listener) Add a commit listener for this transaction.final Exception
getError()
Gets the current error in Transaction.final Id
getId()
Gets the Id of this transaction.final TransactionManager
Gets the TransactionManager associated with this Transaction.final int
hashCode()
void
Log something.void
Remove a commit listener for this transaction.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.storedobject.core.Transaction
commit, get, get, get, getSession, getUserId, isActive, isInvolved, isInvolved, logStackTrace, logStackTrace, rollback
-
Method Details
-
addCommitListener
Description copied from interface:Transaction
Add a commit listener for this transaction.- Specified by:
addCommitListener
in interfaceTransaction
- Parameters:
listener
- Listener
-
removeCommitListener
Description copied from interface:Transaction
Remove a commit listener for this transaction.- Specified by:
removeCommitListener
in interfaceTransaction
- Parameters:
listener
- Listener
-
getError
Gets the current error in Transaction. A transaction that was closed normally (committed) does not return any error.- Specified by:
getError
in interfaceTransaction
- Returns:
- Error if any, otherwise null.
-
getId
Gets the Id of this transaction.- Specified by:
getId
in interfaceTransaction
- Returns:
- Id
-
hashCode
-
getManager
Gets the TransactionManager associated with this Transaction.- Specified by:
getManager
in interfaceTransaction
- Returns:
- TransactionManager
-
toString
-
log
Log something.- Specified by:
log
in interfaceTransaction
- Parameters:
anything
- Anything, including exceptions, to be logged.
-