Class AbstractCteMutationHandler
- java.lang.Object
-
- org.hibernate.query.sqm.mutation.spi.AbstractMutationHandler
-
- org.hibernate.query.sqm.mutation.internal.cte.AbstractCteMutationHandler
-
- All Implemented Interfaces:
Handler
- Direct Known Subclasses:
CteDeleteHandler
,CteUpdateHandler
public abstract class AbstractCteMutationHandler extends AbstractMutationHandler
Defines how identifier values are selected from the updatable/deletable tables.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CTE_TABLE_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description AbstractCteMutationHandler(CteTable cteTable, SqmDeleteOrUpdateStatement<?> sqmStatement, DomainParameterXref domainParameterXref, CteMutationStrategy strategy, SessionFactoryImplementor sessionFactory)
-
Method Summary
-
Methods inherited from class org.hibernate.query.sqm.mutation.spi.AbstractMutationHandler
getEntityDescriptor, getSessionFactory, getSqmDeleteOrUpdateStatement
-
-
-
-
Field Detail
-
CTE_TABLE_IDENTIFIER
public static final String CTE_TABLE_IDENTIFIER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractCteMutationHandler
public AbstractCteMutationHandler(CteTable cteTable, SqmDeleteOrUpdateStatement<?> sqmStatement, DomainParameterXref domainParameterXref, CteMutationStrategy strategy, SessionFactoryImplementor sessionFactory)
-
-
Method Detail
-
getCteTable
public CteTable getCteTable()
-
getDomainParameterXref
public DomainParameterXref getDomainParameterXref()
-
getStrategy
public CteMutationStrategy getStrategy()
-
execute
public int execute(DomainQueryExecutionContext executionContext)
Description copied from interface:Handler
Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.- Parameters:
executionContext
- Contextual information needed for execution- Returns:
- The "number of rows affected" count
-
createCountStar
protected Expression createCountStar(SessionFactoryImplementor factory, MultiTableSqmMutationConverter sqmConverter)
Used by Hibernate Reactive
-
createIdSubQueryPredicate
protected Predicate createIdSubQueryPredicate(List<? extends Expression> lhsExpressions, CteStatement idSelectCte, SessionFactoryImplementor factory)
-
createIdSubQueryPredicate
protected Predicate createIdSubQueryPredicate(List<? extends Expression> lhsExpressions, CteStatement idSelectCte, ModelPart fkModelPart, SessionFactoryImplementor factory)
-
createIdSubQuery
protected QuerySpec createIdSubQuery(CteStatement idSelectCte, ModelPart fkModelPart, SessionFactoryImplementor factory)
-
addDmlCtes
protected abstract void addDmlCtes(CteContainer statement, CteStatement idSelectCte, MultiTableSqmMutationConverter sqmConverter, Map<SqmParameter<?>,List<JdbcParameter>> parameterResolutions, SessionFactoryImplementor factory)
-
resolveUnionTableReference
protected NamedTableReference resolveUnionTableReference(TableReference tableReference, String tableExpression)
-
-