Module org.jooq
Package org.jooq

Interface TransactionContext

All Superinterfaces:
Scope

public interface TransactionContext extends Scope
A context object that is used to pass arguments to the various methods of TransactionProvider.
Author:
Lukas Eder
  • Method Details

    • transaction

      @Nullable @Nullable Transaction transaction()
      A user-defined transaction object, possibly obtained from TransactionProvider.begin(TransactionContext).
      Returns:
      The transaction object. May be null.
    • transaction

      @NotNull @NotNull TransactionContext transaction(Transaction transaction)
      Set the user-defined transaction object to the current transaction context.
    • cause

      @Nullable @Nullable Exception cause()
      The exception that has caused the rollback.
      Returns:
      The exception. May be null, in particular if the cause is a Throwable, in case of which causeThrowable() should be called.
    • causeThrowable

      @Nullable @Nullable Throwable causeThrowable()
      The throwable that has caused the rollback.
      Returns:
      The throwable. May be null.
    • cause

      @NotNull @NotNull TransactionContext cause(Exception cause)
      Set the exception that has caused the rollback to the current transaction context.
    • causeThrowable

      @NotNull @NotNull TransactionContext causeThrowable(Throwable cause)
      Set the throwable that has caused the rollback to the current transaction context.