Class SqmSubQuery<T>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.select.AbstractSqmSelectQuery<T>
org.hibernate.query.sqm.tree.select.SqmSubQuery<T>
- All Implemented Interfaces:
AbstractQuery<T>,CommonAbstractCriteria,CriteriaSelect<T>,Expression<T>,Selection<T>,Subquery<T>,TupleElement<T>,Serializable,JpaCriteriaBase,JpaCriteriaNode,JpaCriteriaSelect<T>,JpaCteContainer,JpaExpression<T>,JpaSelectCriteria<T>,JpaSelection<T>,JpaSubQuery<T>,JpaTupleElement<T>,SqmCteContainer,SqmExpression<T>,SqmSelectableNode<T>,SqmSelectQuery<T>,SqmExpressibleAccessor<T>,SqmNode,SqmQuery<T>,SqmTypedNode<T>,SqmVisitableNode
public class SqmSubQuery<T>
extends AbstractSqmSelectQuery<T>
implements SqmSelectQuery<T>, JpaSubQuery<T>, SqmExpression<T>
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmSubQuery(SqmQuery<?> parent, EntityType<T> resultType, NodeBuilder builder) SqmSubQuery(SqmQuery<?> parent, Class<T> resultType, NodeBuilder builder) SqmSubQuery(SqmQuery<?> parent, NodeBuilder builder) SqmSubQuery(SqmQuery<?> parent, SqmQueryPart<T> queryPart, Class<T> resultType, Map<String, SqmCteStatement<?>> cteStatements, NodeBuilder builder) SqmSubQuery(SqmQuery<?> parent, SqmQueryPart<T> queryPart, Class<T> resultType, NodeBuilder builder) -
Method Summary
Modifier and TypeMethodDescription<T1> T1accept(SemanticQueryWalker<T1> walker) Accept the walker per visitationvoidappendHqlString(StringBuilder hql, SqmRenderContext context) voidapplyInferableType(@Nullable SqmBindableType<?> type) Used to apply type information based on the expression's usage within the query.<X> SqmExpression<X> asDouble()asFloat()asLong()asString()<X> SqmExpression<X> copy(SqmCopyContext context) <X,Y> SqmCorrelatedBagJoin <X, Y> correlate(CollectionJoin<X, Y> parentCollection) <X,Y> SqmCorrelatedJoin <X, Y> <X,Y> SqmCorrelatedListJoin <X, Y> <X,K, V> SqmCorrelatedMapJoin <X, K, V> <Y> SqmRoot<Y> <X,Y> SqmCorrelatedSetJoin <X, Y> <X> SqmCorrelatedCrossJoin<X> correlate(JpaCrossJoin<X> parentCrossJoin) <X> JpaEntityJoin<T, X> correlate(JpaEntityJoin<T, X> parentEntityJoin) distinct(boolean distinct) booleanequalTo(Expression<?> that) fetch(Number fetch, FetchClauseType fetchClauseType) fetch(JpaExpression<? extends Number> fetch) fetch(JpaExpression<? extends Number> fetch, FetchClauseType fetchClauseType) getAlias()SqmQuery<?> <X> JpaCteCriteria<X> getCteCriteria(String cteName) Returns a CTE that is registered by the given name on this container, or any of its parents.getCteStatement(String cteLabel) getFetch()@Nullable SqmBindableType<T> The expression's type.List<? extends JpaSelection<?>> groupBy(Expression<?>... expressions) groupBy(List<Expression<?>> grouping) inthashCode()having(Expression<Boolean> booleanExpression) in(Expression<?>... values) in(Expression<Collection<?>> values) in(Collection<?> values) booleanisNull()multiselect(Selection<?>... selections) multiselect(List<Selection<?>> selectionList) notEqualTo(Expression<?> value) notEqualTo(Object value) offset(JpaExpression<? extends Number> offset) select(Expression<T> expression) <U> Subquery<U> subquery(EntityType<U> type) <U> SqmSubQuery<U> 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
copyCteStatements, from, from, from, from, from, getCteCriterias, getCteStatements, getGroupList, getGroupRestriction, getQueryPart, getQuerySpec, getRestriction, getResultSelection, getResultType, getRoot, getRoot, getRootList, getRoots, 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.JpaCteContainer
getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from interface org.hibernate.query.criteria.JpaSelectCriteria
from, from, from, from, from, getGroupRestriction, getRestrictionMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaTypeName, isEnumMethods inherited from interface org.hibernate.query.sqm.tree.cte.SqmCteContainer
getCteStatementsMethods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
castAs, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectQuery
getQueryPart, getQuerySpecMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
-
Constructor Details
-
SqmSubQuery
public SqmSubQuery(SqmQuery<?> parent, SqmQueryPart<T> queryPart, Class<T> resultType, NodeBuilder builder) -
SqmSubQuery
public SqmSubQuery(SqmQuery<?> parent, SqmQueryPart<T> queryPart, Class<T> resultType, Map<String, SqmCteStatement<?>> cteStatements, NodeBuilder builder) -
SqmSubQuery
-
SqmSubQuery
-
SqmSubQuery
-
-
Method Details
-
copy
- Specified by:
copyin interfaceSqmExpression<T>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmQuery<T>- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmSelectQuery<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
getTupleLength
- Specified by:
getTupleLengthin interfaceSqmSelectableNode<T>
-
getCteStatement
- Specified by:
getCteStatementin interfaceSqmCteContainer- Overrides:
getCteStatementin classAbstractSqmSelectQuery<T>
-
getCteCriteria
Description copied from interface:JpaCteContainerReturns a CTE that is registered by the given name on this container, or any of its parents.- Specified by:
getCteCriteriain interfaceJpaCteContainer- Overrides:
getCteCriteriain classAbstractSqmSelectQuery<T>
-
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>
-
getContainingQuery
- Specified by:
getContainingQueryin interfaceSubquery<T>
-
getParent
-
getAlias
- Specified by:
getAliasin interfaceTupleElement<T>
-
alias
-
select
-
multiselect
- Specified by:
multiselectin interfaceJpaSubQuery<T>
-
multiselect
- Specified by:
multiselectin interfaceJpaSubQuery<T>
-
getSelection
- Specified by:
getSelectionin interfaceAbstractQuery<T>- Specified by:
getSelectionin interfaceJpaSelectCriteria<T>- Specified by:
getSelectionin interfaceJpaSubQuery<T>- Specified by:
getSelectionin interfaceSubquery<T>- Overrides:
getSelectionin classAbstractSqmSelectQuery<T>
-
isCompoundSelection
public boolean isCompoundSelection()- Specified by:
isCompoundSelectionin interfaceSelection<T>
-
getSelectionItems
- Specified by:
getSelectionItemsin interfaceJpaSelection<T>
-
getCompoundSelectionItems
- Specified by:
getCompoundSelectionItemsin interfaceJpaSelection<T>- Specified by:
getCompoundSelectionItemsin interfaceSelection<T>
-
distinct
- Specified by:
distinctin interfaceAbstractQuery<T>- Specified by:
distinctin interfaceJpaSelectCriteria<T>- Specified by:
distinctin interfaceJpaSubQuery<T>- Specified by:
distinctin interfaceSqmSelectQuery<T>- Specified by:
distinctin interfaceSubquery<T>- Overrides:
distinctin classAbstractSqmSelectQuery<T>
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceJpaSelectCriteria<T>- Specified by:
wherein interfaceJpaSubQuery<T>- Specified by:
wherein interfaceSubquery<T>- Overrides:
wherein classAbstractSqmSelectQuery<T>
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceJpaSelectCriteria<T>- Specified by:
wherein interfaceJpaSubQuery<T>- Specified by:
wherein interfaceSubquery<T>- Overrides:
wherein classAbstractSqmSelectQuery<T>
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceSubquery<T>- Overrides:
wherein classAbstractSqmSelectQuery<T>
-
groupBy
- Specified by:
groupByin interfaceAbstractQuery<T>- Specified by:
groupByin interfaceJpaSelectCriteria<T>- Specified by:
groupByin interfaceJpaSubQuery<T>- Specified by:
groupByin interfaceSubquery<T>- Overrides:
groupByin classAbstractSqmSelectQuery<T>
-
groupBy
- Specified by:
groupByin interfaceAbstractQuery<T>- Specified by:
groupByin interfaceJpaSelectCriteria<T>- Specified by:
groupByin interfaceJpaSubQuery<T>- Specified by:
groupByin interfaceSubquery<T>- Overrides:
groupByin classAbstractSqmSelectQuery<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceJpaSelectCriteria<T>- Specified by:
havingin interfaceJpaSubQuery<T>- Specified by:
havingin interfaceSubquery<T>- Overrides:
havingin classAbstractSqmSelectQuery<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceJpaSelectCriteria<T>- Specified by:
havingin interfaceJpaSubQuery<T>- Specified by:
havingin interfaceSubquery<T>- Overrides:
havingin classAbstractSqmSelectQuery<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceSubquery<T>- Overrides:
havingin classAbstractSqmSelectQuery<T>
-
getOffset
- Specified by:
getOffsetin interfaceJpaSubQuery<T>
-
offset
- Specified by:
offsetin interfaceJpaSubQuery<T>
-
offset
- Specified by:
offsetin interfaceJpaSubQuery<T>
-
getFetch
- Specified by:
getFetchin interfaceJpaSubQuery<T>
-
fetch
- Specified by:
fetchin interfaceJpaSubQuery<T>
-
fetch
- Specified by:
fetchin interfaceJpaSubQuery<T>
-
fetch
- Specified by:
fetchin interfaceJpaSubQuery<T>
-
fetch
- Specified by:
fetchin interfaceJpaSubQuery<T>
-
getFetchClauseType
- Specified by:
getFetchClauseTypein interfaceJpaSubQuery<T>
-
getOrderList
- Specified by:
getOrderListin interfaceJpaSubQuery<T>
-
orderBy
- Specified by:
orderByin interfaceJpaSubQuery<T>
-
orderBy
- Specified by:
orderByin interfaceJpaSubQuery<T>
-
correlate
-
correlate
-
correlate
-
correlate
-
correlate
-
correlate
-
correlate
- Specified by:
correlatein interfaceJpaSubQuery<T>
-
correlate
- Specified by:
correlatein interfaceJpaSubQuery<T>
-
isNull
- Specified by:
isNullin interfaceExpression<T>- Specified by:
isNullin interfaceJpaExpression<T>- Specified by:
isNullin interfaceSqmExpression<T>
-
isNotNull
- Specified by:
isNotNullin interfaceExpression<T>- Specified by:
isNotNullin interfaceJpaExpression<T>- Specified by:
isNotNullin interfaceSqmExpression<T>
-
equalTo
- Specified by:
equalToin interfaceExpression<T>- Specified by:
equalToin interfaceJpaExpression<T>- Specified by:
equalToin interfaceSqmExpression<T>
-
equalTo
- Specified by:
equalToin interfaceExpression<T>- Specified by:
equalToin interfaceJpaExpression<T>- Specified by:
equalToin interfaceSqmExpression<T>
-
in
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Specified by:
inin interfaceSqmExpression<T>
-
in
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Specified by:
inin interfaceSqmExpression<T>
-
in
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Specified by:
inin interfaceSqmExpression<T>
-
in
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Specified by:
inin interfaceSqmExpression<T>
-
getNodeType
Description copied from interface:SqmExpressionThe expression's type.Can change as a result of calls to
SqmExpression.applyInferableType(org.hibernate.query.sqm.SqmBindableType<?>)- Specified by:
getNodeTypein interfaceSqmExpression<T>- Specified by:
getNodeTypein interfaceSqmTypedNode<T>
-
applyInferableType
Description copied from interface:SqmExpressionUsed to apply type information based on the expression's usage within the query.- Specified by:
applyInferableTypein interfaceSqmExpression<T>
-
asLong
- Specified by:
asLongin interfaceJpaExpression<T>- Specified by:
asLongin interfaceSqmExpression<T>
-
asInteger
- Specified by:
asIntegerin interfaceJpaExpression<T>- Specified by:
asIntegerin interfaceSqmExpression<T>
-
asFloat
- Specified by:
asFloatin interfaceJpaExpression<T>- Specified by:
asFloatin interfaceSqmExpression<T>
-
asDouble
- Specified by:
asDoublein interfaceJpaExpression<T>- Specified by:
asDoublein interfaceSqmExpression<T>
-
asBigDecimal
- Specified by:
asBigDecimalin interfaceJpaExpression<T>- Specified by:
asBigDecimalin interfaceSqmExpression<T>
-
asBigInteger
- Specified by:
asBigIntegerin interfaceJpaExpression<T>- Specified by:
asBigIntegerin interfaceSqmExpression<T>
-
asString
- Specified by:
asStringin interfaceJpaExpression<T>- Specified by:
asStringin interfaceSqmExpression<T>
-
as
- Specified by:
asin interfaceExpression<T>- Specified by:
asin interfaceJpaExpression<T>- Specified by:
asin interfaceSqmExpression<T>
-
getJavaTypeDescriptor
- Specified by:
getJavaTypeDescriptorin interfaceJpaTupleElement<T>
-
getJavaType
- Specified by:
getJavaTypein interfaceJpaTupleElement<T>- Specified by:
getJavaTypein interfaceTupleElement<T>
-
subquery
- Specified by:
subqueryin interfaceCommonAbstractCriteria- Specified by:
subqueryin interfaceJpaCriteriaBase
-
subquery
- Specified by:
subqueryin interfaceCommonAbstractCriteria
-
getParameters
- Specified by:
getParametersin interfaceCommonAbstractCriteria
-
notEqualTo
- Specified by:
notEqualToin interfaceExpression<T>- Specified by:
notEqualToin interfaceJpaExpression<T>- Specified by:
notEqualToin interfaceSqmExpression<T>
-
notEqualTo
- Specified by:
notEqualToin interfaceExpression<T>- Specified by:
notEqualToin interfaceJpaExpression<T>- Specified by:
notEqualToin interfaceSqmExpression<T>
-
cast
- Specified by:
castin interfaceExpression<T>- Specified by:
castin interfaceJpaExpression<T>- Specified by:
castin interfaceSqmExpression<T>
-
asLoggableText
- Specified by:
asLoggableTextin interfaceSqmNode
-
accept
Description copied from interface:SqmVisitableNodeAccept the walker per visitation- Specified by:
acceptin interfaceSqmVisitableNode
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode- Overrides:
appendHqlStringin classAbstractSqmSelectQuery<T>
-
equals
- Overrides:
equalsin classAbstractSqmSelectQuery<T>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractSqmSelectQuery<T>
-
generateAlias
- Specified by:
generateAliasin interfaceSqmQuery<T>
-