Enum Class Deferrability

java.lang.Object
java.lang.Enum<Deferrability>
org.tentackle.model.Deferrability
All Implemented Interfaces:
Serializable, Comparable<Deferrability>, Constable

public enum Deferrability extends Enum<Deferrability>
The deferrability of a unique index or foreign key constraint.
Controlled by the deferred/deferrable/immediate keywords on an index line, or by the model defaults' deferred/deferrable/immediate option (see ModelDefaults.getDeferrability()).
Author:
harald
  • Enum Constant Details

    • NOT_DEFERRABLE

      public static final Deferrability NOT_DEFERRABLE
      The constraint is not deferrable: it is always checked immediately.
      The default if nothing is specified, and the meaning of the explicit immediate keyword.
    • DEFERRABLE_IMMEDIATE

      public static final Deferrability DEFERRABLE_IMMEDIATE
      The constraint is deferrable but checked immediately by default.
      A transaction may still defer it via @Transaction(deferred=true) / Session.setConstraintsDeferred(true). Selected by the deferrable keyword.
    • DEFERRABLE_DEFERRED

      public static final Deferrability DEFERRABLE_DEFERRED
      The constraint is deferrable and checked at the end of the transaction by default.
      Selected by the deferred keyword.
  • Method Details

    • values

      public static Deferrability[] 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 Deferrability 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