Package org.hibernate.id.enhanced
Enum Class 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDescribes the optimizer for using a custom "hilo" algorithm optimization.Describes the optimizer for using a custom "hilo" algorithm optimization, following the legacy Hibernate hilo algorithm.Describes the optimizer for no optimization.Describes the optimizer for use with tables/sequences that store the chunk information.Describes the optimizer for use with tables/sequences that store the chunk information.Describes the optimizer for use with tables/sequences that store the chunk information. -
Method Summary
Modifier and TypeMethodDescriptionstatic OptimizerDescriptor
fromExternalName
(String externalName) Interpret the incoming external name into the appropriate enum valueboolean
isPooled()
static StandardOptimizerDescriptor
Returns the enum constant of this class with the specified name.static StandardOptimizerDescriptor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Describes the optimizer for no optimization. -
HILO
Describes the optimizer for using a custom "hilo" algorithm optimization. -
LEGACY_HILO
Describes the optimizer for using a custom "hilo" algorithm optimization, following the legacy Hibernate hilo algorithm. -
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
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
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
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
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 nameNullPointerException
- if the argument is null
-
getExternalName
- Specified by:
getExternalName
in interfaceOptimizerDescriptor
-
getOptimizerClass
- Specified by:
getOptimizerClass
in interfaceOptimizerDescriptor
-
isPooled
public boolean isPooled()- Specified by:
isPooled
in interfaceOptimizerDescriptor
-
fromExternalName
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
-