Interface MultiTableHandler
- All Known Subinterfaces:
DeleteHandler,Handler,InsertHandler,UpdateHandler
- All Known Implementing Classes:
AbstractCteMutationHandler,AbstractInlineHandler,AbstractMutationHandler,CteDeleteHandler,CteInsertHandler,CteSoftDeleteHandler,CteUpdateHandler,InlineDeleteHandler,InlineUpdateHandler,TableBasedDeleteHandler,TableBasedInsertHandler,TableBasedSoftDeleteHandler,TableBasedUpdateHandler
public interface MultiTableHandler
Simply as a matter of code structuring, it is often worthwhile to put all of the execution code into a separate
handler (executor) class. This contract helps unify those helpers.
Hiding this "behind the strategy" also allows mixing approaches based on the nature of specific
queries
- Since:
- 7.1
-
Method Summary
Modifier and TypeMethodDescriptioncreateJdbcParameterBindings(DomainQueryExecutionContext executionContext) Create 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 executionContext) Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.booleanisCompatibleWith(JdbcParameterBindings jdbcParameterBindings, QueryOptions queryOptions)
-
Method Details
-
createJdbcParameterBindings
Create theJdbcParameterBindingsfor this multi-table handler based on the execution context.- Parameters:
executionContext- Contextual information needed for execution- Returns:
- The built parameter bindings
-
dependsOnParameterBindings
boolean dependsOnParameterBindings()Signals that the SQL depends on the parameter bindings e.g. due to the need for inlining of parameter values or multiValued parameters. -
isCompatibleWith
-
execute
int execute(JdbcParameterBindings jdbcParameterBindings, DomainQueryExecutionContext executionContext) Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.- Parameters:
jdbcParameterBindings- The parameter bindings for JDBC parametersexecutionContext- Contextual information needed for execution- Returns:
- The "number of rows affected" count
-