Top Description Fields Constructors Methods
org.hibernate.metamodel.mapping.internal

public Class GeneratedValuesProcessor

extends Object
Class Inheritance
Annotations
@Incubating
Imports
java.util.ArrayList, .List, org.hibernate.Incubating, .LockOptions, org.hibernate.engine.spi.LoadQueryInfluencers, .SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.generator.EventType, .Generator, .OnExecutionGenerator, org.hibernate.loader.ast.internal.LoaderSelectBuilder, .NoCallbackExecutionContext, org.hibernate.metamodel.mapping.AttributeMapping, .EntityMappingType, org.hibernate.query.spi.QueryOptions, org.hibernate.sql.ast.tree.select.SelectStatement, org.hibernate.sql.exec.internal.JdbcParameterBindingsImpl, org.hibernate.sql.exec.spi.JdbcOperationQuerySelect, .JdbcParameterBindings, .JdbcParametersList

Responsible for retrieving database-generated attribute values after an insert or update statement is executed.

Note that this class has responsibility for regular attributes of the entity. The primary key / id attribute is handled separately, being the responsibility of an instance of org.hibernate.id.insert.InsertGeneratedIdentifierDelegate.

Author
Steve Ebersole
See Also
OnExecutionGenerator

Field Summary

Modifier and TypeField and Description
private final EntityMappingType
private final List<AttributeMapping>
private final JdbcParametersList
private final JdbcOperationQuerySelect
private final SelectStatement
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Constructor Summary

AccessConstructor and Description
public
GeneratedValuesProcessor(EntityMappingType entityDescriptor, EventType timing, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
private List<Object[]>
public EntityMappingType
private static List<AttributeMapping>

Returns:

a list of AttributeMappings.
getGeneratedAttributes
(EntityMappingType entityDescriptor, EventType timing)

Find attributes generated by an OnExecutionGenerator.

public List<AttributeMapping>
private JdbcParameterBindings
public JdbcParametersList
public SelectStatement
public SessionFactoryImplementor
getSessionFactory()

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private boolean
public void
processGeneratedValues(Object entity, Object id, Object[] state, SharedSessionContractImplementor session)

Obtain the generated values, and populate the snapshot and the fields of the entity instance.

private void
setEntityAttributes(Object entity, Object[] state, Object[] selectionResults)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

entityDescriptorback to summary
private final EntityMappingType entityDescriptor
generatedValuesToSelectback to summary
private final List<AttributeMapping> generatedValuesToSelect
jdbcParametersback to summary
private final JdbcParametersList jdbcParameters
jdbcSelectback to summary
private final JdbcOperationQuerySelect jdbcSelect
selectStatementback to summary
private final SelectStatement selectStatement
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Constructor Detail

GeneratedValuesProcessorback to summary
public GeneratedValuesProcessor(EntityMappingType entityDescriptor, EventType timing, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

executeSelectback to summary
private List<Object[]> executeSelect(Object id, SharedSessionContractImplementor session)
getEntityDescriptorback to summary
public EntityMappingType getEntityDescriptor()
getGeneratedAttributesback to summary
private static List<AttributeMapping> getGeneratedAttributes(EntityMappingType entityDescriptor, EventType timing)

Find attributes generated by an OnExecutionGenerator.

Returns:List<AttributeMapping>

a list of AttributeMappings.

getGeneratedValuesToSelectback to summary
public List<AttributeMapping> getGeneratedValuesToSelect()
getJdbcParameterBindingsback to summary
private JdbcParameterBindings getJdbcParameterBindings(Object id, SharedSessionContractImplementor session)
getJdbcParametersback to summary
public JdbcParametersList getJdbcParameters()
getSelectStatementback to summary
public SelectStatement getSelectStatement()
getSessionFactoryback to summary
public SessionFactoryImplementor getSessionFactory()

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

hasActualGeneratedValuesToSelectback to summary
private boolean hasActualGeneratedValuesToSelect(SharedSessionContractImplementor session, Object entity)
processGeneratedValuesback to summary
public void processGeneratedValues(Object entity, Object id, Object[] state, SharedSessionContractImplementor session)

Obtain the generated values, and populate the snapshot and the fields of the entity instance.

setEntityAttributesback to summary
private void setEntityAttributes(Object entity, Object[] state, Object[] selectionResults)