Class SqmQuerySpec<T>
- java.lang.Object
-
- org.hibernate.query.sqm.tree.select.SqmQueryPart<T>
-
- org.hibernate.query.sqm.tree.select.SqmQuerySpec<T>
-
- All Implemented Interfaces:
Serializable
,JpaCriteriaNode
,JpaQueryPart<T>
,JpaQueryStructure<T>
,SqmFromClauseContainer
,SqmWhereClauseContainer
,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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SqmQuerySpec(NodeBuilder nodeBuilder)
SqmQuerySpec(SqmQuerySpec<T> original, SqmCopyContext context)
-
Method Summary
-
Methods inherited from class org.hibernate.query.sqm.tree.select.SqmQueryPart
copyTo, getFetch, getFetchClauseType, getFetchExpression, getOffset, getOffsetExpression, getOrderByClause, getSortSpecifications, nodeBuilder, setFetchExpression, setFetchExpression, setOffsetExpression, setOrderByClause
-
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.JpaQueryPart
getFetch, getFetchClauseType, getOffset, getSortSpecifications
-
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
-
SqmQuerySpec
public SqmQuerySpec(NodeBuilder nodeBuilder)
-
SqmQuerySpec
public SqmQuerySpec(SqmQuerySpec<T> original, SqmCopyContext context)
-
-
Method Detail
-
copy
public SqmQuerySpec<T> copy(SqmCopyContext context)
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in classSqmQueryPart<T>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
-
getFirstQuerySpec
public SqmQuerySpec<T> getFirstQuerySpec()
- Specified by:
getFirstQuerySpec
in classSqmQueryPart<T>
-
getLastQuerySpec
public SqmQuerySpec<T> getLastQuerySpec()
- Specified by:
getLastQuerySpec
in classSqmQueryPart<T>
-
isSimpleQueryPart
public boolean isSimpleQueryPart()
- Specified by:
isSimpleQueryPart
in classSqmQueryPart<T>
-
getFromClause
public SqmFromClause getFromClause()
Description copied from interface:SqmFromClauseContainer
Obtains this container's SqmFromClause.- Specified by:
getFromClause
in interfaceSqmFromClauseContainer
- Returns:
- This container's SqmFromClause.
-
setFromClause
public void setFromClause(SqmFromClause fromClause)
-
producesUniqueResults
public boolean producesUniqueResults()
-
containsCollectionFetches
public boolean containsCollectionFetches()
-
getSelectClause
public SqmSelectClause getSelectClause()
-
setSelectClause
public void setSelectClause(SqmSelectClause selectClause)
-
getWhereClause
public SqmWhereClause getWhereClause()
- Specified by:
getWhereClause
in interfaceSqmWhereClauseContainer
-
setWhereClause
public void setWhereClause(SqmWhereClause whereClause)
-
applyPredicate
public void applyPredicate(SqmPredicate predicate)
- Specified by:
applyPredicate
in interfaceSqmWhereClauseContainer
-
hasPositionalGroupItem
public boolean hasPositionalGroupItem()
-
getGroupByClauseExpressions
public List<SqmExpression<?>> getGroupByClauseExpressions()
-
setGroupByClauseExpressions
public void setGroupByClauseExpressions(List<SqmExpression<?>> groupByClauseExpressions)
-
getHavingClausePredicate
public SqmPredicate getHavingClausePredicate()
-
setHavingClausePredicate
public void setHavingClausePredicate(SqmPredicate havingClausePredicate)
-
isDistinct
public boolean isDistinct()
- Specified by:
isDistinct
in interfaceJpaQueryStructure<T>
-
setDistinct
public SqmQuerySpec<T> setDistinct(boolean distinct)
- Specified by:
setDistinct
in interfaceJpaQueryStructure<T>
-
getSelection
public JpaSelection<T> getSelection()
- Specified by:
getSelection
in interfaceJpaQueryStructure<T>
-
setSelection
public SqmQuerySpec<T> setSelection(JpaSelection<T> selection)
- Specified by:
setSelection
in interfaceJpaQueryStructure<T>
-
getRoots
public Set<SqmRoot<?>> getRoots()
- Specified by:
getRoots
in interfaceJpaQueryStructure<T>
-
getRootList
public List<SqmRoot<?>> getRootList()
- Specified by:
getRootList
in interfaceJpaQueryStructure<T>
-
addRoot
public SqmQuerySpec<T> addRoot(JpaRoot<?> root)
- Specified by:
addRoot
in interfaceJpaQueryStructure<T>
-
getRestriction
public SqmPredicate getRestriction()
- Specified by:
getRestriction
in interfaceJpaQueryStructure<T>
-
setRestriction
public SqmQuerySpec<T> setRestriction(JpaPredicate restriction)
- Specified by:
setRestriction
in interfaceJpaQueryStructure<T>
-
setRestriction
public SqmQuerySpec<T> setRestriction(Expression<Boolean> restriction)
- Specified by:
setRestriction
in interfaceJpaQueryStructure<T>
-
setRestriction
public SqmQuerySpec<T> setRestriction(Predicate... restrictions)
- Specified by:
setRestriction
in interfaceJpaQueryStructure<T>
-
getGroupingExpressions
public List<SqmExpression<?>> getGroupingExpressions()
- Specified by:
getGroupingExpressions
in interfaceJpaQueryStructure<T>
-
setGroupingExpressions
public SqmQuerySpec<T> setGroupingExpressions(List<? extends JpaExpression<?>> groupExpressions)
- Specified by:
setGroupingExpressions
in interfaceJpaQueryStructure<T>
-
setGroupingExpressions
public SqmQuerySpec<T> setGroupingExpressions(JpaExpression<?>... groupExpressions)
- Specified by:
setGroupingExpressions
in interfaceJpaQueryStructure<T>
-
getGroupRestriction
public SqmPredicate getGroupRestriction()
- Specified by:
getGroupRestriction
in interfaceJpaQueryStructure<T>
-
setGroupRestriction
public SqmQuerySpec<T> setGroupRestriction(JpaPredicate restriction)
- Specified by:
setGroupRestriction
in interfaceJpaQueryStructure<T>
-
setGroupRestriction
public SqmQuerySpec<T> setGroupRestriction(Expression<Boolean> restriction)
- Specified by:
setGroupRestriction
in interfaceJpaQueryStructure<T>
-
setGroupRestriction
public SqmQuerySpec<T> setGroupRestriction(Predicate... restrictions)
- Specified by:
setGroupRestriction
in interfaceJpaQueryStructure<T>
-
setSortSpecifications
public SqmQuerySpec<T> setSortSpecifications(List<? extends JpaOrder> sortSpecifications)
- Specified by:
setSortSpecifications
in interfaceJpaQueryPart<T>
- Specified by:
setSortSpecifications
in interfaceJpaQueryStructure<T>
- Overrides:
setSortSpecifications
in classSqmQueryPart<T>
-
setOffset
public SqmQuerySpec<T> setOffset(JpaExpression<? extends Number> offset)
- Specified by:
setOffset
in interfaceJpaQueryPart<T>
- Specified by:
setOffset
in interfaceJpaQueryStructure<T>
- Overrides:
setOffset
in classSqmQueryPart<T>
-
setFetch
public SqmQuerySpec<T> setFetch(JpaExpression<? extends Number> fetch)
- Specified by:
setFetch
in interfaceJpaQueryPart<T>
- Specified by:
setFetch
in interfaceJpaQueryStructure<T>
- Overrides:
setFetch
in classSqmQueryPart<T>
-
setFetch
public SqmQuerySpec<T> setFetch(JpaExpression<? extends Number> fetch, FetchClauseType fetchClauseType)
- Specified by:
setFetch
in interfaceJpaQueryPart<T>
- Specified by:
setFetch
in interfaceJpaQueryStructure<T>
- Overrides:
setFetch
in classSqmQueryPart<T>
-
validateQueryStructureAndFetchOwners
public void validateQueryStructureAndFetchOwners()
- Specified by:
validateQueryStructureAndFetchOwners
in classSqmQueryPart<T>
-
validateFetchOwners
public void validateFetchOwners()
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
- Overrides:
appendHqlString
in classSqmQueryPart<T>
-
whereClauseContains
@Internal public boolean whereClauseContains(NavigablePath navigablePath, SqmToSqlAstConverter sqlAstConverter)
-
groupByClauseContains
@Internal public boolean groupByClauseContains(NavigablePath navigablePath, SqmToSqlAstConverter sqlAstConverter)
-
orderByClauseContains
@Internal public boolean orderByClauseContains(NavigablePath navigablePath, SqmToSqlAstConverter sqlAstConverter)
-
-