Top Fields Constructors Methods
org.hibernate.query.sqm.tree

public abstract Class AbstractSqmDmlStatement<E>

extends AbstractSqmStatement<E>
implements SqmDmlStatement<E>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.tree.SqmDmlStatement, org.hibernate.query.criteria.JpaManipulationCriteria, org.hibernate.query.criteria.JpaQueryableCriteria, org.hibernate.query.criteria.JpaCteContainer, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable, org.hibernate.query.criteria.JpaCriteriaBase, jakarta.persistence.criteria.CommonAbstractCriteria, org.hibernate.query.sqm.tree.cte.SqmCteContainer, org.hibernate.query.sqm.tree.SqmNode, org.hibernate.query.sqm.tree.SqmStatement, org.hibernate.query.sqm.tree.SqmVisitableNode, org.hibernate.query.sqm.tree.SqmQuery
Known Direct Subclasses
org.hibernate.query.sqm.tree.AbstractSqmRestrictedDmlStatement, org.hibernate.query.sqm.tree.insert.AbstractSqmInsertStatement
Imports
java.util.Collection, .LinkedHashMap, .Map, .Set, java.util.function.Function, org.hibernate.query.criteria.JpaCteCriteria, .JpaRoot, org.hibernate.query.sqm.NodeBuilder, .SqmQuerySource, org.hibernate.query.sqm.tree.cte.SqmCteStatement, org.hibernate.query.sqm.tree.expression.SqmParameter, org.hibernate.query.sqm.tree.from.SqmRoot, org.hibernate.query.sqm.tree.select.SqmSelectQuery, .SqmSubQuery, jakarta.persistence.criteria.AbstractQuery

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Map<String, SqmCteStatement<?>>
private SqmRoot<E>

Constructor Summary

AccessConstructor and Description
public
public
AbstractSqmDmlStatement(SqmRoot<E> target, SqmQuerySource querySource, NodeBuilder nodeBuilder)

public
AbstractSqmDmlStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<E> target)

Method Summary

Modifier and TypeMethod and Description
protected void
protected Map<String, SqmCteStatement<?>>
public <X> JpaCteCriteria<X>
getCteCriteria(String cteName)

Implements org.hibernate.query.criteria.JpaCteContainer.getCteCriteria.

Returns a CTE that is registered by the given name on this container, or any of its parents.
public Collection<? extends JpaCteCriteria<?>>
getCteCriterias()

Implements org.hibernate.query.criteria.JpaCteContainer.getCteCriterias.

Returns the CTEs that are registered on this container.
public SqmCteStatement<?>
public Collection<SqmCteStatement<?>>
public SqmRoot<E>
getTarget()

Implements org.hibernate.query.sqm.tree.SqmDmlStatement.getTarget.

Get the root path that is the target of the DML statement.
public void
public <U> SqmSubQuery<U>
subquery(Class<U>
the subquery result type
type
)

Implements org.hibernate.query.criteria.JpaCriteriaBase.subquery.

Create a subquery of the query.
private String
public <X> JpaCteCriteria<X>
with(AbstractQuery<X> criteria)

Implements org.hibernate.query.criteria.JpaCteContainer.with.

Registers the given CriteriaQuery and returns a JpaCteCriteria, which can be used for querying.
public <X> JpaCteCriteria<X>
with(String name, AbstractQuery<X> criteria)

Implements org.hibernate.query.criteria.JpaCteContainer.with.

Like with(AbstractQuery) but assigns an explicit CTE name.
private <X> JpaCteCriteria<X>
withInternal(String name, AbstractQuery<X> criteria)

private <X> JpaCteCriteria<X>
withInternal(String name, AbstractQuery<X> baseCriteria, boolean unionDistinct, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer)

public <X> JpaCteCriteria<X>
withRecursiveUnionAll(AbstractQuery<X> baseCriteria, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer)

Implements org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionAll.

Allows to register a recursive CTE.
public <X> JpaCteCriteria<X>
public <X> JpaCteCriteria<X>
withRecursiveUnionDistinct(AbstractQuery<X> baseCriteria, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer)

Implements org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionDistinct.

Allows to register a recursive CTE.
public <X> JpaCteCriteria<X>
Inherited from org.hibernate.query.sqm.tree.AbstractSqmStatement:
addParametercopyParametersgetQuerySourcegetSqmParametersresolveParameters

Field Detail

cteStatementsback to summary
private final Map<String, SqmCteStatement<?>> cteStatements
targetback to summary
private SqmRoot<E> target

Constructor Detail

AbstractSqmDmlStatementback to summary
public AbstractSqmDmlStatement(SqmQuerySource querySource, NodeBuilder nodeBuilder)
AbstractSqmDmlStatementback to summary
public AbstractSqmDmlStatement(SqmRoot<E> target, SqmQuerySource querySource, NodeBuilder nodeBuilder)
AbstractSqmDmlStatementback to summary
public AbstractSqmDmlStatement(NodeBuilder builder, SqmQuerySource querySource, Set<SqmParameter<?>> parameters, Map<String, SqmCteStatement<?>> cteStatements, SqmRoot<E> target)

