- All Superinterfaces:
Scope
A context object that is used to pass arguments to the various methods of
TransactionProvider.- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescription@Nullable Exceptioncause()The exception that has caused the rollback.@NotNull TransactionContextSet the exception that has caused the rollback to the current transaction context.@Nullable ThrowableThe throwable that has caused the rollback.@NotNull TransactionContextcauseThrowable(Throwable cause) Set the throwable that has caused the rollback to the current transaction context.@Nullable TransactionA user-defined transaction object, possibly obtained fromTransactionProvider.begin(TransactionContext).@NotNull TransactionContexttransaction(Transaction transaction) Set the user-defined transaction object to the current transaction context.
-
Method Details
-
transaction
A user-defined transaction object, possibly obtained fromTransactionProvider.begin(TransactionContext).- Returns:
- The transaction object. May be
null.
-
transaction
Set the user-defined transaction object to the current transaction context. -
cause
The exception that has caused the rollback.- Returns:
- The exception. May be
null, in particular if the cause is aThrowable, in case of whichcauseThrowable()should be called.
-
causeThrowable
The throwable that has caused the rollback.- Returns:
- The throwable. May be
null.
-
cause
Set the exception that has caused the rollback to the current transaction context. -
causeThrowable
Set the throwable that has caused the rollback to the current transaction context.
-