-
- All Superinterfaces:
Scope
public interface TransactionContext extends Scope
A context object that is used to pass arguments to the various methods ofTransactionProvider
.- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Exception
cause()
The exception that has caused the rollback.TransactionContext
cause(Exception cause)
Set the exception that has caused the rollback to the current transaction context.Throwable
causeThrowable()
The throwable that has caused the rollback.TransactionContext
causeThrowable(Throwable cause)
Set the throwable that has caused the rollback to the current transaction context.Transaction
transaction()
A user-defined transaction object, possibly obtained fromTransactionProvider.begin(TransactionContext)
.TransactionContext
transaction(Transaction transaction)
Set the user-defined transaction object to the current transaction context.
-
-
-
Method Detail
-
transaction
Transaction transaction()
A user-defined transaction object, possibly obtained fromTransactionProvider.begin(TransactionContext)
.- Returns:
- The transaction object. May be
null
.
-
transaction
TransactionContext transaction(Transaction transaction)
Set the user-defined transaction object to the current transaction context.
-
cause
Exception 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
Throwable causeThrowable()
The throwable that has caused the rollback.- Returns:
- The throwable. May be
null
.
-
cause
TransactionContext cause(Exception cause)
Set the exception that has caused the rollback to the current transaction context.
-
causeThrowable
TransactionContext causeThrowable(Throwable cause)
Set the throwable that has caused the rollback to the current transaction context.
-
-