Package org.hibernate.query.sqm.tree.cte
Class SqmCteStatement<T>
- java.lang.Object
-
- org.hibernate.query.sqm.tree.AbstractSqmNode
-
- org.hibernate.query.sqm.tree.cte.SqmCteStatement<T>
-
- All Implemented Interfaces:
Serializable,JpaCriteriaNode,JpaCteCriteria<T>,SqmNode,SqmVisitableNode
public class SqmCteStatement<T> extends AbstractSqmNode implements SqmVisitableNode, JpaCteCriteria<T>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SqmCteStatement(String name, SqmSelectQuery<T> nonRecursiveQueryPart, boolean unionDistinct, Function<JpaCteCriteria<T>,AbstractQuery<T>> finalCriteriaProducer, SqmCteContainer cteContainer, NodeBuilder nodeBuilder)SqmCteStatement(String name, SqmSelectQuery<T> cteDefinition, SqmCteContainer cteContainer, NodeBuilder nodeBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> Xaccept(SemanticQueryWalker<X> walker)Accept the walker per visitationvoidappendHqlString(StringBuilder sb)SqmCteStatement<T>copy(SqmCopyContext context)<X> voidcycleUsing(String cycleMarkAttributeName, String cyclePathAttributeName, X cycleValue, X noCycleValue, List<JpaCteCriteriaAttribute> cycleAttributes)SqmCteContainergetCteContainer()The container within this CTE is registered.SqmSelectQuery<?>getCteDefinition()The definition of the CTE.SqmCteTable<?>getCteTable()List<JpaCteCriteriaAttribute>getCycleAttributes()The attributes to use for cycle detection.SqmLiteral<Object>getCycleLiteral()StringgetCycleMarkAttributeName()The attribute name which is used to mark when a cycle has been detected.StringgetCyclePathAttributeName()The attribute name that represents the computation path, which is used for cycle detection.ObjectgetCycleValue()The value which is set for the cycle mark attribute when a cycle is detected.CteMaterializationgetMaterialization()The materialization hint for the CTE.StringgetName()The name under which this CTE is registered.SqmLiteral<Object>getNoCycleLiteral()ObjectgetNoCycleValue()The default value for the cycle mark attribute when no cycle is detected.StringgetSearchAttributeName()The attribute name by which one can order the final CTE result, to achieve the search order.List<JpaSearchOrder>getSearchBySpecifications()The order by which should be searched.CteSearchClauseKindgetSearchClauseKind()The kind of search (breadth-first or depth-first) that should be done for a recursive query.JpaCteCriteriaType<T>getType()The type of the CTE.voidsearch(CteSearchClauseKind kind, String searchAttributeName, List<JpaSearchOrder> searchOrders)voidsetMaterialization(CteMaterialization materialization)-
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.criteria.JpaCteCriteria
cycle, cycle, cycle, cycle, cycleUsing, cycleUsing, cycleUsing, search
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
-
-
-
-
Constructor Detail
-
SqmCteStatement
public SqmCteStatement(String name, SqmSelectQuery<T> cteDefinition, SqmCteContainer cteContainer, NodeBuilder nodeBuilder)
-
SqmCteStatement
public SqmCteStatement(String name, SqmSelectQuery<T> nonRecursiveQueryPart, boolean unionDistinct, Function<JpaCteCriteria<T>,AbstractQuery<T>> finalCriteriaProducer, SqmCteContainer cteContainer, NodeBuilder nodeBuilder)
-
-
Method Detail
-
copy
public SqmCteStatement<T> copy(SqmCopyContext context)
-
getName
public String getName()
Description copied from interface:JpaCteCriteriaThe name under which this CTE is registered.- Specified by:
getNamein interfaceJpaCteCriteria<T>
-
getCteTable
public SqmCteTable<?> getCteTable()
-
getCteDefinition
public SqmSelectQuery<?> getCteDefinition()
Description copied from interface:JpaCteCriteriaThe definition of the CTE.- Specified by:
getCteDefinitionin interfaceJpaCteCriteria<T>
-
getCteContainer
public SqmCteContainer getCteContainer()
Description copied from interface:JpaCteCriteriaThe container within this CTE is registered.- Specified by:
getCteContainerin interfaceJpaCteCriteria<T>
-
getMaterialization
public CteMaterialization getMaterialization()
Description copied from interface:JpaCteCriteriaThe materialization hint for the CTE.- Specified by:
getMaterializationin interfaceJpaCteCriteria<T>
-
setMaterialization
public void setMaterialization(CteMaterialization materialization)
- Specified by:
setMaterializationin interfaceJpaCteCriteria<T>
-
getSearchClauseKind
public CteSearchClauseKind getSearchClauseKind()
Description copied from interface:JpaCteCriteriaThe 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.- Specified by:
getSearchClauseKindin interfaceJpaCteCriteria<T>
-
getSearchBySpecifications
public List<JpaSearchOrder> getSearchBySpecifications()
Description copied from interface:JpaCteCriteriaThe order by which should be searched.- Specified by:
getSearchBySpecificationsin interfaceJpaCteCriteria<T>
-
getSearchAttributeName
public String getSearchAttributeName()
Description copied from interface:JpaCteCriteriaThe attribute name by which one can order the final CTE result, to achieve the search order. Note that an implicitJpaCteCriteriaAttributewill be made available for this.- Specified by:
getSearchAttributeNamein interfaceJpaCteCriteria<T>
-
getCycleAttributes
public List<JpaCteCriteriaAttribute> getCycleAttributes()
Description copied from interface:JpaCteCriteriaThe attributes to use for cycle detection.- Specified by:
getCycleAttributesin interfaceJpaCteCriteria<T>
-
getCycleMarkAttributeName
public String getCycleMarkAttributeName()
Description copied from interface:JpaCteCriteriaThe attribute name which is used to mark when a cycle has been detected. Note that an implicitJpaCteCriteriaAttributewill be made available for this.- Specified by:
getCycleMarkAttributeNamein interfaceJpaCteCriteria<T>
-
getCyclePathAttributeName
public String getCyclePathAttributeName()
Description copied from interface:JpaCteCriteriaThe attribute name that represents the computation path, which is used for cycle detection. Note that an implicitJpaCteCriteriaAttributewill be made available for this.- Specified by:
getCyclePathAttributeNamein interfaceJpaCteCriteria<T>
-
getCycleValue
public Object getCycleValue()
Description copied from interface:JpaCteCriteriaThe value which is set for the cycle mark attribute when a cycle is detected.- Specified by:
getCycleValuein interfaceJpaCteCriteria<T>
-
getNoCycleValue
public Object getNoCycleValue()
Description copied from interface:JpaCteCriteriaThe default value for the cycle mark attribute when no cycle is detected.- Specified by:
getNoCycleValuein interfaceJpaCteCriteria<T>
-
getCycleLiteral
public SqmLiteral<Object> getCycleLiteral()
-
getNoCycleLiteral
public SqmLiteral<Object> getNoCycleLiteral()
-
getType
public JpaCteCriteriaType<T> getType()
Description copied from interface:JpaCteCriteriaThe type of the CTE.- Specified by:
getTypein interfaceJpaCteCriteria<T>
-
search
public void search(CteSearchClauseKind kind, String searchAttributeName, List<JpaSearchOrder> searchOrders)
- Specified by:
searchin interfaceJpaCteCriteria<T>
-
cycleUsing
public <X> void cycleUsing(String cycleMarkAttributeName, String cyclePathAttributeName, X cycleValue, X noCycleValue, List<JpaCteCriteriaAttribute> cycleAttributes)
- Specified by:
cycleUsingin interfaceJpaCteCriteria<T>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
-