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> T1
accept
(SemanticQueryWalker<T1> walker) Accept the walker per visitationvoid
void
applyInferableType
(@Nullable SqmExpressible<?> 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) equalTo
(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 SqmExpressible<T>
The expression's type.List<? extends JpaSelection<?>>
groupBy
(Expression<?>... expressions) groupBy
(List<Expression<?>> grouping) having
(Expression<Boolean> booleanExpression) in
(Expression<?>... values) in
(Expression<Collection<?>> values) in
(Collection<?> values) boolean
isNull()
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, getRootList, getRoots, isDistinct, setQueryPart, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinct
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.persistence.criteria.AbstractQuery
getGroupList, getResultType, getRoots, isDistinct
Methods inherited from interface org.hibernate.query.criteria.JpaCteContainer
getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinct
Methods inherited from interface org.hibernate.query.criteria.JpaSelectCriteria
from, from, from, from, from, getGroupRestriction, getRestriction
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaTypeName, isEnum
Methods inherited from interface org.hibernate.query.sqm.tree.cte.SqmCteContainer
getCteStatements
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
castAs, visitSubSelectableNodes
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
nodeBuilder
Methods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectQuery
getQueryPart, getQuerySpec
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaType
Methods 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:
copy
in interfaceSqmExpression<T>
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmQuery<T>
- Specified by:
copy
in interfaceSqmSelectableNode<T>
- Specified by:
copy
in interfaceSqmSelectQuery<T>
- Specified by:
copy
in interfaceSqmTypedNode<T>
-
getTupleLength
- Specified by:
getTupleLength
in interfaceSqmSelectableNode<T>
-
getCteStatement
- Specified by:
getCteStatement
in interfaceSqmCteContainer
- Overrides:
getCteStatement
in classAbstractSqmSelectQuery<T>
-
getCteCriteria
Description copied from interface:JpaCteContainer
Returns a CTE that is registered by the given name on this container, or any of its parents.- Specified by:
getCteCriteria
in interfaceJpaCteContainer
- Overrides:
getCteCriteria
in classAbstractSqmSelectQuery<T>
-
withInternal
- Overrides:
withInternal
in classAbstractSqmSelectQuery<T>
-
withInternal
protected <X> JpaCteCriteria<X> withInternal(String name, AbstractQuery<X> baseCriteria, boolean unionDistinct, Function<JpaCteCriteria<X>, AbstractQuery<X>> recursiveCriteriaProducer) - Overrides:
withInternal
in classAbstractSqmSelectQuery<T>
-
getContainingQuery
- Specified by:
getContainingQuery
in interfaceSubquery<T>
-
getParent
-
getAlias
- Specified by:
getAlias
in interfaceTupleElement<T>
-
alias
-
select
-
multiselect
- Specified by:
multiselect
in interfaceJpaSubQuery<T>
-
multiselect
- Specified by:
multiselect
in interfaceJpaSubQuery<T>
-
getSelection
- Specified by:
getSelection
in interfaceAbstractQuery<T>
- Specified by:
getSelection
in interfaceJpaSelectCriteria<T>
- Specified by:
getSelection
in interfaceJpaSubQuery<T>
- Specified by:
getSelection
in interfaceSubquery<T>
- Overrides:
getSelection
in classAbstractSqmSelectQuery<T>
-
isCompoundSelection
public boolean isCompoundSelection()- Specified by:
isCompoundSelection
in interfaceSelection<T>
-
getSelectionItems
- Specified by:
getSelectionItems
in interfaceJpaSelection<T>
-
getCompoundSelectionItems
- Specified by:
getCompoundSelectionItems
in interfaceJpaSelection<T>
- Specified by:
getCompoundSelectionItems
in interfaceSelection<T>
-
distinct
- Specified by:
distinct
in interfaceAbstractQuery<T>
- Specified by:
distinct
in interfaceJpaSelectCriteria<T>
- Specified by:
distinct
in interfaceJpaSubQuery<T>
- Specified by:
distinct
in interfaceSqmSelectQuery<T>
- Specified by:
distinct
in interfaceSubquery<T>
- Overrides:
distinct
in classAbstractSqmSelectQuery<T>
-
where
- Specified by:
where
in interfaceAbstractQuery<T>
- Specified by:
where
in interfaceJpaSelectCriteria<T>
- Specified by:
where
in interfaceJpaSubQuery<T>
- Specified by:
where
in interfaceSubquery<T>
- Overrides:
where
in classAbstractSqmSelectQuery<T>
-
where
- Specified by:
where
in interfaceAbstractQuery<T>
- Specified by:
where
in interfaceJpaSelectCriteria<T>
- Specified by:
where
in interfaceJpaSubQuery<T>
- Specified by:
where
in interfaceSubquery<T>
- Overrides:
where
in classAbstractSqmSelectQuery<T>
-
groupBy
- Specified by:
groupBy
in interfaceAbstractQuery<T>
- Specified by:
groupBy
in interfaceJpaSelectCriteria<T>
- Specified by:
groupBy
in interfaceJpaSubQuery<T>
- Specified by:
groupBy
in interfaceSubquery<T>
- Overrides:
groupBy
in classAbstractSqmSelectQuery<T>
-
groupBy
- Specified by:
groupBy
in interfaceAbstractQuery<T>
- Specified by:
groupBy
in interfaceJpaSelectCriteria<T>
- Specified by:
groupBy
in interfaceJpaSubQuery<T>
- Specified by:
groupBy
in interfaceSubquery<T>
- Overrides:
groupBy
in classAbstractSqmSelectQuery<T>
-
having
- Specified by:
having
in interfaceAbstractQuery<T>
- Specified by:
having
in interfaceJpaSelectCriteria<T>
- Specified by:
having
in interfaceJpaSubQuery<T>
- Specified by:
having
in interfaceSubquery<T>
- Overrides:
having
in classAbstractSqmSelectQuery<T>
-
having
- Specified by:
having
in interfaceAbstractQuery<T>
- Specified by:
having
in interfaceJpaSelectCriteria<T>
- Specified by:
having
in interfaceJpaSubQuery<T>
- Specified by:
having
in interfaceSubquery<T>
- Overrides:
having
in classAbstractSqmSelectQuery<T>
-
getOffset
- Specified by:
getOffset
in interfaceJpaSubQuery<T>
-
offset
- Specified by:
offset
in interfaceJpaSubQuery<T>
-
offset
- Specified by:
offset
in interfaceJpaSubQuery<T>
-
getFetch
- Specified by:
getFetch
in interfaceJpaSubQuery<T>
-
fetch
- Specified by:
fetch
in interfaceJpaSubQuery<T>
-
fetch
- Specified by:
fetch
in interfaceJpaSubQuery<T>
-
fetch
- Specified by:
fetch
in interfaceJpaSubQuery<T>
-
fetch
- Specified by:
fetch
in interfaceJpaSubQuery<T>
-
getFetchClauseType
- Specified by:
getFetchClauseType
in interfaceJpaSubQuery<T>
-
getOrderList
- Specified by:
getOrderList
in interfaceJpaSubQuery<T>
-
orderBy
- Specified by:
orderBy
in interfaceJpaSubQuery<T>
-
orderBy
- Specified by:
orderBy
in interfaceJpaSubQuery<T>
-
correlate
-
correlate
-
correlate
-
correlate
-
correlate
-
correlate
-
correlate
- Specified by:
correlate
in interfaceJpaSubQuery<T>
-
correlate
- Specified by:
correlate
in interfaceJpaSubQuery<T>
-
isNull
- Specified by:
isNull
in interfaceExpression<T>
- Specified by:
isNull
in interfaceJpaExpression<T>
- Specified by:
isNull
in interfaceSqmExpression<T>
-
isNotNull
- Specified by:
isNotNull
in interfaceExpression<T>
- Specified by:
isNotNull
in interfaceJpaExpression<T>
- Specified by:
isNotNull
in interfaceSqmExpression<T>
-
equalTo
- Specified by:
equalTo
in interfaceExpression<T>
- Specified by:
equalTo
in interfaceJpaExpression<T>
- Specified by:
equalTo
in interfaceSqmExpression<T>
-
equalTo
- Specified by:
equalTo
in interfaceExpression<T>
- Specified by:
equalTo
in interfaceJpaExpression<T>
- Specified by:
equalTo
in interfaceSqmExpression<T>
-
in
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
- Specified by:
in
in interfaceSqmExpression<T>
-
in
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
- Specified by:
in
in interfaceSqmExpression<T>
-
in
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
- Specified by:
in
in interfaceSqmExpression<T>
-
in
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
- Specified by:
in
in interfaceSqmExpression<T>
-
getNodeType
Description copied from interface:SqmExpression
The expression's type.Can change as a result of calls to
SqmExpression.applyInferableType(org.hibernate.query.sqm.SqmExpressible<?>)
- Specified by:
getNodeType
in interfaceSqmExpression<T>
- Specified by:
getNodeType
in interfaceSqmTypedNode<T>
-
applyInferableType
Description copied from interface:SqmExpression
Used to apply type information based on the expression's usage within the query.- Specified by:
applyInferableType
in interfaceSqmExpression<T>
-
asLong
- Specified by:
asLong
in interfaceJpaExpression<T>
- Specified by:
asLong
in interfaceSqmExpression<T>
-
asInteger
- Specified by:
asInteger
in interfaceJpaExpression<T>
- Specified by:
asInteger
in interfaceSqmExpression<T>
-
asFloat
- Specified by:
asFloat
in interfaceJpaExpression<T>
- Specified by:
asFloat
in interfaceSqmExpression<T>
-
asDouble
- Specified by:
asDouble
in interfaceJpaExpression<T>
- Specified by:
asDouble
in interfaceSqmExpression<T>
-
asBigDecimal
- Specified by:
asBigDecimal
in interfaceJpaExpression<T>
- Specified by:
asBigDecimal
in interfaceSqmExpression<T>
-
asBigInteger
- Specified by:
asBigInteger
in interfaceJpaExpression<T>
- Specified by:
asBigInteger
in interfaceSqmExpression<T>
-
asString
- Specified by:
asString
in interfaceJpaExpression<T>
- Specified by:
asString
in interfaceSqmExpression<T>
-
as
- Specified by:
as
in interfaceExpression<T>
- Specified by:
as
in interfaceJpaExpression<T>
- Specified by:
as
in interfaceSqmExpression<T>
-
getJavaTypeDescriptor
- Specified by:
getJavaTypeDescriptor
in interfaceJpaTupleElement<T>
-
getJavaType
- Specified by:
getJavaType
in interfaceJpaTupleElement<T>
- Specified by:
getJavaType
in interfaceTupleElement<T>
-
subquery
- Specified by:
subquery
in interfaceCommonAbstractCriteria
- Specified by:
subquery
in interfaceJpaCriteriaBase
-
subquery
- Specified by:
subquery
in interfaceCommonAbstractCriteria
-
where
-
having
-
getParameters
- Specified by:
getParameters
in interfaceCommonAbstractCriteria
-
notEqualTo
- Specified by:
notEqualTo
in interfaceExpression<T>
- Specified by:
notEqualTo
in interfaceJpaExpression<T>
- Specified by:
notEqualTo
in interfaceSqmExpression<T>
-
notEqualTo
- Specified by:
notEqualTo
in interfaceExpression<T>
- Specified by:
notEqualTo
in interfaceJpaExpression<T>
- Specified by:
notEqualTo
in interfaceSqmExpression<T>
-
cast
- Specified by:
cast
in interfaceExpression<T>
- Specified by:
cast
in interfaceJpaExpression<T>
- Specified by:
cast
in interfaceSqmExpression<T>
-
asLoggableText
- Specified by:
asLoggableText
in interfaceSqmNode
-
accept
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
-
appendHqlString
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
- Overrides:
appendHqlString
in classAbstractSqmSelectQuery<T>
-