Class UpdateCoordinatorStandard
java.lang.Object
org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard
- All Implemented Interfaces:
MutationCoordinator
,UpdateCoordinator
- Direct Known Subclasses:
MergeCoordinator
public class UpdateCoordinatorStandard
extends AbstractMutationCoordinator
implements UpdateCoordinator
Coordinates the updating of an entity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interface
protected static interface
protected class
Contains the aggregated analysis of the update values to determine what SQL UPDATE statement(s) should be used to update the entity and to drive parameter binding -
Field Summary
Fields inherited from class org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
dialect, entityPersister, factory, mutationExecutorService
-
Constructor Summary
ConstructorsModifierConstructorDescriptionUpdateCoordinatorStandard
(EntityPersister entityPersister, SessionFactoryImplementor factory) protected
UpdateCoordinatorStandard
(EntityPersister entityPersister, SessionFactoryImplementor factory, MutationOperationGroup staticUpdateGroup, BatchKey batchKey, MutationOperationGroup versionUpdateGroup, BatchKey versionUpdateBatchkey) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
decomposeForUpdate
(Object id, Object rowId, Object[] values, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, MutationExecutor mutationExecutor, MutationOperationGroup jdbcOperationGroup, UpdateCoordinatorStandard.DirtinessChecker dirtinessChecker, SharedSessionContractImplementor session) protected static int[]
dirtyAttributeIndexes
(int[] incomingDirtyIndexes, int[] preUpdateGeneratedIndexes) protected GeneratedValues
doDynamicUpdate
(Object entity, Object id, Object rowId, Object[] values, Object[] oldValues, UpdateCoordinatorStandard.InclusionChecker dirtinessChecker, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session) protected GeneratedValues
doStaticUpdate
(Object entity, Object id, Object rowId, Object[] values, Object[] oldValues, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session) protected GeneratedValues
doVersionUpdate
(Object entity, Object id, Object version, Object oldVersion, boolean batching, SharedSessionContractImplementor session) protected GeneratedValues
doVersionUpdate
(Object entity, Object id, Object version, Object oldVersion, SharedSessionContractImplementor session) void
forceVersionIncrement
(Object id, Object currentVersion, Object nextVersion, boolean batching, SharedSessionContractImplementor session) void
forceVersionIncrement
(Object id, Object currentVersion, Object nextVersion, SharedSessionContractImplementor session) protected MutationOperationGroup
generateDynamicUpdateGroup
(Object entity, Object id, Object rowId, Object[] oldValues, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session) protected BatchKey
protected boolean[]
getPropertiesToUpdate
(int[] dirtyProperties, boolean hasDirtyCollection) Transform the array of property indexes to an array of booleans for each attribute, true when the property is dirtyboolean[]
getPropertyUpdateability
(Object entity) Which properties appear in the SQL update? (Initialized, updateable ones!)The operation group used to perform the mutation unless some form of dynamic mutation is necessary.protected BatchKey
protected MutationOperationGroup
protected Supplier<GeneratedValues>
handlePotentialImplicitForcedVersionIncrement
(Object entity, Object id, Object[] values, Object oldVersion, int[] incomingDirtyAttributeIndexes, SharedSessionContractImplementor session, EntityVersionMapping versionMapping) boolean
hasLazyDirtyFields
(EntityPersister persister, int[] dirtyFields) final boolean
isModifiableEntity
(EntityEntry entry) protected <O extends MutationOperation>
AbstractTableUpdateBuilder<O>newTableUpdateBuilder
(EntityTableMapping tableMapping) protected GeneratedValues
performUpdate
(Object entity, Object id, Object rowId, Object[] values, Object oldVersion, Object[] incomingOldValues, boolean hasDirtyCollection, SharedSessionContractImplementor session, EntityVersionMapping versionMapping, int[] dirtyAttributeIndexes, boolean[] attributeUpdateability, boolean forceDynamicUpdate) physicalTableMappingForMutation
(EntityPersister persister, SelectableMapping selectableMapping) protected BatchKeyAccess
resolveUpdateVersionBatchKeyAccess
(boolean dynamicUpdate, SharedSessionContractImplementor session) toString()
update
(Object entity, Object id, Object rowId, Object[] values, Object oldVersion, Object[] incomingOldValues, int[] incomingDirtyAttributeIndexes, boolean hasDirtyCollection, SharedSessionContractImplementor session) Update a persistent instance.Methods inherited from class org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
applyKeyRestriction, bindPartitionColumnValueBindings, breakDownKeyJdbcValues, createOperation, createOperationGroup, dialect, entityPersister, factory, handleValueGeneration, needsRowId, resolveBatchKeyAccess
-
Constructor Details
-
UpdateCoordinatorStandard
public UpdateCoordinatorStandard(EntityPersister entityPersister, SessionFactoryImplementor factory) -
UpdateCoordinatorStandard
protected UpdateCoordinatorStandard(EntityPersister entityPersister, SessionFactoryImplementor factory, MutationOperationGroup staticUpdateGroup, BatchKey batchKey, MutationOperationGroup versionUpdateGroup, BatchKey versionUpdateBatchkey)
-
-
Method Details
-
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
-
getVersionUpdateGroup
-
getBatchKey
- Specified by:
getBatchKey
in classAbstractMutationCoordinator
-
isModifiableEntity
-
dirtyAttributeIndexes
protected static int[] dirtyAttributeIndexes(int[] incomingDirtyIndexes, int[] preUpdateGeneratedIndexes) -
getPropertyUpdateability
Which properties appear in the SQL update? (Initialized, updateable ones!) -
getPropertiesToUpdate
protected boolean[] getPropertiesToUpdate(int[] dirtyProperties, boolean hasDirtyCollection) Transform the array of property indexes to an array of booleans for each attribute, true when the property is dirty -
getVersionUpdateBatchkey
-
newTableUpdateBuilder
protected <O extends MutationOperation> AbstractTableUpdateBuilder<O> newTableUpdateBuilder(EntityTableMapping tableMapping) -
hasLazyDirtyFields
-
physicalTableMappingForMutation
public EntityTableMapping physicalTableMappingForMutation(EntityPersister persister, SelectableMapping selectableMapping) -
toString
-