Interface SqmMultiTableMutationStrategy
-
- All Known Implementing Classes:
CteMutationStrategy
,GlobalTemporaryTableMutationStrategy
,InlineMutationStrategy
,LocalTemporaryTableMutationStrategy
,PersistentTableMutationStrategy
public interface SqmMultiTableMutationStrategy
Pluggable strategy for defining how mutation (`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 areexecuteUpdate(org.hibernate.query.sqm.tree.update.SqmUpdateStatement<?>, org.hibernate.query.sqm.internal.DomainParameterXref, org.hibernate.query.spi.DomainQueryExecutionContext)
andexecuteDelete(org.hibernate.query.sqm.tree.delete.SqmDeleteStatement<?>, org.hibernate.query.sqm.internal.DomainParameterXref, org.hibernate.query.spi.DomainQueryExecutionContext)
.prepare(org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess, org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess)
andrelease(org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess)
allow the strategy to perform any one time preparation and cleanup.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
executeDelete(SqmDeleteStatement<?> sqmDeleteStatement, DomainParameterXref domainParameterXref, DomainQueryExecutionContext context)
Execute the multi-table update indicated by the passed SqmUpdateStatementint
executeUpdate(SqmUpdateStatement<?> sqmUpdateStatement, DomainParameterXref domainParameterXref, DomainQueryExecutionContext context)
Execute the multi-table update indicated by the passed SqmUpdateStatementdefault void
prepare(MappingModelCreationProcess mappingModelCreationProcess, JdbcConnectionAccess connectionAccess)
Prepare the strategy for use.default void
release(SessionFactoryImplementor sessionFactory, JdbcConnectionAccess connectionAccess)
Release the strategy.
-
-
-
Method Detail
-
prepare
default void prepare(MappingModelCreationProcess mappingModelCreationProcess, JdbcConnectionAccess connectionAccess)
Prepare the strategy for use. Called one time as the SessionFactory is being built.
-
release
default void release(SessionFactoryImplementor sessionFactory, JdbcConnectionAccess connectionAccess)
Release the strategy. Called one time as the SessionFactory is being shut down.
-
executeUpdate
int executeUpdate(SqmUpdateStatement<?> sqmUpdateStatement, DomainParameterXref domainParameterXref, DomainQueryExecutionContext context)
Execute the multi-table update indicated by the passed SqmUpdateStatement- Returns:
- The number of rows affected
-
executeDelete
int executeDelete(SqmDeleteStatement<?> sqmDeleteStatement, DomainParameterXref domainParameterXref, DomainQueryExecutionContext context)
Execute the multi-table update indicated by the passed SqmUpdateStatement- Returns:
- The number of rows affected
-
-