Class FlushOperation
java.lang.Object
org.hibernate.action.queue.spi.plan.FlushOperation
- All Implemented Interfaces:
OperationResultChecker
@Incubating(since="8.0",
group="action-queue")
public class FlushOperation
extends Object
implements OperationResultChecker
Represents a single SQL operation to be executed.
Uses standard MutationOperation from the SQL model package.
- Since:
- 8.0
-
Constructor Summary
ConstructorsConstructorDescriptionFlushOperation(TableDescriptor tableDescriptor, MutationKind kind, MutationOperation jdbcOperation, BindPlan bindPlan, int ordinal, String origin) FlushOperation(TableDescriptor tableDescriptor, MutationKind kind, MutationOperation jdbcOperation, BindPlan bindPlan, int ordinal, String origin, boolean needsIdPrePhase) FlushOperation(TableDescriptor tableDescriptor, MutationKind kind, MutationOperation jdbcOperation, BindPlan bindPlan, int ordinal, String origin, StatementShapeKey shapeKey) FlushOperation(TableDescriptor tableDescriptor, MutationKind kind, MutationOperation jdbcOperation, BindPlan bindPlan, int ordinal, String origin, StatementShapeKey shapeKey, boolean needsIdPrePhase) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIntendedFkValue(String column, Object value) voidaddIntendedUniqueValue(String column, Object value) booleancheckResult(int affectedRowCount, PreparedStatement statement, int batchPosition, String sqlString, SessionFactoryImplementor sessionFactory) Check the result of a JDBC operationorg.hibernate.action.queue.internal.cyclebreak.BindingPatchorg.hibernate.action.queue.internal.decompose.collection.CollectionMutationCompletionAn operation whose execution and result checking must precede this operation.getKind()intbooleanhasIntendedFkValue(String column) booleanbooleanhasIntendedUniqueValue(String column) booleanbooleanbooleanbooleanvoidsetBindingPatch(org.hibernate.action.queue.internal.cyclebreak.BindingPatch bindingPatch) voidsetCachedInsertValuesAnalysis(ValuesAnalysis cachedInsertValuesAnalysis) voidsetCachedTableInclusionChecker(Object cachedTableInclusionChecker) voidsetCollectionMutationCompletion(org.hibernate.action.queue.internal.decompose.collection.CollectionMutationCompletion collectionMutationCompletion) voidsetCollectionMutationFixupReserved(boolean collectionMutationFixupReserved) voidsetExecutionMonitor(OperationExecutionMonitor executionMonitor) voidsetExecutionPrerequisite(FlushOperation executionPrerequisite) voidsetExecutionSkipped(boolean executionSkipped) voidsetOrdinal(int ordinal) voidvoidsetPostExecutionCallback(PostExecutionCallback postExecutionCallback) voidsetPreExecutionCallback(PreExecutionCallback preExecutionCallback) Removes and returns the callback currently attached to this operation.
-
Constructor Details
-
FlushOperation
public FlushOperation(TableDescriptor tableDescriptor, MutationKind kind, MutationOperation jdbcOperation, BindPlan bindPlan, int ordinal, String origin) -
FlushOperation
public FlushOperation(TableDescriptor tableDescriptor, MutationKind kind, MutationOperation jdbcOperation, BindPlan bindPlan, int ordinal, String origin, boolean needsIdPrePhase) -
FlushOperation
public FlushOperation(TableDescriptor tableDescriptor, MutationKind kind, MutationOperation jdbcOperation, BindPlan bindPlan, int ordinal, String origin, StatementShapeKey shapeKey) -
FlushOperation
public FlushOperation(TableDescriptor tableDescriptor, MutationKind kind, MutationOperation jdbcOperation, BindPlan bindPlan, int ordinal, String origin, StatementShapeKey shapeKey, boolean needsIdPrePhase)
-
-
Method Details
-
getMutatingTableDescriptor
-
getTableExpression
-
getKind
-
getShapeKey
-
getJdbcOperation
-
getBindPlan
-
getOperationResultChecker
-
checkResult
public boolean checkResult(int affectedRowCount, PreparedStatement statement, int batchPosition, String sqlString, SessionFactoryImplementor sessionFactory) throws SQLException Description copied from interface:OperationResultCheckerCheck the result of a JDBC operation- Specified by:
checkResultin interfaceOperationResultChecker- Parameters:
affectedRowCount- The number of rows affected by the operation, as reported by the JDBC driverstatement- The executed statement, including any registered OUT parametersbatchPosition- The execution's position within the active batch, if one; if not batching, -1 will be passed- Returns:
trueindicates an execution that is considered successful;falseindicates unsuccessful- Throws:
SQLException
-
getBindingPatch
public org.hibernate.action.queue.internal.cyclebreak.BindingPatch getBindingPatch() -
getIntendedFkValues
-
getIntendedUniqueValues
-
hasIntendedFkValues
public boolean hasIntendedFkValues() -
hasIntendedUniqueValues
public boolean hasIntendedUniqueValues() -
hasIntendedFkValue
-
hasIntendedUniqueValue
-
addIntendedFkValue
-
addIntendedUniqueValue
-
getCachedInsertValuesAnalysis
-
getCachedTableInclusionChecker
-
getOrdinal
public int getOrdinal() -
getOrigin
-
needsIdPrePhase
public boolean needsIdPrePhase() -
setBindingPatch
public void setBindingPatch(org.hibernate.action.queue.internal.cyclebreak.BindingPatch bindingPatch) -
setCachedInsertValuesAnalysis
-
setCachedTableInclusionChecker
-
setOrdinal
public void setOrdinal(int ordinal) -
setOrigin
-
getPostExecutionCallback
-
getPreExecutionCallback
-
getExecutionPrerequisite
An operation whose execution and result checking must precede this operation. -
setExecutionPrerequisite
-
getExecutionMonitor
-
setExecutionMonitor
-
getCollectionMutationCompletion
public org.hibernate.action.queue.internal.decompose.collection.CollectionMutationCompletion getCollectionMutationCompletion() -
getCollectionMutationId
-
setCollectionMutationCompletion
public void setCollectionMutationCompletion(org.hibernate.action.queue.internal.decompose.collection.CollectionMutationCompletion collectionMutationCompletion) -
isCollectionMutationFixupReserved
public boolean isCollectionMutationFixupReserved() -
setCollectionMutationFixupReserved
public void setCollectionMutationFixupReserved(boolean collectionMutationFixupReserved) -
setPreExecutionCallback
-
isExecutionSkipped
public boolean isExecutionSkipped() -
setExecutionSkipped
public void setExecutionSkipped(boolean executionSkipped) -
setPostExecutionCallback
-
takePostExecutionCallback
Removes and returns the callback currently attached to this operation.
-