Class InsertCoordinatorStandard
- java.lang.Object
-
- org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
-
- org.hibernate.persister.entity.mutation.InsertCoordinatorStandard
-
- All Implemented Interfaces:
InsertCoordinator
,MutationCoordinator
@Internal public class InsertCoordinatorStandard extends AbstractMutationCoordinator implements InsertCoordinator
Coordinates the insertion of an entity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InsertCoordinatorStandard.InsertValuesAnalysis
-
Field Summary
-
Fields inherited from class org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
dialect, entityPersister, factory, mutationExecutorService
-
-
Constructor Summary
Constructors Constructor Description InsertCoordinatorStandard(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory)
-
Method Summary
-
Methods inherited from class org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
applyKeyRestriction, bindPartitionColumnValueBindings, breakDownKeyJdbcValues, createOperationGroup, dialect, entityPersister, factory, handleValueGeneration, needsRowId, resolveBatchKeyAccess
-
-
-
-
Constructor Detail
-
InsertCoordinatorStandard
public InsertCoordinatorStandard(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory)
-
-
Method Detail
-
getStaticMutationOperationGroup
public MutationOperationGroup getStaticMutationOperationGroup()
Description copied from interface:MutationCoordinator
The operation group used to perform the mutation unless some form of dynamic mutation is necessary.- Specified by:
getStaticMutationOperationGroup
in interfaceMutationCoordinator
-
getBatchKey
protected BatchKey getBatchKey()
- Specified by:
getBatchKey
in classAbstractMutationCoordinator
-
insert
public @Nullable GeneratedValues insert(Object entity, Object[] values, SharedSessionContractImplementor session)
Description copied from interface:InsertCoordinator
Persist an entity instance with a generated identifier.- Specified by:
insert
in interfaceInsertCoordinator
- Returns:
- The generated values if any,
null
otherwise.
-
insert
public @Nullable GeneratedValues insert(Object entity, Object id, Object[] values, SharedSessionContractImplementor session)
Description copied from interface:InsertCoordinator
Persist an entity instance using the provided identifier.- Specified by:
insert
in interfaceInsertCoordinator
- Returns:
- The generated values if any,
null
otherwise.
-
coordinateInsert
public GeneratedValues 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 generated values if any,
null
otherwise.
-
preInsertInMemoryValueGeneration
protected boolean preInsertInMemoryValueGeneration(Object[] values, Object entity, SharedSessionContractImplementor session)
-
doStaticInserts
protected GeneratedValues 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 GeneratedValues doDynamicInserts(Object id, Object[] values, Object object, SharedSessionContractImplementor session, boolean forceIdentifierBinding)
-
getTableInclusionChecker
protected static TableInclusionChecker getTableInclusionChecker(InsertCoordinatorStandard.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, Object object, SharedSessionContractImplementor session, boolean forceIdentifierBinding)
-
generateStaticOperationGroup
public MutationOperationGroup generateStaticOperationGroup()
-
getInsertBatchKey
@Deprecated public BasicBatchKey getInsertBatchKey()
Deprecated.UsegetBatchKey()
-
-