Package org.hibernate.query.criteria
Interface JpaSubQuery<T>
- All Superinterfaces:
AbstractQuery<T>,CommonAbstractCriteria,Expression<T>,JpaCriteriaBase,JpaCriteriaNode,JpaCteContainer,JpaExpression<T>,JpaSelectCriteria<T>,JpaSelection<T>,JpaTupleElement<T>,Selection<T>,Serializable,Subquery<T>,TupleElement<T>
- All Known Implementing Classes:
SqmSubQuery
public interface JpaSubQuery<T>
extends Subquery<T>, JpaSelectCriteria<T>, JpaExpression<T>, JpaCteContainer
- Author:
- Steve Ebersole
-
Method Summary
Modifier and TypeMethodDescription<X,Y> JpaCollectionJoin<X, Y> correlate(CollectionJoin<X, Y> parentCollection) Create a subquery collection join object correlated to a collection join object of the enclosing query.<X,Y> JpaJoin<X, Y> Create a subquery join object correlated to a join object of the enclosing query.<X,Y> JpaListJoin<X, Y> Create a subquery list join object correlated to a list join object of the enclosing query.<X,K, V> JpaMapJoin<X, K, V> Create a subquery map join object correlated to a map join object of the enclosing query.<Y> JpaRoot<Y>Create a subquery root correlated to a root of the enclosing query.<X,Y> JpaSetJoin<X, Y> Create a subquery set join object correlated to a set join object of the enclosing query.<X> JpaCrossJoin<X>correlate(JpaCrossJoin<X> parentCrossJoin) <X> JpaEntityJoin<X>correlate(JpaEntityJoin<X> parentEntityJoin) distinct(boolean distinct) Specify whether duplicate query results will be eliminated.fetch(Number fetch, FetchClauseType fetchClauseType) fetch(JpaExpression<? extends Number> fetch) fetch(JpaExpression<? extends Number> fetch, FetchClauseType fetchClauseType) getFetch()Return the selection expression.groupBy(Expression<?>... grouping) Specify the expressions that are used to form groups over the subquery results.groupBy(List<Expression<?>> grouping) Specify the expressions that are used to form groups over the subquery results.having(Expression<Boolean> restriction) Specify a restriction over the groups of the subquery.Specify restrictions over the groups of the subquery according the conjunction of the specified restriction predicates.multiselect(Selection<?>... selections) multiselect(List<Selection<?>> selectionList) offset(JpaExpression<? extends Number> offset) select(Expression<T> expression) Specify the item that is to be returned as the subquery result.where(Expression<Boolean> restriction) Modify the subquery to restrict the result according to the specified boolean expression.Modify the subquery to restrict the result according to the conjunction of the specified restriction predicates.Methods inherited from interface jakarta.persistence.criteria.AbstractQuery
getGroupList, getResultType, getRoots, isDistinctMethods inherited from interface org.hibernate.query.criteria.JpaCriteriaBase
subqueryMethods inherited from interface org.hibernate.query.criteria.JpaCteContainer
getCteCriteria, getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from interface org.hibernate.query.criteria.JpaExpression
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, equalTo, equalTo, in, in, in, in, isNotNull, isNullMethods inherited from interface org.hibernate.query.criteria.JpaSelectCriteria
from, from, from, from, getGroupRestriction, getQueryPart, getQuerySpec, getRestrictionMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods inherited from interface jakarta.persistence.criteria.Subquery
getContainingQuery, getCorrelatedJoins, getParentMethods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Method Details
-
multiselect
-
multiselect
-
correlate
-
correlate
-
getOffset
JpaExpression<Number> getOffset() -
offset
-
offset
-
getFetch
JpaExpression<Number> getFetch() -
fetch
-
fetch
-
fetch
-
fetch
-
getFetchClauseType
FetchClauseType getFetchClauseType() -
getOrderList
-
orderBy
-
orderBy
-
distinct
Description copied from interface:SubquerySpecify whether duplicate query results will be eliminated. A true value will cause duplicates to be eliminated. A false value will cause duplicates to be retained. If distinct has not been specified, duplicate results must be retained. This method only overrides the return type of the correspondingAbstractQuerymethod.- Specified by:
distinctin interfaceAbstractQuery<T>- Specified by:
distinctin interfaceJpaSelectCriteria<T>- Specified by:
distinctin interfaceSubquery<T>- Parameters:
distinct- boolean value specifying whether duplicate results must be eliminated from the subquery result or whether they must be retained- Returns:
- the modified subquery.
-
getSelection
JpaExpression<T> getSelection()Description copied from interface:SubqueryReturn the selection expression.- Specified by:
getSelectionin interfaceAbstractQuery<T>- Specified by:
getSelectionin interfaceJpaSelectCriteria<T>- Specified by:
getSelectionin interfaceSubquery<T>- Returns:
- the item to be returned in the subquery result
-
select
Description copied from interface:SubquerySpecify the item that is to be returned as the subquery result. Replaces the previously specified selection, if any. -
where
Description copied from interface:SubqueryModify the subquery to restrict the result according to the specified boolean expression. Replaces the previously added restriction(s), if any. This method only overrides the return type of the correspondingAbstractQuerymethod.- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceJpaSelectCriteria<T>- Specified by:
wherein interfaceSubquery<T>- Parameters:
restriction- a simple or compound boolean expression- Returns:
- the modified subquery
-
where
Description copied from interface:SubqueryModify the subquery to restrict the result according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed. This method only overrides the return type of the correspondingAbstractQuerymethod.- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceJpaSelectCriteria<T>- Specified by:
wherein interfaceSubquery<T>- Parameters:
restrictions- zero or more restriction predicates- Returns:
- the modified subquery
-
groupBy
Description copied from interface:SubquerySpecify the expressions that are used to form groups over the subquery results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions are simply removed. This method only overrides the return type of the correspondingAbstractQuerymethod.- Specified by:
groupByin interfaceAbstractQuery<T>- Specified by:
groupByin interfaceJpaSelectCriteria<T>- Specified by:
groupByin interfaceSubquery<T>- Parameters:
grouping- zero or more grouping expressions- Returns:
- the modified subquery
-
groupBy
Description copied from interface:SubquerySpecify the expressions that are used to form groups over the subquery results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions are simply removed. This method only overrides the return type of the correspondingAbstractQuerymethod.- Specified by:
groupByin interfaceAbstractQuery<T>- Specified by:
groupByin interfaceJpaSelectCriteria<T>- Specified by:
groupByin interfaceSubquery<T>- Parameters:
grouping- list of zero or more grouping expressions- Returns:
- the modified subquery
-
having
Description copied from interface:SubquerySpecify a restriction over the groups of the subquery. Replaces the previous having restriction(s), if any. This method only overrides the return type of the correspondingAbstractQuerymethod.- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceJpaSelectCriteria<T>- Specified by:
havingin interfaceSubquery<T>- Parameters:
restriction- a simple or compound boolean expression- Returns:
- the modified subquery
-
having
Description copied from interface:SubquerySpecify restrictions over the groups of the subquery according the conjunction of the specified restriction predicates. Replaces the previously added having restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed. This method only overrides the return type of the correspondingAbstractQuerymethod.- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceJpaSelectCriteria<T>- Specified by:
havingin interfaceSubquery<T>- Parameters:
restrictions- zero or more restriction predicates- Returns:
- the modified subquery
-
correlate
Description copied from interface:SubqueryCreate a subquery root correlated to a root of the enclosing query. -
correlate
Description copied from interface:SubqueryCreate a subquery join object correlated to a join object of the enclosing query. -
correlate
Description copied from interface:SubqueryCreate a subquery collection join object correlated to a collection join object of the enclosing query. -
correlate
Description copied from interface:SubqueryCreate a subquery set join object correlated to a set join object of the enclosing query. -
correlate
Description copied from interface:SubqueryCreate a subquery list join object correlated to a list join object of the enclosing query. -
correlate
Description copied from interface:SubqueryCreate a subquery map join object correlated to a map join object of the enclosing query.
-