T
- the type of the selection item.public interface Subquery<T> extends AbstractQuery<T>, Expression<T>
Subquery
interface defines functionality that is
specific to subqueries.
A subquery has an expression as its selection item.Modifier and Type | Method and Description |
---|---|
<X,Y> CollectionJoin<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> Join<X,Y> |
correlate(Join<X,Y> parentJoin)
Create a subquery join object correlated to a join object
of the enclosing query.
|
<X,Y> ListJoin<X,Y> |
correlate(ListJoin<X,Y> parentList)
Create a subquery list join object correlated to a list join
object of the enclosing query.
|
<X,K,V> MapJoin<X,K,V> |
correlate(MapJoin<X,K,V> parentMap)
Create a subquery map join object correlated to a map join
object of the enclosing query.
|
<Y> Root<Y> |
correlate(Root<Y> parentRoot)
Create a subquery root correlated to a root of the
enclosing query.
|
<X,Y> SetJoin<X,Y> |
correlate(SetJoin<X,Y> parentSet)
Create a subquery set join object correlated to a set join
object of the enclosing query.
|
Subquery<T> |
distinct(boolean distinct)
Specify whether duplicate query results will be eliminated.
|
CommonAbstractCriteria |
getContainingQuery()
Return the query (which may be a CriteriaQuery, CriteriaUpdate, CriteriaDelete, or a Subquery) of which this
is a subquery.
|
java.util.Set<Join<?,?>> |
getCorrelatedJoins()
Return the correlated joins of the subquery.
|
AbstractQuery<?> |
getParent()
Return the query (which must be a CriteriaQuery or a Subquery) of which this is a subquery.
|
Expression<T> |
getSelection()
Return the selection expression.
|
Subquery<T> |
groupBy(Expression<?>... grouping)
Specify the expressions that are used to form groups over
the subquery results.
|
Subquery<T> |
groupBy(java.util.List<Expression<?>> grouping)
Specify the expressions that are used to form groups over
the subquery results.
|
Subquery<T> |
having(Expression<java.lang.Boolean> restriction)
Specify a restriction over the groups of the subquery.
|
Subquery<T> |
having(Predicate... restrictions)
Specify restrictions over the groups of the subquery
according the conjunction of the specified restriction
predicates.
|
Subquery<T> |
select(Expression<T> expression)
Specify the item that is to be returned as the subquery
result.
|
Subquery<T> |
where(Expression<java.lang.Boolean> restriction)
Modify the subquery to restrict the result according
to the specified boolean expression.
|
Subquery<T> |
where(Predicate... restrictions)
Modify the subquery to restrict the result according
to the conjunction of the specified restriction predicates.
|
from, from, getGroupList, getGroupRestriction, getResultType, getRoots, isDistinct
getRestriction, subquery
as, in, in, in, in, isNotNull, isNull
alias, getCompoundSelectionItems, isCompoundSelection
getAlias, getJavaType
Subquery<T> select(Expression<T> expression)
expression
- expression specifying the item that
is to be returned as the subquery resultSubquery<T> where(Expression<java.lang.Boolean> restriction)
AbstractQuery
method.where
in interface AbstractQuery<T>
restriction
- a simple or compound boolean expressionSubquery<T> where(Predicate... restrictions)
AbstractQuery
method.where
in interface AbstractQuery<T>
restrictions
- zero or more restriction predicatesSubquery<T> groupBy(Expression<?>... grouping)
AbstractQuery
method.groupBy
in interface AbstractQuery<T>
grouping
- zero or more grouping expressionsSubquery<T> groupBy(java.util.List<Expression<?>> grouping)
AbstractQuery
method.groupBy
in interface AbstractQuery<T>
grouping
- list of zero or more grouping expressionsSubquery<T> having(Expression<java.lang.Boolean> restriction)
AbstractQuery
method.having
in interface AbstractQuery<T>
restriction
- a simple or compound boolean expressionSubquery<T> having(Predicate... restrictions)
AbstractQuery
method.having
in interface AbstractQuery<T>
restrictions
- zero or more restriction predicatesSubquery<T> distinct(boolean distinct)
AbstractQuery
method.distinct
in interface AbstractQuery<T>
distinct
- boolean value specifying whether duplicate
results must be eliminated from the subquery result or
whether they must be retained<Y> Root<Y> correlate(Root<Y> parentRoot)
parentRoot
- a root of the containing query<X,Y> Join<X,Y> correlate(Join<X,Y> parentJoin)
parentJoin
- join object of the containing query<X,Y> CollectionJoin<X,Y> correlate(CollectionJoin<X,Y> parentCollection)
parentCollection
- join object of the containing query<X,Y> SetJoin<X,Y> correlate(SetJoin<X,Y> parentSet)
parentSet
- join object of the containing query<X,Y> ListJoin<X,Y> correlate(ListJoin<X,Y> parentList)
parentList
- join object of the containing query<X,K,V> MapJoin<X,K,V> correlate(MapJoin<X,K,V> parentMap)
parentMap
- join object of the containing queryAbstractQuery<?> getParent()
CommonAbstractCriteria getContainingQuery()
Expression<T> getSelection()
getSelection
in interface AbstractQuery<T>
java.util.Set<Join<?,?>> getCorrelatedJoins()