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

public Class SqmCteStatement<T>

extends AbstractSqmNode
implements SqmVisitableNode, JpaCteCriteria<T>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.criteria.JpaCteCriteria, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable, org.hibernate.query.sqm.tree.SqmVisitableNode, org.hibernate.query.sqm.tree.SqmNode
Imports
java.util.ArrayList, .Collections, .List, java.util.function.Function, org.hibernate.query.criteria.JpaCteCriteria, .JpaCteCriteriaAttribute, .JpaCteCriteriaType, .JpaSearchOrder, org.hibernate.query.SortDirection, org.hibernate.query.sqm.tree.expression.SqmExpression, .SqmLiteral, org.hibernate.query.sqm.tree.select.SqmSelectQuery, .SqmSelectStatement, .SqmSubQuery, org.hibernate.sql.ast.tree.cte.CteMaterialization, .CteSearchClauseKind, org.hibernate.query.sqm.NodeBuilder, .SemanticQueryWalker, org.hibernate.query.sqm.tree.AbstractSqmNode, .SqmCopyContext, .SqmVisitableNode, jakarta.persistence.criteria.AbstractQuery, .Subquery

Authors
Steve Ebersole, Christian Beikov

Field Summary

Modifier and TypeField and Description
private final SqmCteContainer
private SqmSelectQuery<?>
private final SqmCteTable<T>
private List<JpaCteCriteriaAttribute>
private String
private String
private SqmLiteral<Object>
private CteMaterialization
private SqmLiteral<Object>
private String
private List<JpaSearchOrder>
private CteSearchClauseKind

Constructor Summary

AccessConstructor and Description
public
SqmCteStatement(String name, SqmSelectQuery<T> cteDefinition, SqmCteContainer cteContainer, NodeBuilder nodeBuilder)

public
SqmCteStatement(String name, SqmSelectQuery<T> nonRecursiveQueryPart, boolean unionDistinct, Function<JpaCteCriteria<T>, AbstractQuery<T>> finalCriteriaProducer, SqmCteContainer cteContainer, NodeBuilder nodeBuilder)

private
SqmCteStatement(NodeBuilder builder, SqmCteContainer cteContainer, SqmCteTable<T> cteTable, SqmSelectQuery<?> cteDefinition, CteMaterialization materialization, CteSearchClauseKind searchClauseKind, List<JpaSearchOrder> searchBySpecifications, String searchAttributeName, List<JpaCteCriteriaAttribute> cycleAttributes, String cycleMarkAttributeName, String cyclePathAttributeName, SqmLiteral<Object> cycleValue, SqmLiteral<Object> noCycleValue)

Method Summary

Modifier and TypeMethod and Description
public <X> X
accept(SemanticQueryWalker<X> walker)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Accept the walker per visitation
public void
public SqmCteStatement<T>
public <X> void
cycleUsing(String cycleMarkAttributeName, String cyclePathAttributeName, X cycleValue, X noCycleValue, List<JpaCteCriteriaAttribute> cycleAttributes)

Implements org.hibernate.query.criteria.JpaCteCriteria.cycleUsing.

public SqmCteContainer
getCteContainer()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCteContainer.

The container within this CTE is registered.
public SqmSelectQuery<?>
public SqmCteTable<?>
public List<JpaCteCriteriaAttribute>
getCycleAttributes()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCycleAttributes.

The attributes to use for cycle detection.
public SqmLiteral<Object>
public String
getCycleMarkAttributeName()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCycleMarkAttributeName.

The attribute name which is used to mark when a cycle has been detected.
public String
getCyclePathAttributeName()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCyclePathAttributeName.

The attribute name that represents the computation path, which is used for cycle detection.
public Object
getCycleValue()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCycleValue.

The value which is set for the cycle mark attribute when a cycle is detected.
public CteMaterialization
public String
getName()

Implements org.hibernate.query.criteria.JpaCteCriteria.getName.

The name under which this CTE is registered.
public SqmLiteral<Object>
public Object
getNoCycleValue()

Implements org.hibernate.query.criteria.JpaCteCriteria.getNoCycleValue.

The default value for the cycle mark attribute when no cycle is detected.
public String
getSearchAttributeName()

Implements org.hibernate.query.criteria.JpaCteCriteria.getSearchAttributeName.

The attribute name by which one can order the final CTE result, to achieve the search order.
public List<JpaSearchOrder>
public CteSearchClauseKind
getSearchClauseKind()

Implements org.hibernate.query.criteria.JpaCteCriteria.getSearchClauseKind.

The kind of search (breadth-first or depth-first) that should be done for a recursive query.
public JpaCteCriteriaType<T>
public void
public void
Inherited from org.hibernate.query.sqm.tree.AbstractSqmNode:
nodeBuilder

Field Detail

cteContainerback to summary
private final SqmCteContainer cteContainer
cteDefinitionback to summary
private SqmSelectQuery<?> cteDefinition
cteTableback to summary
private final SqmCteTable<T> cteTable
cycleAttributesback to summary
private List<JpaCteCriteriaAttribute> cycleAttributes
cycleMarkAttributeNameback to summary
private String cycleMarkAttributeName
cyclePathAttributeNameback to summary
private String cyclePathAttributeName
cycleValueback to summary
private SqmLiteral<Object> cycleValue
materializationback to summary
private CteMaterialization materialization
noCycleValueback to summary
private SqmLiteral<Object> noCycleValue
searchAttributeNameback to summary
private String searchAttributeName
searchBySpecificationsback to summary
private List<JpaSearchOrder> searchBySpecifications
searchClauseKindback to summary
private CteSearchClauseKind searchClauseKind

Constructor Detail

