Class TableBasedInsertHandler
java.lang.Object
org.hibernate.query.sqm.mutation.internal.AbstractMutationHandler
org.hibernate.query.sqm.mutation.internal.temptable.TableBasedInsertHandler
- All Implemented Interfaces:
Handler,InsertHandler,MultiTableHandler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final record -
Constructor Summary
ConstructorsConstructorDescriptionTableBasedInsertHandler(SqmInsertStatement<?> sqmInsert, DomainParameterXref domainParameterXref, TemporaryTable entityTable, TemporaryTableStrategy temporaryTableStrategy, boolean forceDropAfterUse, Function<SharedSessionContractImplementor, String> sessionUidAccess, DomainQueryExecutionContext context, MutableObject<JdbcParameterBindings> firstJdbcParameterBindingsConsumer) -
Method Summary
Modifier and TypeMethodDescriptionCreate theJdbcParameterBindingsfor this multi-table handler based on the execution context.booleanSignals that the SQL depends on the parameter bindings e.g.intexecute(JdbcParameterBindings jdbcParameterBindings, DomainQueryExecutionContext context) Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.protected AfterUseActionprotected TemporaryTableprotected List<JdbcOperationQueryMutation> protected Function<SharedSessionContractImplementor, String> protected @Nullable JdbcParameterprotected TemporaryTableStrategybooleanisCompatibleWith(JdbcParameterBindings jdbcParameterBindings, QueryOptions queryOptions) Methods inherited from class org.hibernate.query.sqm.mutation.internal.AbstractMutationHandler
getEntityDescriptor, getSessionFactory, getSqmStatement
-
Constructor Details
-
TableBasedInsertHandler
public TableBasedInsertHandler(SqmInsertStatement<?> sqmInsert, DomainParameterXref domainParameterXref, TemporaryTable entityTable, TemporaryTableStrategy temporaryTableStrategy, boolean forceDropAfterUse, Function<SharedSessionContractImplementor, String> sessionUidAccess, DomainQueryExecutionContext context, MutableObject<JdbcParameterBindings> firstJdbcParameterBindingsConsumer)
-
-
Method Details
-
createJdbcParameterBindings
Description copied from interface:MultiTableHandlerCreate theJdbcParameterBindingsfor this multi-table handler based on the execution context.- Specified by:
createJdbcParameterBindingsin interfaceMultiTableHandler- Parameters:
context- Contextual information needed for execution- Returns:
- The built parameter bindings
-
dependsOnParameterBindings
public boolean dependsOnParameterBindings()Description copied from interface:MultiTableHandlerSignals that the SQL depends on the parameter bindings e.g. due to the need for inlining of parameter values or multiValued parameters.- Specified by:
dependsOnParameterBindingsin interfaceHandler- Specified by:
dependsOnParameterBindingsin interfaceMultiTableHandler
-
isCompatibleWith
public boolean isCompatibleWith(JdbcParameterBindings jdbcParameterBindings, QueryOptions queryOptions) - Specified by:
isCompatibleWithin interfaceHandler- Specified by:
isCompatibleWithin interfaceMultiTableHandler
-
getSqmInsertStatement
-
execute
public int execute(JdbcParameterBindings jdbcParameterBindings, DomainQueryExecutionContext context) Description copied from interface:MultiTableHandlerExecute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.- Specified by:
executein interfaceMultiTableHandler- Parameters:
jdbcParameterBindings- The parameter bindings for JDBC parameterscontext- Contextual information needed for execution- Returns:
- The "number of rows affected" count
-
getTemporaryTableInsert
protected CacheableSqmInterpretation<InsertSelectStatement,JdbcOperationQueryMutation> getTemporaryTableInsert() -
getRootTableInserter
-
getNonRootTableInserts
-
getEntityTable
-
getTemporaryTableStrategy
-
getSessionUidAccess
-
getAfterUseAction
-
getSessionUidParameter
-