Enum TxnType

java.lang.Object
java.lang.Enum<TxnType>
com.googlecode.objectify.TxnType
All Implemented Interfaces:
Serializable, Comparable<TxnType>, java.lang.constant.Constable

public enum TxnType extends Enum<TxnType>
Just like the EJB options. See http://docs.oracle.com/javaee/6/api/javax/ejb/TransactionAttributeType.html
Author:
Jeff Schnitzer invalid input: '<'[email protected]>
  • Enum Constant Details

    • MANDATORY

      public static final TxnType MANDATORY
      Require that there must already be a transaction running. If no transaction, throw an IllegalStateException.
    • NEVER

      public static final TxnType NEVER
      Require that there must NOT be a transaction running. If there is, throw an IllegalStateException.
    • NOT_SUPPORTED

      public static final TxnType NOT_SUPPORTED
      Execute the work without a transaction, pausing an existing transaction if there is one.
    • REQUIRED

      public static final TxnType REQUIRED
      Use the existing transaction (if present), or start a new transaction if not.
    • REQUIRES_NEW

      public static final TxnType REQUIRES_NEW
      Start a new transaction, pausing the old one.
    • SUPPORTS

      public static final TxnType SUPPORTS
      Inherits previous transaction state.
  • Method Details

    • values

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

      public static TxnType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null