SqmCteStatementback to summary
public SqmCteStatement(String name, SqmSelectQuery<T> cteDefinition, SqmCteContainer cteContainer, NodeBuilder nodeBuilder)
SqmCteStatementback to summary
public SqmCteStatement(String name, SqmSelectQuery<T> nonRecursiveQueryPart, boolean unionDistinct, Function<JpaCteCriteria<T>, AbstractQuery<T>> finalCriteriaProducer, SqmCteContainer cteContainer, NodeBuilder nodeBuilder)
SqmCteStatementback to summary
private SqmCteStatement(NodeBuilder builder, SqmCteContainer cteContainer, SqmCteTable<T> cteTable, SqmSelectQuery<?> cteDefinition, CteMaterialization materialization, CteSearchClauseKind searchClauseKind, List<JpaSearchOrder> searchBySpecifications, String searchAttributeName, List<JpaCteCriteriaAttribute> cycleAttributes, String cycleMarkAttributeName, String cyclePathAttributeName, SqmLiteral<Object> cycleValue, SqmLiteral<Object> noCycleValue)

Method Detail

acceptback to summary
public <X> X accept(SemanticQueryWalker<X> walker)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Doc from org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Accept the walker per visitation

Annotations
@Override
appendHqlStringback to summary
public void appendHqlString(StringBuilder sb)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.appendHqlString.

Annotations
@Override
copyback to summary
public SqmCteStatement<T> copy(SqmCopyContext context)

Implements org.hibernate.query.sqm.tree.SqmNode.copy.

Annotations
@Override
cycleUsingback to summary
public <X> void cycleUsing(String cycleMarkAttributeName, String cyclePathAttributeName, X cycleValue, X noCycleValue, List<JpaCteCriteriaAttribute> cycleAttributes)

Implements org.hibernate.query.criteria.JpaCteCriteria.cycleUsing.

Annotations
@Override
getCteContainerback to summary
public SqmCteContainer getCteContainer()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCteContainer.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getCteContainer.

The container within this CTE is registered.

Annotations
@Override
getCteDefinitionback to summary
public SqmSelectQuery<?> getCteDefinition()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCteDefinition.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getCteDefinition.

The definition of the CTE.

Annotations
@Override
getCteTableback to summary
public SqmCteTable<?> getCteTable()
getCycleAttributesback to summary
public List<JpaCteCriteriaAttribute> getCycleAttributes()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCycleAttributes.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getCycleAttributes.

The attributes to use for cycle detection.

Annotations
@Override
getCycleLiteralback to summary
public SqmLiteral<Object> getCycleLiteral()
getCycleMarkAttributeNameback to summary
public String getCycleMarkAttributeName()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCycleMarkAttributeName.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getCycleMarkAttributeName.

The attribute name which is used to mark when a cycle has been detected. Note that an implicit JpaCteCriteriaAttribute will be made available for this.

Annotations
@Override
getCyclePathAttributeNameback to summary
public String getCyclePathAttributeName()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCyclePathAttributeName.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getCyclePathAttributeName.

The attribute name that represents the computation path, which is used for cycle detection. Note that an implicit JpaCteCriteriaAttribute will be made available for this.

Annotations
@Override
getCycleValueback to summary
public Object getCycleValue()

Implements org.hibernate.query.criteria.JpaCteCriteria.getCycleValue.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getCycleValue.

The value which is set for the cycle mark attribute when a cycle is detected.

Annotations
@Override
getMaterializationback to summary
public CteMaterialization getMaterialization()

Implements org.hibernate.query.criteria.JpaCteCriteria.getMaterialization.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getMaterialization.

The materialization hint for the CTE.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.hibernate.query.criteria.JpaCteCriteria.getName.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getName.

The name under which this CTE is registered.

Annotations
@Override
getNoCycleLiteralback to summary
public SqmLiteral<Object> getNoCycleLiteral()
getNoCycleValueback to summary
public Object getNoCycleValue()

Implements org.hibernate.query.criteria.JpaCteCriteria.getNoCycleValue.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getNoCycleValue.

The default value for the cycle mark attribute when no cycle is detected.

Annotations
@Override
getSearchAttributeNameback to summary
public String getSearchAttributeName()

Implements org.hibernate.query.criteria.JpaCteCriteria.getSearchAttributeName.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getSearchAttributeName.

The attribute name by which one can order the final CTE result, to achieve the search order. Note that an implicit JpaCteCriteriaAttribute will be made available for this.

Annotations
@Override
getSearchBySpecificationsback to summary
public List<JpaSearchOrder> getSearchBySpecifications()

Implements org.hibernate.query.criteria.JpaCteCriteria.getSearchBySpecifications.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getSearchBySpecifications.

The order by which should be searched.

Annotations
@Override
getSearchClauseKindback to summary
public CteSearchClauseKind getSearchClauseKind()

Implements org.hibernate.query.criteria.JpaCteCriteria.getSearchClauseKind.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getSearchClauseKind.

The kind of search (breadth-first or depth-first) that should be done for a recursive query. May be null if unspecified or if this is not a recursive query.

Annotations
@Override
getTypeback to summary
public JpaCteCriteriaType<T> getType()

Implements org.hibernate.query.criteria.JpaCteCriteria.getType.

Doc from org.hibernate.query.criteria.JpaCteCriteria.getType.

The type of the CTE.

Annotations
@Override
searchback to summary
public void search(CteSearchClauseKind kind, String searchAttributeName, List<JpaSearchOrder> searchOrders)

Implements org.hibernate.query.criteria.JpaCteCriteria.search.

Annotations
@Override
setMaterializationback to summary
public void setMaterialization(CteMaterialization materialization)

Implements org.hibernate.query.criteria.JpaCteCriteria.setMaterialization.

Annotations
@Override