- All Superinterfaces:
Scope
A context object that is used to pass arguments to the various methods of
TransactionProvider
.
This type is a Scope
with independent lifecycle and its own
Scope.data()
map.
- 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 Object
result()
The result of aTransactionalCallable
orContextTransactionalCallable
, if the transaction has completed successfully.@NotNull TransactionContext
Set the result of theTransactionalCallable
orContextTransactionalCallable
.@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.Methods inherited from interface org.jooq.Scope
configuration, creationTime, data, data, data, dialect, dsl, family, settings
-
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. -
result
The result of aTransactionalCallable
orContextTransactionalCallable
, if the transaction has completed successfully.- Returns:
- The result. May be
null
if the transaction hasn't completed yet, or if there was no result (e.g. in aTransactionalRunnable
orContextTransactionalRunnable
), or if the result isnull
.
-
result
Set the result of theTransactionalCallable
orContextTransactionalCallable
. -
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.
-