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> X
accept(SemanticQueryWalker<X> walker)
Accept the walker per visitationvoid
appendHqlString(StringBuilder sb)
SqmCteStatement<T>
copy(SqmCopyContext context)
<X> void
cycleUsing(String cycleMarkAttributeName, String cyclePathAttributeName, X cycleValue, X noCycleValue, List<JpaCteCriteriaAttribute> cycleAttributes)
SqmCteContainer
getCteContainer()
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()
String
getCycleMarkAttributeName()
The attribute name which is used to mark when a cycle has been detected.String
getCyclePathAttributeName()
The attribute name that represents the computation path, which is used for cycle detection.Object
getCycleValue()
The value which is set for the cycle mark attribute when a cycle is detected.CteMaterialization
getMaterialization()
The materialization hint for the CTE.String
getName()
The name under which this CTE is registered.SqmLiteral<Object>
getNoCycleLiteral()
Object
getNoCycleValue()
The default value for the cycle mark attribute when no cycle is detected.String
getSearchAttributeName()
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.CteSearchClauseKind
getSearchClauseKind()
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.void
search(CteSearchClauseKind kind, String searchAttributeName, List<JpaSearchOrder> searchOrders)
void
setMaterialization(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:JpaCteCriteria
The name under which this CTE is registered.- Specified by:
getName
in interfaceJpaCteCriteria<T>
-
getCteTable
public SqmCteTable<?> getCteTable()
-
getCteDefinition
public SqmSelectQuery<?> getCteDefinition()
Description copied from interface:JpaCteCriteria
The definition of the CTE.- Specified by:
getCteDefinition
in interfaceJpaCteCriteria<T>
-
getCteContainer
public SqmCteContainer getCteContainer()
Description copied from interface:JpaCteCriteria
The container within this CTE is registered.- Specified by:
getCteContainer
in interfaceJpaCteCriteria<T>
-
getMaterialization
public CteMaterialization getMaterialization()
Description copied from interface:JpaCteCriteria
The materialization hint for the CTE.- Specified by:
getMaterialization
in interfaceJpaCteCriteria<T>
-
setMaterialization
public void setMaterialization(CteMaterialization materialization)
- Specified by:
setMaterialization
in interfaceJpaCteCriteria<T>
-
getSearchClauseKind
public CteSearchClauseKind getSearchClauseKind()
Description copied from interface:JpaCteCriteria
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.- Specified by:
getSearchClauseKind
in interfaceJpaCteCriteria<T>
-
getSearchBySpecifications
public List<JpaSearchOrder> getSearchBySpecifications()
Description copied from interface:JpaCteCriteria
The order by which should be searched.- Specified by:
getSearchBySpecifications
in interfaceJpaCteCriteria<T>
-
getSearchAttributeName
public String getSearchAttributeName()
Description copied from interface:JpaCteCriteria
The attribute name by which one can order the final CTE result, to achieve the search order. Note that an implicitJpaCteCriteriaAttribute
will be made available for this.- Specified by:
getSearchAttributeName
in interfaceJpaCteCriteria<T>
-
getCycleAttributes
public List<JpaCteCriteriaAttribute> getCycleAttributes()
Description copied from interface:JpaCteCriteria
The attributes to use for cycle detection.- Specified by:
getCycleAttributes
in interfaceJpaCteCriteria<T>
-
getCycleMarkAttributeName
public String getCycleMarkAttributeName()
Description copied from interface:JpaCteCriteria
The attribute name which is used to mark when a cycle has been detected. Note that an implicitJpaCteCriteriaAttribute
will be made available for this.- Specified by:
getCycleMarkAttributeName
in interfaceJpaCteCriteria<T>
-
getCyclePathAttributeName
public String getCyclePathAttributeName()
Description copied from interface:JpaCteCriteria
The attribute name that represents the computation path, which is used for cycle detection. Note that an implicitJpaCteCriteriaAttribute
will be made available for this.- Specified by:
getCyclePathAttributeName
in interfaceJpaCteCriteria<T>
-
getCycleValue
public Object getCycleValue()
Description copied from interface:JpaCteCriteria
The value which is set for the cycle mark attribute when a cycle is detected.- Specified by:
getCycleValue
in interfaceJpaCteCriteria<T>
-
getNoCycleValue
public Object getNoCycleValue()
Description copied from interface:JpaCteCriteria
The default value for the cycle mark attribute when no cycle is detected.- Specified by:
getNoCycleValue
in interfaceJpaCteCriteria<T>
-
getCycleLiteral
public SqmLiteral<Object> getCycleLiteral()
-
getNoCycleLiteral
public SqmLiteral<Object> getNoCycleLiteral()
-
getType
public JpaCteCriteriaType<T> getType()
Description copied from interface:JpaCteCriteria
The type of the CTE.- Specified by:
getType
in interfaceJpaCteCriteria<T>
-
search
public void search(CteSearchClauseKind kind, String searchAttributeName, List<JpaSearchOrder> searchOrders)
- Specified by:
search
in interfaceJpaCteCriteria<T>
-
cycleUsing
public <X> void cycleUsing(String cycleMarkAttributeName, String cyclePathAttributeName, X cycleValue, X noCycleValue, List<JpaCteCriteriaAttribute> cycleAttributes)
- Specified by:
cycleUsing
in interfaceJpaCteCriteria<T>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
-
-