- 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 Exception
cause()
The exception that has caused the rollback.@NotNull TransactionContext
Set the exception that has caused the rollback to the current transaction context.@Nullable Throwable
The throwable that has caused the rollback.@NotNull TransactionContext
causeThrowable(Throwable cause)
Set the throwable that has caused the rollback to the current transaction context.@Nullable Transaction
A user-defined transaction object, possibly obtained fromTransactionProvider.begin(TransactionContext)
.@NotNull TransactionContext
transaction(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.
-