Package st.orm

Enum Class TransactionPropagation

All Implemented Interfaces:
Serializable, Comparable<TransactionPropagation>, Constable

public enum TransactionPropagation extends Enum<TransactionPropagation>
Defines how a transaction block relates to a transaction that is already active when the block starts.

The semantics mirror the standard transaction propagation behaviors. The default is REQUIRED.

Since:
1.13
  • Enum Constant Details

    • REQUIRED

      public static final TransactionPropagation REQUIRED
      Joins the active transaction, or starts a new one when none is active. The default.
    • SUPPORTS

      public static final TransactionPropagation SUPPORTS
      Joins the active transaction when one is active; otherwise runs without a transaction.
    • MANDATORY

      public static final TransactionPropagation MANDATORY
      Joins the active transaction; fails when none is active.
    • REQUIRES_NEW

      public static final TransactionPropagation REQUIRES_NEW
      Always starts a new, independent transaction, suspending the active one for the duration of the block.
    • NOT_SUPPORTED

      public static final TransactionPropagation NOT_SUPPORTED
      Runs without a transaction, suspending the active one for the duration of the block.
    • NEVER

      public static final TransactionPropagation NEVER
      Runs without a transaction; fails when one is active.
    • NESTED

      public static final TransactionPropagation NESTED
      Runs within a nested transaction (a savepoint) when a transaction is active; otherwise starts a new one.
  • Method Details

    • values

      public static TransactionPropagation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TransactionPropagation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null