Top Description Fields Constructors Methods
org.hibernate.query.sqm.mutation.internal.cte

public abstract Class AbstractCteMutationHandler

extends AbstractMutationHandler
Class Inheritance
Known Direct Subclasses
org.hibernate.query.sqm.mutation.internal.cte.CteDeleteHandler, org.hibernate.query.sqm.mutation.internal.cte.CteUpdateHandler
Imports
java.util.ArrayList, .Collections, .IdentityHashMap, .LinkedHashMap, .List, .Map, org.hibernate.LockMode, .LockOptions, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.metamodel.mapping.EntityMappingType, .MappingModelExpressible, .ModelPart, .SqlExpressible, org.hibernate.query.spi.DomainQueryExecutionContext, org.hibernate.query.sqm.internal.DomainParameterXref, .SqmJdbcExecutionContextAdapter, .SqmUtil, org.hibernate.query.sqm.mutation.internal.MatchingIdSelectionHelper, .MultiTableSqmMutationConverter, org.hibernate.query.sqm.mutation.spi.AbstractMutationHandler, org.hibernate.query.sqm.tree.SqmDeleteOrUpdateStatement, org.hibernate.query.sqm.tree.expression.SqmExpression, .SqmParameter, .SqmStar, org.hibernate.sql.ast.SqlAstTranslator, org.hibernate.sql.ast.tree.cte.CteColumn, .CteContainer, .CteMaterialization, .CteStatement, .CteTable, .CteTableGroup, org.hibernate.sql.ast.tree.expression.ColumnReference, .Expression, .JdbcParameter, .SqlTuple, org.hibernate.sql.ast.tree.from.NamedTableReference, .TableReference, .UnionTableReference, org.hibernate.sql.ast.tree.predicate.InSubQueryPredicate, .Junction, .Predicate, org.hibernate.sql.ast.tree.select.QuerySpec, .SelectClause, .SelectStatement, org.hibernate.sql.exec.spi.JdbcOperationQuerySelect, .JdbcParameterBindings, org.hibernate.sql.results.graph.DomainResult, org.hibernate.sql.results.graph.basic.BasicResult, org.hibernate.sql.results.internal.SqlSelectionImpl, org.hibernate.sql.results.spi.ListResultsConsumer

Defines how identifier values are selected from the updatable/deletable tables.
Author
Christian Beikov

Field Summary

Modifier and TypeField and Description
public static final String
private final CteTable
private final DomainParameterXref
private final CteMutationStrategy

Constructor Summary

AccessConstructor and Description
public
AbstractCteMutationHandler(CteTable cteTable, SqmDeleteOrUpdateStatement<?> sqmStatement, DomainParameterXref domainParameterXref, CteMutationStrategy strategy, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected abstract void
addDmlCtes(CteContainer statement, CteStatement idSelectCte, MultiTableSqmMutationConverter sqmConverter, Map<SqmParameter<?>, List<JdbcParameter>> parameterResolutions, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private Expression
createCountStar(SessionFactoryImplementor factory, MultiTableSqmMutationConverter sqmConverter)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
protected QuerySpec
createIdSubQuery(CteStatement idSelectCte, ModelPart fkModelPart, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
protected Predicate
createIdSubQueryPredicate(List<? extends Expression> lhsExpressions, CteStatement idSelectCte, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
protected Predicate
createIdSubQueryPredicate(List<? extends Expression> lhsExpressions, CteStatement idSelectCte, ModelPart fkModelPart, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public int
execute(DomainQueryExecutionContext
Contextual information needed for execution
executionContext
)

Implements org.hibernate.query.sqm.mutation.internal.Handler.execute.

Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.
public CteTable
protected abstract String
getCteTableName(String tableExpression)

public DomainParameterXref
public CteMutationStrategy
protected NamedTableReference
resolveUnionTableReference(TableReference tableReference, String tableExpression)

Inherited from org.hibernate.query.sqm.mutation.spi.AbstractMutationHandler:
getEntityDescriptorgetSessionFactorygetSqmDeleteOrUpdateStatement

Field Detail

CTE_TABLE_IDENTIFIERback to summary
public static final String CTE_TABLE_IDENTIFIER
cteTableback to summary
private final CteTable cteTable
domainParameterXrefback to summary
private final DomainParameterXref domainParameterXref
strategyback to summary
private final CteMutationStrategy strategy

Constructor Detail

AbstractCteMutationHandlerback to summary
public AbstractCteMutationHandler(CteTable cteTable, SqmDeleteOrUpdateStatement<?> sqmStatement, DomainParameterXref domainParameterXref, CteMutationStrategy strategy, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

addDmlCtesback to summary
protected abstract void addDmlCtes(CteContainer statement, CteStatement idSelectCte, MultiTableSqmMutationConverter sqmConverter, Map<SqmParameter<?>, List<JdbcParameter>> parameterResolutions, SessionFactoryImplementor factory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

createCountStarback to summary
private Expression createCountStar(SessionFactoryImplementor factory, MultiTableSqmMutationConverter sqmConverter)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

createIdSubQueryback to summary
protected QuerySpec createIdSubQuery(CteStatement idSelectCte, ModelPart fkModelPart, SessionFactoryImplementor factory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

createIdSubQueryPredicateback to summary
protected Predicate createIdSubQueryPredicate(List<? extends Expression> lhsExpressions, CteStatement idSelectCte, SessionFactoryImplementor factory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

createIdSubQueryPredicateback to summary
protected Predicate createIdSubQueryPredicate(List<? extends Expression> lhsExpressions, CteStatement idSelectCte, ModelPart fkModelPart, SessionFactoryImplementor factory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

executeback to summary
public int execute(DomainQueryExecutionContext executionContext)

Implements org.hibernate.query.sqm.mutation.internal.Handler.execute.

Doc from org.hibernate.query.sqm.mutation.internal.Handler.execute.

Execute the multi-table update or delete indicated by the SQM AST passed in when this Handler was created.

Parameters
executionContext:DomainQueryExecutionContext

Contextual information needed for execution

Returns:int

The "number of rows affected" count

Annotations
@Override
getCteTableback to summary
public CteTable getCteTable()
getCteTableNameback to summary
protected abstract String getCteTableName(String tableExpression)
getDomainParameterXrefback to summary
public DomainParameterXref getDomainParameterXref()
getStrategyback to summary
public CteMutationStrategy getStrategy()
resolveUnionTableReferenceback to summary
protected NamedTableReference resolveUnionTableReference(TableReference tableReference, String tableExpression)