Class SqmQuerySpec<T>
java.lang.Object
org.hibernate.query.sqm.tree.spi.select.SqmQueryPart<T>
org.hibernate.query.sqm.tree.spi.select.SqmQuerySpec<T>
- All Implemented Interfaces:
Serializable, JpaCriteriaNode, JpaQueryPart<T>, JpaQueryStructure<T>, SqmFromClauseContainer, SqmWhereClauseContainer, SqmCacheable, SqmNode, SqmVisitableNode
public class SqmQuerySpec<T>
extends SqmQueryPart<T>
implements SqmNode, SqmFromClauseContainer, SqmWhereClauseContainer, JpaQueryStructure<T>
Defines the commonality between a root query and a subquery.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmQuerySpec(NodeBuilder nodeBuilder) SqmQuerySpec(SqmQuerySpec<T> original, SqmCopyContext context) -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationAdd a query root.voidappendHqlString(StringBuilder hql, SqmRenderContext context) voidapplyPredicate(SqmPredicate predicate) intbooleancopy(SqmCopyContext context) booleanObtains this container's SqmFromClause.List<SqmExpression<?>> List<SqmExpression<?>> Return the grouping expressions.Return the group restriction.Set the restriction.Return the query roots as a list.getRoots()Return the query roots.Return the query selection.booleangroupByClauseContains(NavigablePath navigablePath, SqmToSqlAstConverter sqlAstConverter) inthashCode()booleanbooleanisCompatible(Object object) booleanReturn whether duplicate query results are eliminated.booleanbooleanorderByClauseContains(NavigablePath navigablePath, SqmToSqlAstConverter sqlAstConverter) booleansetDistinct(boolean distinct) Set whether duplicate query results are eliminated.setFetch(JpaExpression<? extends Number> fetch) Set the query fetch limit.setFetch(JpaExpression<? extends Number> fetch, FetchClauseType fetchClauseType) Set the query fetch limit.voidsetFromClause(SqmFromClause fromClause) voidsetGroupByClauseExpressions(List<SqmExpression<?>> groupByClauseExpressions) setGroupingExpressions(Expression<?>... groupExpressions) Set the grouping expressions.setGroupingExpressions(List<? extends Expression<?>> groupExpressions) Set the grouping expressions.setGroupRestriction(BooleanExpression... restrictions) Set the group restriction.setGroupRestriction(Expression<Boolean> restriction) Set the group restriction.setGroupRestriction(Predicate... restrictions) Set the group restriction.setGroupRestriction(List<Predicate> restrictions) Set the group restriction.setGroupRestriction(JpaPredicate restriction) Set the group restriction.voidsetHavingClausePredicate(SqmPredicate havingClausePredicate) setOffset(JpaExpression<? extends Number> offset) Set the query offset.setRestriction(BooleanExpression... restrictions) Set the restriction.setRestriction(Expression<Boolean> restriction) Set the restriction.setRestriction(Predicate... restrictions) Set the restriction.setRestriction(List<Predicate> restrictions) Set the restriction.setRestriction(JpaPredicate restriction) voidsetSelectClause(SqmSelectClause selectClause) setSelection(JpaSelection<T> selection) Set the query selection.setSortSpecifications(List<? extends JpaOrder> sortSpecifications) Set the ordering specifications.voidsetWhereClause(SqmWhereClause whereClause) voidvoidbooleanwhereClauseContains(NavigablePath navigablePath, SqmToSqlAstConverter sqlAstConverter) Methods inherited from class SqmQueryPart
copyTo, getFetch, getFetchClauseType, getFetchExpression, getOffset, getOffsetExpression, getOrderByClause, getSortSpecifications, nodeBuilder, setFetchExpression, setFetchExpression, setOffsetExpression, setOrderByClauseMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JpaQueryPart
getFetch, getFetchClauseType, getOffset, getSortSpecificationsMethods inherited from interface SqmNode
asLoggableText, nodeBuilderMethods inherited from interface SqmVisitableNode
toHqlString
-
Constructor Details
-
SqmQuerySpec
-
SqmQuerySpec
-
-
Method Details
-
copy
- Specified by:
copyin interfaceSqmNode- Specified by:
copyin classSqmQueryPart<T>
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
getFirstQuerySpec
- Specified by:
getFirstQuerySpecin classSqmQueryPart<T>
-
getLastQuerySpec
- Specified by:
getLastQuerySpecin classSqmQueryPart<T>
-
isSimpleQueryPart
public boolean isSimpleQueryPart()- Specified by:
isSimpleQueryPartin classSqmQueryPart<T>
-
getFromClause
Description copied from interface:SqmFromClauseContainerObtains this container's SqmFromClause.- Specified by:
getFromClausein interfaceSqmFromClauseContainer- Returns:
- This container's SqmFromClause.
-
setFromClause
-
producesUniqueResults
public boolean producesUniqueResults() -
containsCollectionFetches
public boolean containsCollectionFetches() -
getSelectClause
-
setSelectClause
-
getWhereClause
- Specified by:
getWhereClausein interfaceSqmWhereClauseContainer
-
setWhereClause
-
applyPredicate
- Specified by:
applyPredicatein interfaceSqmWhereClauseContainer
-
hasPositionalGroupItem
public boolean hasPositionalGroupItem() -
getGroupByClauseExpressions
-
setGroupByClauseExpressions
-
getHavingClausePredicate
-
setHavingClausePredicate
-
isDistinct
public boolean isDistinct()Description copied from interface:JpaQueryStructureReturn whether duplicate query results are eliminated.- Specified by:
isDistinctin interfaceJpaQueryStructure<T>
-
setDistinct
Description copied from interface:JpaQueryStructureSet whether duplicate query results are eliminated.- Specified by:
setDistinctin interfaceJpaQueryStructure<T>
-
getSelection
Description copied from interface:JpaQueryStructureReturn the query selection.- Specified by:
getSelectionin interfaceJpaQueryStructure<T>
-
setSelection
Description copied from interface:JpaQueryStructureSet the query selection.- Specified by:
setSelectionin interfaceJpaQueryStructure<T>
-
getRoots
Description copied from interface:JpaQueryStructureReturn the query roots.- Specified by:
getRootsin interfaceJpaQueryStructure<T>
-
getRootList
Description copied from interface:JpaQueryStructureReturn the query roots as a list.- Specified by:
getRootListin interfaceJpaQueryStructure<T>
-
addRoot
Description copied from interface:JpaQueryStructureAdd a query root.- Specified by:
addRootin interfaceJpaQueryStructure<T>
-
getRestriction
Description copied from interface:JpaQueryStructureSet the restriction.- Specified by:
getRestrictionin interfaceJpaQueryStructure<T>
-
setRestriction
- Specified by:
setRestrictionin interfaceJpaQueryStructure<T>
-
setRestriction
Description copied from interface:JpaQueryStructureSet the restriction.- Specified by:
setRestrictionin interfaceJpaQueryStructure<T>
-
setRestriction
Description copied from interface:JpaQueryStructureSet the restriction.- Specified by:
setRestrictionin interfaceJpaQueryStructure<T>
-
setRestriction
Description copied from interface:JpaQueryStructureSet the restriction.- Specified by:
setRestrictionin interfaceJpaQueryStructure<T>
-
setRestriction
Description copied from interface:JpaQueryStructureSet the restriction.- Specified by:
setRestrictionin interfaceJpaQueryStructure<T>
-
getGroupingExpressions
Description copied from interface:JpaQueryStructureReturn the grouping expressions.- Specified by:
getGroupingExpressionsin interfaceJpaQueryStructure<T>
-
setGroupingExpressions
@Nonnull public SqmQuerySpec<T> setGroupingExpressions(@Nonnull List<? extends Expression<?>> groupExpressions) Description copied from interface:JpaQueryStructureSet the grouping expressions.- Specified by:
setGroupingExpressionsin interfaceJpaQueryStructure<T>
-
setGroupingExpressions
Description copied from interface:JpaQueryStructureSet the grouping expressions.- Specified by:
setGroupingExpressionsin interfaceJpaQueryStructure<T>
-
getGroupRestriction
Description copied from interface:JpaQueryStructureReturn the group restriction.- Specified by:
getGroupRestrictionin interfaceJpaQueryStructure<T>
-
setGroupRestriction
Description copied from interface:JpaQueryStructureSet the group restriction.- Specified by:
setGroupRestrictionin interfaceJpaQueryStructure<T>
-
setGroupRestriction
Description copied from interface:JpaQueryStructureSet the group restriction.- Specified by:
setGroupRestrictionin interfaceJpaQueryStructure<T>
-
setGroupRestriction
Description copied from interface:JpaQueryStructureSet the group restriction.- Specified by:
setGroupRestrictionin interfaceJpaQueryStructure<T>
-
setGroupRestriction
Description copied from interface:JpaQueryStructureSet the group restriction.- Specified by:
setGroupRestrictionin interfaceJpaQueryStructure<T>
-
setGroupRestriction
Description copied from interface:JpaQueryStructureSet the group restriction.- Specified by:
setGroupRestrictionin interfaceJpaQueryStructure<T>
-
setSortSpecifications
@Nonnull public SqmQuerySpec<T> setSortSpecifications(@Nonnull List<? extends JpaOrder> sortSpecifications) Description copied from interface:JpaQueryPartSet the ordering specifications.- Specified by:
setSortSpecificationsin interfaceJpaQueryPart<T>- Specified by:
setSortSpecificationsin interfaceJpaQueryStructure<T>- Overrides:
setSortSpecificationsin classSqmQueryPart<T>
-
setOffset
Description copied from interface:JpaQueryPartSet the query offset.- Specified by:
setOffsetin interfaceJpaQueryPart<T>- Specified by:
setOffsetin interfaceJpaQueryStructure<T>- Overrides:
setOffsetin classSqmQueryPart<T>
-
setFetch
Description copied from interface:JpaQueryPartSet the query fetch limit.- Specified by:
setFetchin interfaceJpaQueryPart<T>- Specified by:
setFetchin interfaceJpaQueryStructure<T>- Overrides:
setFetchin classSqmQueryPart<T>
-
setFetch
@Nonnull public SqmQuerySpec<T> setFetch(@Nullable JpaExpression<? extends Number> fetch, @Nonnull FetchClauseType fetchClauseType) Description copied from interface:JpaQueryPartSet the query fetch limit.- Specified by:
setFetchin interfaceJpaQueryPart<T>- Specified by:
setFetchin interfaceJpaQueryStructure<T>- Overrides:
setFetchin classSqmQueryPart<T>
-
validateQueryStructureAndFetchOwners
public void validateQueryStructureAndFetchOwners()- Specified by:
validateQueryStructureAndFetchOwnersin classSqmQueryPart<T>
-
validateFetchOwners
public void validateFetchOwners() -
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classSqmQueryPart<T>
-
equals
- Overrides:
equalsin classSqmQueryPart<T>
-
hashCode
public int hashCode()- Overrides:
hashCodein classSqmQueryPart<T>
-
isCompatible
- Specified by:
isCompatiblein interfaceSqmCacheable- Overrides:
isCompatiblein classSqmQueryPart<T>
-
cacheHashCode
public int cacheHashCode()- Specified by:
cacheHashCodein interfaceSqmCacheable- Overrides:
cacheHashCodein classSqmQueryPart<T>
-