Class InsertCoordinator
- java.lang.Object
-
- org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
-
- org.hibernate.persister.entity.mutation.InsertCoordinator
-
@Internal public class InsertCoordinator extends AbstractMutationCoordinator
Coordinates the insertion of an entity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
InsertCoordinator.InsertValuesAnalysis
-
Field Summary
-
Fields inherited from class org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
dialect, entityPersister, factory, mutationExecutorService
-
-
Constructor Summary
Constructors Constructor Description InsertCoordinator(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory)
-
Method Summary
-
Methods inherited from class org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
applyKeyRestriction, bindPartitionColumnValueBindings, breakDownKeyJdbcValues, createOperationGroup, dialect, entityPersister, factory, needsRowId, resolveBatchKeyAccess
-
-
-
-
Constructor Detail
-
InsertCoordinator
public InsertCoordinator(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory)
-
-
Method Detail
-
getStaticInsertGroup
public MutationOperationGroup getStaticInsertGroup()
-
getBatchKey
protected BatchKey getBatchKey()
- Specified by:
getBatchKey
in classAbstractMutationCoordinator
-
coordinateInsert
public Object coordinateInsert(Object id, Object[] values, Object entity, SharedSessionContractImplementor session)
Perform the insert(s).- Parameters:
id
- This is the id as known in memory. For post-insert id generation (IDENTITY, etc) this will be null.values
- The extracted attribute valuesentity
- The entity instance being persistedsession
- The originating context- Returns:
- The id
-
preInsertInMemoryValueGeneration
protected void preInsertInMemoryValueGeneration(Object[] values, Object entity, SharedSessionContractImplementor session)
-
doStaticInserts
protected Object doStaticInserts(Object id, Object[] values, Object object, SharedSessionContractImplementor session)
-
decomposeForInsert
protected void decomposeForInsert(MutationExecutor mutationExecutor, Object id, Object[] values, MutationOperationGroup mutationGroup, boolean[] propertyInclusions, TableInclusionChecker tableInclusionChecker, SharedSessionContractImplementor session)
-
breakDownJdbcValue
protected void breakDownJdbcValue(Object id, SharedSessionContractImplementor session, JdbcValueBindings jdbcValueBindings, EntityTableMapping tableDetails)
-
decomposeAttribute
protected void decomposeAttribute(Object value, SharedSessionContractImplementor session, JdbcValueBindings jdbcValueBindings, AttributeMapping mapping)
-
doDynamicInserts
protected Object doDynamicInserts(Object id, Object[] values, Object object, SharedSessionContractImplementor session)
-
getTableInclusionChecker
protected static TableInclusionChecker getTableInclusionChecker(InsertCoordinator.InsertValuesAnalysis insertValuesAnalysis)
-
getPropertiesToInsert
public boolean[] getPropertiesToInsert(Object[] fields)
Transform the array of property indexes to an array of booleans, true when the property is insertable and non-null
-
generateDynamicInsertSqlGroup
protected MutationOperationGroup generateDynamicInsertSqlGroup(boolean[] insertable)
-
generateStaticOperationGroup
public MutationOperationGroup generateStaticOperationGroup()
-
getInsertBatchKey
@Deprecated public BasicBatchKey getInsertBatchKey()
Deprecated.UsegetBatchKey()
-
-