Class GeneratedValuesProcessor
java.lang.Object
org.hibernate.metamodel.mapping.internal.GeneratedValuesProcessor
Responsible for retrieving database-generated
attribute values after an
insert
or update
statement is executed.
The values might have been retrieved early by an instance of GeneratedValuesMutationDelegate
,
which case the generatedValues
parameter of processGeneratedValues(java.lang.Object, java.lang.Object, java.lang.Object[], org.hibernate.generator.values.GeneratedValues, org.hibernate.engine.spi.SharedSessionContractImplementor)
will already contain the values we need and this processor handles only the
setting of entity attributes
.
Note that the primary key / id attribute is always handled by the delegate.
- See Also:
-
Constructor Summary
ConstructorDescriptionGeneratedValuesProcessor
(EntityPersister entityDescriptor, List<AttributeMapping> generatedAttributes, EventType timing, SessionFactoryImplementor sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionstatic List<AttributeMapping>
getGeneratedAttributes
(EntityMappingType entityDescriptor, EventType timing) Find attributes generated by anOnExecutionGenerator
.void
processGeneratedValues
(Object entity, Object id, Object[] state, GeneratedValues generatedValues, SharedSessionContractImplementor session) Obtain the generated values, and populate the snapshot and the fields of the entity instance.
-
Constructor Details
-
GeneratedValuesProcessor
public GeneratedValuesProcessor(EntityPersister entityDescriptor, List<AttributeMapping> generatedAttributes, EventType timing, SessionFactoryImplementor sessionFactory)
-
-
Method Details
-
getGeneratedAttributes
public static List<AttributeMapping> getGeneratedAttributes(EntityMappingType entityDescriptor, EventType timing) Find attributes generated by anOnExecutionGenerator
.- Returns:
- a list of
AttributeMapping
s.
-
getSelectStatement
-
getGeneratedValuesToSelect
-
getJdbcParameters
-
getEntityDescriptor
-
getJdbcSelect
-