Class UpdateCoordinatorStandard
- java.lang.Object
-
- org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
-
- org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard
-
- All Implemented Interfaces:
UpdateCoordinator
- Direct Known Subclasses:
MergeCoordinator
public class UpdateCoordinatorStandard extends AbstractMutationCoordinator implements UpdateCoordinator
Coordinates the updating of an entity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
UpdateCoordinatorStandard.DirtinessChecker
protected static interface
UpdateCoordinatorStandard.InclusionChecker
protected class
UpdateCoordinatorStandard.UpdateValuesAnalysisImpl
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
Constructors Modifier Constructor Description UpdateCoordinatorStandard(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory)
protected
UpdateCoordinatorStandard(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory, MutationOperationGroup staticUpdateGroup, BatchKey batchKey, MutationOperationGroup versionUpdateGroup, BatchKey versionUpdateBatchkey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
coordinateUpdate(Object entity, Object id, Object rowId, Object[] values, Object oldVersion, Object[] incomingOldValues, int[] incomingDirtyAttributeIndexes, boolean hasDirtyCollection, SharedSessionContractImplementor session)
protected 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 void
doDynamicUpdate(Object entity, Object id, Object rowId, Object[] values, Object[] oldValues, UpdateCoordinatorStandard.InclusionChecker dirtinessChecker, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session)
protected void
doStaticUpdate(Object entity, Object id, Object rowId, Object[] values, Object[] oldValues, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session)
protected void
doVersionUpdate(Object entity, Object id, Object version, Object oldVersion, boolean batching, SharedSessionContractImplementor session)
protected void
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 id, Object rowId, Object[] oldValues, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session)
protected BatchKey
getBatchKey()
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!)MutationOperationGroup
getStaticUpdateGroup()
protected BatchKey
getVersionUpdateBatchkey()
protected MutationOperationGroup
getVersionUpdateGroup()
protected boolean
handlePotentialImplicitForcedVersionIncrement(Object entity, Object id, Object[] values, Object oldVersion, int[] incomingDirtyAttributeIndexes, SharedSessionContractImplementor session, EntityVersionMapping versionMapping)
boolean
isModifiableEntity(EntityEntry entry)
protected <O extends MutationOperation>
AbstractTableUpdateBuilder<O>newTableUpdateBuilder(EntityTableMapping tableMapping)
protected void
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)
protected BatchKeyAccess
resolveUpdateVersionBatchKeyAccess(boolean dynamicUpdate, SharedSessionContractImplementor session)
String
toString()
-
Methods inherited from class org.hibernate.persister.entity.mutation.AbstractMutationCoordinator
applyKeyRestriction, bindPartitionColumnValueBindings, breakDownKeyJdbcValues, createOperationGroup, dialect, entityPersister, factory, needsRowId, resolveBatchKeyAccess
-
-
-
-
Constructor Detail
-
UpdateCoordinatorStandard
public UpdateCoordinatorStandard(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory)
-
UpdateCoordinatorStandard
protected UpdateCoordinatorStandard(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory, MutationOperationGroup staticUpdateGroup, BatchKey batchKey, MutationOperationGroup versionUpdateGroup, BatchKey versionUpdateBatchkey)
-
-
Method Detail
-
getStaticUpdateGroup
public MutationOperationGroup getStaticUpdateGroup()
- Specified by:
getStaticUpdateGroup
in interfaceUpdateCoordinator
-
getVersionUpdateGroup
protected MutationOperationGroup getVersionUpdateGroup()
-
getBatchKey
protected BatchKey getBatchKey()
- Specified by:
getBatchKey
in classAbstractMutationCoordinator
-
isModifiableEntity
public final boolean isModifiableEntity(EntityEntry entry)
-
forceVersionIncrement
public void forceVersionIncrement(Object id, Object currentVersion, Object nextVersion, SharedSessionContractImplementor session)
- Specified by:
forceVersionIncrement
in interfaceUpdateCoordinator
-
forceVersionIncrement
public void forceVersionIncrement(Object id, Object currentVersion, Object nextVersion, boolean batching, SharedSessionContractImplementor session)
- Specified by:
forceVersionIncrement
in interfaceUpdateCoordinator
-
coordinateUpdate
public void coordinateUpdate(Object entity, Object id, Object rowId, Object[] values, Object oldVersion, Object[] incomingOldValues, int[] incomingDirtyAttributeIndexes, boolean hasDirtyCollection, SharedSessionContractImplementor session)
- Specified by:
coordinateUpdate
in interfaceUpdateCoordinator
-
performUpdate
protected void 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)
-
dirtyAttributeIndexes
protected static int[] dirtyAttributeIndexes(int[] incomingDirtyIndexes, int[] preUpdateGeneratedIndexes)
-
handlePotentialImplicitForcedVersionIncrement
protected boolean handlePotentialImplicitForcedVersionIncrement(Object entity, Object id, Object[] values, Object oldVersion, int[] incomingDirtyAttributeIndexes, SharedSessionContractImplementor session, EntityVersionMapping versionMapping)
-
getPropertyUpdateability
public boolean[] getPropertyUpdateability(Object entity)
Which properties appear in the SQL update? (Initialized, updateable ones!)
-
doVersionUpdate
protected void doVersionUpdate(Object entity, Object id, Object version, Object oldVersion, SharedSessionContractImplementor session)
-
doVersionUpdate
protected void doVersionUpdate(Object entity, Object id, Object version, Object oldVersion, boolean batching, SharedSessionContractImplementor session)
-
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
-
doStaticUpdate
protected void doStaticUpdate(Object entity, Object id, Object rowId, Object[] values, Object[] oldValues, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session)
-
decomposeForUpdate
protected void decomposeForUpdate(Object id, Object rowId, Object[] values, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, MutationExecutor mutationExecutor, MutationOperationGroup jdbcOperationGroup, UpdateCoordinatorStandard.DirtinessChecker dirtinessChecker, SharedSessionContractImplementor session)
-
doDynamicUpdate
protected void doDynamicUpdate(Object entity, Object id, Object rowId, Object[] values, Object[] oldValues, UpdateCoordinatorStandard.InclusionChecker dirtinessChecker, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session)
-
resolveUpdateVersionBatchKeyAccess
protected BatchKeyAccess resolveUpdateVersionBatchKeyAccess(boolean dynamicUpdate, SharedSessionContractImplementor session)
-
getVersionUpdateBatchkey
protected BatchKey getVersionUpdateBatchkey()
-
generateDynamicUpdateGroup
protected MutationOperationGroup generateDynamicUpdateGroup(Object id, Object rowId, Object[] oldValues, UpdateCoordinatorStandard.UpdateValuesAnalysisImpl valuesAnalysis, SharedSessionContractImplementor session)
-
newTableUpdateBuilder
protected <O extends MutationOperation> AbstractTableUpdateBuilder<O> newTableUpdateBuilder(EntityTableMapping tableMapping)
-
-