Method Detail

appendHqlCteStringback to summary
protected void appendHqlCteString(StringBuilder sb)
copyCteStatementsback to summary
protected Map<String, SqmCteStatement<?>> copyCteStatements(SqmCopyContext context)
getCteCriteriaback to summary
public <X> JpaCteCriteria<X> getCteCriteria(String cteName)

Implements org.hibernate.query.criteria.JpaCteContainer.getCteCriteria.

Doc from org.hibernate.query.criteria.JpaCteContainer.getCteCriteria.

Returns a CTE that is registered by the given name on this container, or any of its parents.

Annotations
@Override
getCteCriteriasback to summary
public Collection<? extends JpaCteCriteria<?>> getCteCriterias()

Implements org.hibernate.query.criteria.JpaCteContainer.getCteCriterias.

Doc from org.hibernate.query.criteria.JpaCteContainer.getCteCriterias.

Returns the CTEs that are registered on this container.

Annotations
@Override
getCteStatementback to summary
public SqmCteStatement<?> getCteStatement(String cteLabel)

Implements org.hibernate.query.sqm.tree.cte.SqmCteContainer.getCteStatement.

Annotations
@Override
getCteStatementsback to summary
public Collection<SqmCteStatement<?>> getCteStatements()

Implements org.hibernate.query.sqm.tree.cte.SqmCteContainer.getCteStatements.

Annotations
@Override
getTargetback to summary
public SqmRoot<E> getTarget()

Implements org.hibernate.query.sqm.tree.SqmDmlStatement.getTarget.

Doc from org.hibernate.query.sqm.tree.SqmDmlStatement.getTarget.

Get the root path that is the target of the DML statement.

Annotations
@Override
setTargetback to summary
public void setTarget(JpaRoot<E> root)

Implements org.hibernate.query.sqm.tree.SqmDmlStatement.setTarget.

Doc from org.hibernate.query.sqm.tree.SqmDmlStatement.setTarget.

Set the root path

Annotations
@Override
subqueryback to summary
public <U> SqmSubQuery<U> subquery(Class<U> type)

Implements org.hibernate.query.criteria.JpaCriteriaBase.subquery.

Doc from jakarta.persistence.criteria.CommonAbstractCriteria.subquery.

Create a subquery of the query.

Parameters
type:Class<U>

the subquery result type

Returns:SqmSubQuery<U>

subquery

Annotations
@Override
validateCteNameback to summary
private String validateCteName(String name)
withback to summary
public <X> JpaCteCriteria<X> with(AbstractQuery<X> criteria)

Implements org.hibernate.query.criteria.JpaCteContainer.with.

Doc from org.hibernate.query.criteria.JpaCteContainer.with.

Registers the given CriteriaQuery and returns a JpaCteCriteria, which can be used for querying.

Annotations
@Override
withback to summary
public <X> JpaCteCriteria<X> with(String name, AbstractQuery<X> criteria)

Implements org.hibernate.query.criteria.JpaCteContainer.with.

Doc from org.hibernate.query.criteria.JpaCteContainer.with.

Like with(AbstractQuery) but assigns an explicit CTE name.

Annotations
@Override
withInternalback to summary
private <X> JpaCteCriteria<X> withInternal(String name, AbstractQuery<X> criteria)
withInternalback to summary
private <X> JpaCteCriteria<X> withInternal(String name, AbstractQuery<X> baseCriteria, boolean unionDistinct, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer)
withRecursiveUnionAllback to summary
public <X> JpaCteCriteria<X> withRecursiveUnionAll(AbstractQuery<X> baseCriteria, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer)

Implements org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionAll.

Doc from org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionAll.

Allows to register a recursive CTE. The base CriteriaQuery serves for the structure of the JpaCteCriteria, which is made available in the recursive criteria producer function, so that the recursive CriteriaQuery is able to refer to the CTE again.

Annotations
@Override
withRecursiveUnionAllback to summary
public <X> JpaCteCriteria<X> withRecursiveUnionAll(String name, AbstractQuery<X> baseCriteria, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer)

Implements org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionAll.

Doc from org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionAll.

Like withRecursiveUnionAll(AbstractQuery, Function) but assigns an explicit CTE name.

Annotations
@Override
withRecursiveUnionDistinctback to summary
public <X> JpaCteCriteria<X> withRecursiveUnionDistinct(AbstractQuery<X> baseCriteria, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer)

Implements org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionDistinct.

Doc from org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionDistinct.

Allows to register a recursive CTE. The base CriteriaQuery serves for the structure of the JpaCteCriteria, which is made available in the recursive criteria producer function, so that the recursive CriteriaQuery is able to refer to the CTE again.

Annotations
@Override
withRecursiveUnionDistinctback to summary
public <X> JpaCteCriteria<X> withRecursiveUnionDistinct(String name, AbstractQuery<X> baseCriteria, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer)

Implements org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionDistinct.

Doc from org.hibernate.query.criteria.JpaCteContainer.withRecursiveUnionDistinct.

Like withRecursiveUnionDistinct(AbstractQuery, Function) but assigns an explicit CTE name.

Annotations
@Override