Enum HibernateOrmConfigPersistenceUnit.IdOptimizerType
- java.lang.Object
-
- java.lang.Enum<HibernateOrmConfigPersistenceUnit.IdOptimizerType>
-
- io.quarkus.hibernate.orm.deployment.HibernateOrmConfigPersistenceUnit.IdOptimizerType
-
- All Implemented Interfaces:
Serializable,Comparable<HibernateOrmConfigPersistenceUnit.IdOptimizerType>
- Enclosing class:
- HibernateOrmConfigPersistenceUnit
public static enum HibernateOrmConfigPersistenceUnit.IdOptimizerType extends Enum<HibernateOrmConfigPersistenceUnit.IdOptimizerType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NONENo optimizer, resulting in a database call each and every time an identifier value is needed from the generator.POOLEDAssumes the value retrieved from the table/sequence is the higher end of the pool.POOLED_LOAssumes the value retrieved from the table/sequence is the lower end of the pool.
-
Field Summary
Fields Modifier and Type Field Description StringconfigName
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HibernateOrmConfigPersistenceUnit.IdOptimizerTypevalueOf(String name)Returns the enum constant of this type with the specified name.static HibernateOrmConfigPersistenceUnit.IdOptimizerType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
POOLED_LO
public static final HibernateOrmConfigPersistenceUnit.IdOptimizerType POOLED_LO
Assumes the value retrieved from the table/sequence is the lower end of the pool. Upon retrieving value `N`, the new pool of identifiers will go from `N` to `N +- 1`, inclusive. `pooled`:: Assumes the value retrieved from the table/sequence is the higher end of the pool. + Upon retrieving value `N`, the new pool of identifiers will go from `N - ` to `N + - 1`, inclusive. + The first value, `1`, is handled differently to avoid negative identifiers. + Use this to get the legacy behavior of Quarkus 2 / Hibernate ORM 5 or older. `none`:: No optimizer, resulting in a database call each and every time an identifier value is needed from the generator. + Not recommended in production environments: may result in degraded performance and/or frequent gaps in identifier values.
-
POOLED
public static final HibernateOrmConfigPersistenceUnit.IdOptimizerType POOLED
Assumes the value retrieved from the table/sequence is the higher end of the pool. Upon retrieving value `N`, the new pool of identifiers will go from `N -` to `N + - 1`, inclusive. The first value, `1`, is handled differently to avoid negative identifiers. Use this to get the legacy behavior of Quarkus 2 / Hibernate ORM 5 or older.
-
NONE
public static final HibernateOrmConfigPersistenceUnit.IdOptimizerType NONE
No optimizer, resulting in a database call each and every time an identifier value is needed from the generator. Not recommended in production environments: may result in degraded performance and/or frequent gaps in identifier values.
-
-
Field Detail
-
configName
public final String configName
-
-
Method Detail
-
values
public static HibernateOrmConfigPersistenceUnit.IdOptimizerType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HibernateOrmConfigPersistenceUnit.IdOptimizerType c : HibernateOrmConfigPersistenceUnit.IdOptimizerType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HibernateOrmConfigPersistenceUnit.IdOptimizerType 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 nameNullPointerException- if the argument is null
-
-