Package org.hibernate.id
Class IdentifierGeneratorHelper
java.lang.Object
org.hibernate.id.IdentifierGeneratorHelper
Factory and helper methods for
IdentifierGenerator framework.- Author:
- Gavin King, Steve Ebersole
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SerializableDeprecated, for removal: This API element is subject to removal in a future version.static final SerializableDeprecated, for removal: This API element is subject to removal in a future version.This is not an elegant way to do anything -
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimalstatic BigIntegerstatic longextractLong(IntegralDataTypeHolder holder) static ObjectgetGeneratedIdentity(String path, ResultSet resultSet, PostInsertIdentityPersister persister, WrapperOptions wrapperOptions) Deprecated, for removal: This API element is subject to removal in a future version.static IntegralDataTypeHoldergetIntegralDataTypeHolder(Class<?> integralType)
-
Field Details
-
SHORT_CIRCUIT_INDICATOR
Deprecated, for removal: This API element is subject to removal in a future version.This is not an elegant way to do anythingMarker object returned fromIdentifierGenerator.generate(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)to indicate that we should short-circuit any continued generated id checking. Currently, this is only used in the case of the foreign generator as a way to signal that we should use the associated entity's id value. -
POST_INSERT_INDICATOR
Deprecated, for removal: This API element is subject to removal in a future version.Use aOnExecutionGeneratorMarker object returned fromIdentifierGenerator.generate(org.hibernate.engine.spi.SharedSessionContractImplementor, java.lang.Object)to indicate that the entity's identifier will be generated as part of the database insertion.
-
-
Method Details
-
getGeneratedIdentity
@Deprecated(since="6.5", forRemoval=true) public static Object getGeneratedIdentity(String path, ResultSet resultSet, PostInsertIdentityPersister persister, WrapperOptions wrapperOptions) throws SQLException Deprecated, for removal: This API element is subject to removal in a future version.Get the generated identifier when using identity columns- Parameters:
path- TheNavigableRole.getFullPath()resultSet- The result set from which to extract the generated identitywrapperOptions- The session- Returns:
- The generated identity value
- Throws:
SQLException- Can be thrown while accessing the result setHibernateException- Indicates a problem reading back a generated identity value.
-
getIntegralDataTypeHolder
-
extractLong
-
extractBigInteger
-
extractBigDecimal
-
OnExecutionGenerator