Class SqmSelectStatement<T>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.select.AbstractSqmSelectQuery<T>
org.hibernate.query.sqm.tree.select.SqmSelectStatement<T>
- All Implemented Interfaces:
AbstractQuery<T>,CommonAbstractCriteria,CriteriaQuery<T>,CriteriaSelect<T>,Serializable,JpaCriteriaBase,JpaCriteriaNode,JpaCriteriaQuery<T>,JpaCriteriaSelect<T>,JpaCteContainer,JpaQueryableCriteria<T>,JpaSelectCriteria<T>,ParameterCollector,SqmCteContainer,SqmSelectQuery<T>,SqmNode,SqmQuery<T>,SqmStatement<T>,SqmVisitableNode
public class SqmSelectStatement<T>
extends AbstractSqmSelectQuery<T>
implements JpaCriteriaQuery<T>, SqmStatement<T>, ParameterCollector
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.query.sqm.tree.SqmStatement
SqmStatement.ParameterResolutions -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmSelectStatement(Class<T> resultJavaType, NodeBuilder nodeBuilder) SqmSelectStatement(Class<T> resultJavaType, SqmQuerySource querySource, NodeBuilder nodeBuilder) SqmSelectStatement(NodeBuilder nodeBuilder) SqmSelectStatement(SqmQuerySource querySource, NodeBuilder nodeBuilder) SqmSelectStatement(SqmQueryPart<T> queryPart, Class<T> resultType, Map<String, SqmCteStatement<?>> cteStatements, SqmQuerySource querySource, NodeBuilder builder) SqmSelectStatement(SqmQueryPart<T> queryPart, Class<T> resultType, SqmQuerySource querySource, NodeBuilder builder) SqmSelectStatement(SqmSelectStatement<T> original) -
Method Summary
Modifier and TypeMethodDescription<X> Xaccept(SemanticQueryWalker<X> walker) Accept the walker per visitationvoidaddParameter(SqmParameter<?> parameter) booleancopy(SqmCopyContext context) <X> SqmSelectStatement<X> createCopy(SqmCopyContext context, Class<X> resultType) A query that returns the number of results of this query.A query that returnstrueif this query has any results.distinct(boolean distinct) fetch(Number fetch, FetchClauseType fetchClauseType) fetch(JpaExpression<? extends Number> fetch) fetch(JpaExpression<? extends Number> fetch, FetchClauseType fetchClauseType) getFetch()The query structure.Set<SqmParameter<?>> Access to the (potentially still growing) collection of parameters for the statement.groupBy(Expression<?>... expressions) groupBy(List<Expression<?>> grouping) having(Expression<Boolean> booleanExpression) multiselect(Selection<?>... selections) Deprecated.multiselect(List<Selection<?>> selectionList) Deprecated.offset(JpaExpression<? extends Number> offset) boolean<U> SqmSubQuery<U> subquery(EntityType<U> type) <U> SqmSubQuery<U> booleanvoidvalidateResultType(Class<?> resultType) where(Expression<Boolean> restriction) protected <X> JpaCteCriteria<X> withInternal(String name, AbstractQuery<X> criteria) protected <X> JpaCteCriteria<X> withInternal(String name, AbstractQuery<X> baseCriteria, boolean unionDistinct, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer) Methods inherited from class org.hibernate.query.sqm.tree.select.AbstractSqmSelectQuery
appendHqlString, copyCteStatements, equals, from, from, from, from, from, getCteCriteria, getCteCriterias, getCteStatement, getCteStatements, getGroupList, getGroupRestriction, getQueryPart, getRestriction, getResultSelection, getResultType, getRoot, getRoot, getRootList, getRoots, getSelection, hashCode, isDistinct, setQueryPart, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.persistence.criteria.AbstractQuery
getGroupList, getResultType, getRoots, isDistinctMethods inherited from interface org.hibernate.query.criteria.JpaCriteriaQuery
from, from, getRoot, getRoot, getRootListMethods inherited from interface org.hibernate.query.criteria.JpaCteContainer
getCteCriteria, getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from interface org.hibernate.query.criteria.JpaSelectCriteria
from, from, from, getGroupRestriction, getRestriction, getSelectionMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
appendHqlString, toHqlString
-
Constructor Details
-
SqmSelectStatement
-
SqmSelectStatement
-
SqmSelectStatement
public SqmSelectStatement(Class<T> resultJavaType, SqmQuerySource querySource, NodeBuilder nodeBuilder) -
SqmSelectStatement
public SqmSelectStatement(SqmQueryPart<T> queryPart, Class<T> resultType, SqmQuerySource querySource, NodeBuilder builder) -
SqmSelectStatement
public SqmSelectStatement(SqmQueryPart<T> queryPart, Class<T> resultType, Map<String, SqmCteStatement<?>> cteStatements, SqmQuerySource querySource, NodeBuilder builder) -
SqmSelectStatement
- Implementation Note:
- This form is used from the criteria query API.
-
SqmSelectStatement
- Implementation Note:
- This form is used when transforming HQL to criteria. All it does is change the SqmQuerySource to CRITERIA in order to allow correct parameter handing.
-
-
Method Details
-
copy
-
createCopy
-
validateResultType
-
getCriteriaBuilder
- Specified by:
getCriteriaBuilderin interfaceJpaCriteriaQuery<T>
-
getOrderList
- Specified by:
getOrderListin interfaceCriteriaQuery<T>
-
getQuerySource
- Specified by:
getQuerySourcein interfaceSqmStatement<T>
-
getQuerySpec
Description copied from interface:JpaSelectCriteriaThe query structure. SeeJpaQueryStructurefor details- Specified by:
getQuerySpecin interfaceJpaSelectCriteria<T>- Specified by:
getQuerySpecin interfaceSqmSelectQuery<T>- Overrides:
getQuerySpecin classAbstractSqmSelectQuery<T>
-
producesUniqueResults
public boolean producesUniqueResults() -
containsCollectionFetches
public boolean containsCollectionFetches() -
usesDistinct
public boolean usesDistinct() -
getSqmParameters
Description copied from interface:SqmStatementAccess to the (potentially still growing) collection of parameters for the statement.- Specified by:
getSqmParametersin interfaceSqmStatement<T>
-
resolveParameters
- Specified by:
resolveParametersin interfaceSqmStatement<T>
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
addParameter
- Specified by:
addParameterin interfaceParameterCollector
-
withInternal
- Overrides:
withInternalin classAbstractSqmSelectQuery<T>
-
withInternal
protected <X> JpaCteCriteria<X> withInternal(String name, AbstractQuery<X> baseCriteria, boolean unionDistinct, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer) - Overrides:
withInternalin classAbstractSqmSelectQuery<T>
-
distinct
- Specified by:
distinctin interfaceAbstractQuery<T>- Specified by:
distinctin interfaceCriteriaQuery<T>- Specified by:
distinctin interfaceJpaCriteriaQuery<T>- Specified by:
distinctin interfaceJpaSelectCriteria<T>- Specified by:
distinctin interfaceSqmSelectQuery<T>- Overrides:
distinctin classAbstractSqmSelectQuery<T>
-
getParameters
Description copied from interface:JpaCriteriaQuery- Specified by:
getParametersin interfaceCommonAbstractCriteria- Specified by:
getParametersin interfaceJpaCriteriaQuery<T>
-
subquery
- Specified by:
subqueryin interfaceCommonAbstractCriteria- Specified by:
subqueryin interfaceJpaCriteriaQuery<T>
-
select
- Specified by:
selectin interfaceCriteriaQuery<T>- Specified by:
selectin interfaceJpaCriteriaQuery<T>
-
multiselect
Deprecated.- Specified by:
multiselectin interfaceCriteriaQuery<T>- Specified by:
multiselectin interfaceJpaCriteriaQuery<T>
-
multiselect
Deprecated.- Specified by:
multiselectin interfaceCriteriaQuery<T>- Specified by:
multiselectin interfaceJpaCriteriaQuery<T>
-
orderBy
- Specified by:
orderByin interfaceCriteriaQuery<T>- Specified by:
orderByin interfaceJpaCriteriaQuery<T>
-
orderBy
- Specified by:
orderByin interfaceCriteriaQuery<T>- Specified by:
orderByin interfaceJpaCriteriaQuery<T>
-
subquery
- Specified by:
subqueryin interfaceCommonAbstractCriteria- Specified by:
subqueryin interfaceJpaCriteriaBase
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceCriteriaQuery<T>- Specified by:
wherein interfaceJpaCriteriaQuery<T>- Specified by:
wherein interfaceJpaSelectCriteria<T>- Overrides:
wherein classAbstractSqmSelectQuery<T>
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceCriteriaQuery<T>- Specified by:
wherein interfaceJpaCriteriaQuery<T>- Specified by:
wherein interfaceJpaSelectCriteria<T>- Overrides:
wherein classAbstractSqmSelectQuery<T>
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceCriteriaQuery<T>- Specified by:
wherein interfaceJpaCriteriaQuery<T>- Overrides:
wherein classAbstractSqmSelectQuery<T>
-
groupBy
- Specified by:
groupByin interfaceAbstractQuery<T>- Specified by:
groupByin interfaceCriteriaQuery<T>- Specified by:
groupByin interfaceJpaCriteriaQuery<T>- Specified by:
groupByin interfaceJpaSelectCriteria<T>- Overrides:
groupByin classAbstractSqmSelectQuery<T>
-
groupBy
- Specified by:
groupByin interfaceAbstractQuery<T>- Specified by:
groupByin interfaceCriteriaQuery<T>- Specified by:
groupByin interfaceJpaCriteriaQuery<T>- Specified by:
groupByin interfaceJpaSelectCriteria<T>- Overrides:
groupByin classAbstractSqmSelectQuery<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceCriteriaQuery<T>- Specified by:
havingin interfaceJpaCriteriaQuery<T>- Specified by:
havingin interfaceJpaSelectCriteria<T>- Overrides:
havingin classAbstractSqmSelectQuery<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceCriteriaQuery<T>- Specified by:
havingin interfaceJpaCriteriaQuery<T>- Specified by:
havingin interfaceJpaSelectCriteria<T>- Overrides:
havingin classAbstractSqmSelectQuery<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceCriteriaQuery<T>- Specified by:
havingin interfaceJpaCriteriaQuery<T>- Overrides:
havingin classAbstractSqmSelectQuery<T>
-
getOffset
- Specified by:
getOffsetin interfaceJpaCriteriaQuery<T>
-
offset
- Specified by:
offsetin interfaceJpaCriteriaQuery<T>
-
offset
- Specified by:
offsetin interfaceJpaCriteriaQuery<T>
-
getFetch
- Specified by:
getFetchin interfaceJpaCriteriaQuery<T>
-
fetch
- Specified by:
fetchin interfaceJpaCriteriaQuery<T>
-
fetch
public JpaCriteriaQuery<T> fetch(JpaExpression<? extends Number> fetch, FetchClauseType fetchClauseType) - Specified by:
fetchin interfaceJpaCriteriaQuery<T>
-
fetch
- Specified by:
fetchin interfaceJpaCriteriaQuery<T>
-
fetch
- Specified by:
fetchin interfaceJpaCriteriaQuery<T>
-
getFetchClauseType
- Specified by:
getFetchClauseTypein interfaceJpaCriteriaQuery<T>
-
createCountQuery
Description copied from interface:JpaCriteriaQueryA query that returns the number of results of this query.- Specified by:
createCountQueryin interfaceJpaCriteriaQuery<T>- See Also:
-
createExistsQuery
Description copied from interface:JpaCriteriaQueryA query that returnstrueif this query has any results.- Specified by:
createExistsQueryin interfaceJpaCriteriaQuery<T>
-
generateAlias
- Specified by:
generateAliasin interfaceSqmQuery<T>
-