UPDATE or DELETE) queries should
be handled when the target entity is mapped to multiple tables via secondary tables or certain
inheritance strategies.
The main contracts here are executeUpdate and executeDelete.
The methods prepare and release allow the strategy to perform any one time
preparation and cleanup.
API Note
See SqmMutationStrategyHelper#resolveStrategy for standard resolution of the
strategy to use for each hierarchy.
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number of rows affectedExecute the multi-table update indicated by the passed SqmUpdateStatement |
| public int | Returns: The number of rows affectedExecute the multi-table update indicated by the passed SqmUpdateStatement |
| public default void | prepare(MappingModelCreationProcess mappingModelCreationProcess, JdbcConnectionAccess connectionAccess)
Prepare the strategy for use. |
| public default void | release(SessionFactoryImplementor sessionFactory, JdbcConnectionAccess connectionAccess)
Deprecated
as a consequence of
Release the strategy.
SessionFactoryImplementor being deprecated.
|
| executeDelete | back to summary |
|---|---|
| public int executeDelete(SqmDeleteStatement<?> sqmDeleteStatement, DomainParameterXref domainParameterXref, DomainQueryExecutionContext context) Execute the multi-table update indicated by the passed SqmUpdateStatement
| |
| executeUpdate | back to summary |
|---|---|
| public int executeUpdate(SqmUpdateStatement<?> sqmUpdateStatement, DomainParameterXref domainParameterXref, DomainQueryExecutionContext context) Execute the multi-table update indicated by the passed SqmUpdateStatement
| |
| prepare | back to summary |
|---|---|
| public default void prepare(MappingModelCreationProcess mappingModelCreationProcess, JdbcConnectionAccess connectionAccess) Prepare the strategy for use. Called one time as the SessionFactory is being built. | |
| release | back to summary |
|---|---|
| public default void release(SessionFactoryImplementor sessionFactory, JdbcConnectionAccess connectionAccess)
Deprecated as a consequence of Release the strategy. Called one time as the SessionFactory is being shut down. | |