Enum Class StandardOptimizerDescriptor

java.lang.Object
java.lang.Enum<StandardOptimizerDescriptor>
org.hibernate.id.enhanced.StandardOptimizerDescriptor
All Implemented Interfaces:
Serializable, Comparable<StandardOptimizerDescriptor>, Constable, OptimizerDescriptor

public enum StandardOptimizerDescriptor extends Enum<StandardOptimizerDescriptor> implements OptimizerDescriptor
Enumeration of the standard Hibernate id generation optimizers.
  • Enum Constant Details

    • NONE

      public static final StandardOptimizerDescriptor NONE
      Describes the optimizer for no optimization.
    • HILO

      public static final StandardOptimizerDescriptor HILO
      Describes the optimizer for using a custom "hilo" algorithm optimization.
    • LEGACY_HILO

      public static final StandardOptimizerDescriptor LEGACY_HILO
      Describes the optimizer for using a custom "hilo" algorithm optimization, following the legacy Hibernate hilo algorithm.
    • POOLED

      public static final StandardOptimizerDescriptor POOLED
      Describes the optimizer for use with tables/sequences that store the chunk information. Here, specifically the hi value is stored in the database.
    • POOLED_LO

      public static final StandardOptimizerDescriptor POOLED_LO
      Describes the optimizer for use with tables/sequences that store the chunk information. Here, specifically the lo value is stored in the database.
    • POOLED_LOTL

      public static final StandardOptimizerDescriptor POOLED_LOTL
      Describes the optimizer for use with tables/sequences that store the chunk information. Here, specifically the lo value is stored in the database and ThreadLocal used to cache the generation state.
  • Method Details

    • values

      public static StandardOptimizerDescriptor[] 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 StandardOptimizerDescriptor 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
    • getExternalName

      public String getExternalName()
      Specified by:
      getExternalName in interface OptimizerDescriptor
    • getOptimizerClass

      public Class<? extends Optimizer> getOptimizerClass()
      Specified by:
      getOptimizerClass in interface OptimizerDescriptor
    • isPooled

      public boolean isPooled()
      Specified by:
      isPooled in interface OptimizerDescriptor
    • fromExternalName

      public static OptimizerDescriptor fromExternalName(String externalName)
      Interpret the incoming external name into the appropriate enum value
      Parameters:
      externalName - The external name
      Returns:
      The corresponding enum value; if no external name is supplied, NONE is returned; if an unrecognized external name is supplied, null is returned