Class Transaction
java.lang.Object
com.aquima.interactions.foundation.tx.Transaction
- All Implemented Interfaces:
ITransaction
,ITransactionalAction
,Serializable
This class represents a single transaction.
- Since:
- 6.5
- Author:
- O. Kerpershoek
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Transaction
(GUID id, String name, boolean mergeOnCommit) Constructs the transaction object with an optional name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ITransactionalAction transaction) This method will add the transaction to the stack.Returns a deep copy of the transaction.getId()
This method returns the unique ID of the transaction (never null).getName()
This method returns the name of the transaction, or null is none was defined.boolean
isEmpty()
This method returns a boolean indicating if this transaction stack does not contain any (sub)transactions.boolean
isSystem()
void
rollback
(IRollbackContext context) Performs a roll-back on the current (sub)transaction.int
size()
This method returns the number of actions that are present in this transaction.
-
Constructor Details
-
Method Details
-
isSystem
public boolean isSystem() -
getId
Description copied from interface:ITransaction
This method returns the unique ID of the transaction (never null).- Specified by:
getId
in interfaceITransaction
- Returns:
- The unique ID of the transaction.
-
getName
Description copied from interface:ITransaction
This method returns the name of the transaction, or null is none was defined.- Specified by:
getName
in interfaceITransaction
- Returns:
- the name of the transaction, or null is none was defined.
-
isEmpty
public boolean isEmpty()Description copied from interface:ITransaction
This method returns a boolean indicating if this transaction stack does not contain any (sub)transactions.- Specified by:
isEmpty
in interfaceITransaction
- Returns:
- a boolean indicating if this transaction stack does not contain any (sub)transactions.
-
size
public int size()Description copied from interface:ITransaction
This method returns the number of actions that are present in this transaction.- Specified by:
size
in interfaceITransaction
- Returns:
- the number of actions that are present in this transaction.
-
add
Description copied from interface:ITransaction
This method will add the transaction to the stack.- Specified by:
add
in interfaceITransaction
- Parameters:
transaction
- The transaction that should be added.
-
rollback
Description copied from interface:ITransactionalAction
Performs a roll-back on the current (sub)transaction.- Specified by:
rollback
in interfaceITransactionalAction
- Parameters:
context
- the rollback context
-
duplicate
Description copied from interface:ITransactionalAction
Returns a deep copy of the transaction.- Specified by:
duplicate
in interfaceITransactionalAction
- Returns:
- The copied action.
-
getTransactables
-