Class SqmCteStatement<T>
java.lang.Object
org.hibernate.query.sqm.tree.spi.AbstractSqmNode
org.hibernate.query.sqm.tree.spi.cte.SqmCteStatement<T>
- All Implemented Interfaces:
Serializable, JpaCriteriaNode, JpaCteCriteria<T>, SqmCacheable, SqmNode, SqmVisitableNode
public class SqmCteStatement<T>
extends AbstractSqmNode
implements SqmVisitableNode, JpaCteCriteria<T>
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmCteStatement(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
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoidappendHqlString(StringBuilder hql, SqmRenderContext context) intcopy(SqmCopyContext context) <X> voidcycleUsing(String cycleMarkAttributeName, String cyclePathAttributeName, X cycleValue, X noCycleValue, List<JpaCteCriteriaAttribute> cycleAttributes) Define the CTE cycle clause with an explicit path attribute.booleanThe container within this CTE is registered.The definition of the CTE.SqmCteTable<?> The attributes to use for cycle detection.The attribute name which is used to mark when a cycle has been detected.The attribute name that represents the computation path, which is used for cycle detection.The value which is set for the cycle mark attribute when a cycle is detected.The materialization hint for the CTE.getName()The name under which this CTE is registered.The default value for the cycle mark attribute when no cycle is detected.The attribute name by which one can order the final CTE result, to achieve the search order.The order by which should be searched.The kind of search (breadth-first or depth-first) that should be done for a recursive query.getType()The type of the CTE.inthashCode()booleanisCompatible(Object object) voidsearch(CteSearchClauseKind kind, String searchAttributeName, List<JpaSearchOrder> searchOrders) Define the CTE search clause.voidsetMaterialization(CteMaterialization materialization) Set the CTE materialization hint.Methods inherited from class AbstractSqmNode
nodeBuilderMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JpaCteCriteria
cycle, cycle, cycle, cycle, cycleUsing, cycleUsing, cycleUsing, searchMethods inherited from interface SqmNode
asLoggableText, nodeBuilderMethods inherited from interface SqmVisitableNode
toHqlString
-
Constructor Details
-
SqmCteStatement
public SqmCteStatement(@Nonnull String name, @Nonnull SqmSelectQuery<T> cteDefinition, @Nonnull SqmCteContainer cteContainer, @Nonnull NodeBuilder nodeBuilder) -
SqmCteStatement
public SqmCteStatement(@Nonnull String name, @Nonnull SqmSelectQuery<T> nonRecursiveQueryPart, boolean unionDistinct, @Nonnull Function<JpaCteCriteria<T>, AbstractQuery<T>> finalCriteriaProducer, @Nonnull SqmCteContainer cteContainer, @Nonnull NodeBuilder nodeBuilder)
-
-
Method Details
-
copy
-
getName
Description copied from interface:JpaCteCriteriaThe name under which this CTE is registered.- Specified by:
getNamein interfaceJpaCteCriteria<T>
-
getCteTable
-
getCteDefinition
Description copied from interface:JpaCteCriteriaThe definition of the CTE.- Specified by:
getCteDefinitionin interfaceJpaCteCriteria<T>
-
getCteContainer
Description copied from interface:JpaCteCriteriaThe container within this CTE is registered.- Specified by:
getCteContainerin interfaceJpaCteCriteria<T>
-
getMaterialization
Description copied from interface:JpaCteCriteriaThe materialization hint for the CTE.- Specified by:
getMaterializationin interfaceJpaCteCriteria<T>
-
setMaterialization
Description copied from interface:JpaCteCriteriaSet the CTE materialization hint.- Specified by:
setMaterializationin interfaceJpaCteCriteria<T>
-
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
Description copied from interface:JpaCteCriteriaThe order by which should be searched.- Specified by:
getSearchBySpecificationsin interfaceJpaCteCriteria<T>
-
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
Description copied from interface:JpaCteCriteriaThe attributes to use for cycle detection.- Specified by:
getCycleAttributesin interfaceJpaCteCriteria<T>
-
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
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
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
Description copied from interface:JpaCteCriteriaThe default value for the cycle mark attribute when no cycle is detected.- Specified by:
getNoCycleValuein interfaceJpaCteCriteria<T>
-
getCycleLiteral
-
getNoCycleLiteral
-
getType
Description copied from interface:JpaCteCriteriaThe type of the CTE.- Specified by:
getTypein interfaceJpaCteCriteria<T>
-
search
public void search(@Nullable CteSearchClauseKind kind, @Nullable String searchAttributeName, @Nullable List<JpaSearchOrder> searchOrders) Description copied from interface:JpaCteCriteriaDefine the CTE search clause.- Specified by:
searchin interfaceJpaCteCriteria<T>
-
cycleUsing
public <X> void cycleUsing(@Nullable String cycleMarkAttributeName, @Nullable String cyclePathAttributeName, @Nullable X cycleValue, @Nullable X noCycleValue, @Nullable List<JpaCteCriteriaAttribute> cycleAttributes) Description copied from interface:JpaCteCriteriaDefine the CTE cycle clause with an explicit path attribute.- Specified by:
cycleUsingin interfaceJpaCteCriteria<T>
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
equals
-
hashCode
-
isCompatible
- Specified by:
isCompatiblein interfaceSqmCacheable
-
cacheHashCode
public int cacheHashCode()- Specified by:
cacheHashCodein interfaceSqmCacheable
-