public class CriteriaSubqueryImpl<T> extends ExpressionImpl<T> implements Subquery<T>, Serializable
Subquery contract. Mostlty a set of delegation to its internal
QueryStructure.| Modifier and Type | Class and Description |
|---|---|
static class |
CriteriaSubqueryImpl.SubquerySelection<S> |
ParameterContainer.Helper| Constructor and Description |
|---|
CriteriaSubqueryImpl(CriteriaBuilderImpl criteriaBuilder,
Class<T> javaType,
CommonAbstractCriteria parent) |
| Modifier and Type | Method and Description |
|---|---|
<X,Y> CollectionJoin<X,Y> |
correlate(CollectionJoin<X,Y> source)
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> source)
Create a subquery join object correlated to a join object
of the enclosing query.
|
<X,Y> ListJoin<X,Y> |
correlate(ListJoin<X,Y> source)
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> source)
Create a subquery map join object correlated to a map join
object of the enclosing query.
|
<Y> Root<Y> |
correlate(Root<Y> source)
Create a subquery root correlated to a root of the
enclosing query.
|
<X,Y> SetJoin<X,Y> |
correlate(SetJoin<X,Y> source)
Create a subquery set join object correlated to a set join
object of the enclosing query.
|
Subquery<T> |
distinct(boolean applyDistinction)
Specify whether duplicate query results will be eliminated.
|
<X> Root<X> |
from(Class<X> entityClass)
Create and add a query root corresponding to the given entity,
forming a cartesian product with any existing roots.
|
<X> Root<X> |
from(EntityType<X> entityType)
Create and add a query root corresponding to the given entity,
forming a cartesian product with any existing roots.
|
CommonAbstractCriteria |
getContainingQuery()
Return the query (which may be a CriteriaQuery, CriteriaUpdate, CriteriaDelete, or a Subquery) of which this
is a subquery.
|
Set<Join<?,?>> |
getCorrelatedJoins()
Return the correlated joins of the subquery.
|
List<Expression<?>> |
getGroupList()
Return a list of the grouping expressions.
|
Predicate |
getGroupRestriction()
Return the predicate that corresponds to the restriction(s)
over the grouping items, or null if no restrictions have
been specified.
|
AbstractQuery<?> |
getParent()
Return the query (which must be a CriteriaQuery or a Subquery) of which this is a subquery.
|
Predicate |
getRestriction()
Return the predicate that corresponds to the where clause
restriction(s), or null if no restrictions have been
specified.
|
Class<T> |
getResultType()
Return the result type of the query or subquery.
|
Set<Root<?>> |
getRoots()
Return the query roots.
|
Expression<T> |
getSelection()
Return the selection expression.
|
Subquery<T> |
groupBy(Expression<?>... groupings)
Specify the expressions that are used to form groups over
the subquery results.
|
Subquery<T> |
groupBy(List<Expression<?>> groupings)
Specify the expressions that are used to form groups over
the subquery results.
|
Subquery<T> |
having(Expression<Boolean> expression)
Specify a restriction over the groups of the subquery.
|
Subquery<T> |
having(Predicate... predicates)
Specify restrictions over the groups of the subquery
according the conjunction of the specified restriction
predicates.
|
boolean |
isDistinct()
Return whether duplicate query results must be eliminated or
retained.
|
void |
registerParameters(ParameterRegistry registry)
Register any parameters contained within this query component with the given registry.
|
String |
render(RenderingContext renderingContext) |
String |
renderProjection(RenderingContext renderingContext) |
Subquery<T> |
select(Expression<T> expression)
Specify the item that is to be returned as the subquery
result.
|
<U> Subquery<U> |
subquery(Class<U> subqueryType)
Create a subquery of the query.
|
Subquery<T> |
where(Expression<Boolean> expression)
Modify the subquery to restrict the result according
to the specified boolean expression.
|
Subquery<T> |
where(Predicate... predicates)
Modify the subquery to restrict the result according
to the conjunction of the specified restriction predicates.
|
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNullalias, getCompoundSelectionItems, getValueHandlers, isCompoundSelectionforceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAliascriteriaBuilderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitas, in, in, in, in, isNotNull, isNullalias, getCompoundSelectionItems, isCompoundSelectiongetAlias, getJavaTypegetValueHandlersgetValueHandlerpublic CriteriaSubqueryImpl(CriteriaBuilderImpl criteriaBuilder, Class<T> javaType, CommonAbstractCriteria parent)
public AbstractQuery<?> getParent()
Subquerypublic CommonAbstractCriteria getContainingQuery()
SubquerygetContainingQuery in interface Subquery<T>public void registerParameters(ParameterRegistry registry)
ParameterContainerregisterParameters in interface ParameterContainerregistry - The parameter registry with which to register.public Class<T> getResultType()
AbstractQuerygetResultType in interface AbstractQuery<T>public Set<Root<?>> getRoots()
AbstractQueryCriteriaQuery or Subquery itself,
including any subquery roots defined as a result of
correlation. Returns empty set if no roots have been defined.
Modifications to the set do not affect the query.getRoots in interface AbstractQuery<T>public <X> Root<X> from(EntityType<X> entityType)
AbstractQueryfrom in interface AbstractQuery<T>entityType - metamodel entity representing the entity of type Xpublic <X> Root<X> from(Class<X> entityClass)
AbstractQueryfrom in interface AbstractQuery<T>entityClass - the entity classpublic Subquery<T> distinct(boolean applyDistinction)
SubqueryAbstractQuery method.public boolean isDistinct()
AbstractQueryisDistinct in interface AbstractQuery<T>public Expression<T> getSelection()
SubquerygetSelection in interface AbstractQuery<T>getSelection in interface Subquery<T>public Subquery<T> select(Expression<T> expression)
Subquerypublic Predicate getRestriction()
CommonAbstractCriteriagetRestriction in interface CommonAbstractCriteriapublic Subquery<T> where(Expression<Boolean> expression)
SubqueryAbstractQuery method.public Subquery<T> where(Predicate... predicates)
SubqueryAbstractQuery method.public List<Expression<?>> getGroupList()
AbstractQuerygetGroupList in interface AbstractQuery<T>public Subquery<T> groupBy(Expression<?>... groupings)
SubqueryAbstractQuery method.public Subquery<T> groupBy(List<Expression<?>> groupings)
SubqueryAbstractQuery method.public Predicate getGroupRestriction()
AbstractQuerygetGroupRestriction in interface AbstractQuery<T>public Subquery<T> having(Expression<Boolean> expression)
SubqueryAbstractQuery method.public Subquery<T> having(Predicate... predicates)
SubqueryAbstractQuery method.public Set<Join<?,?>> getCorrelatedJoins()
SubquerygetCorrelatedJoins in interface Subquery<T>public <Y> Root<Y> correlate(Root<Y> source)
Subquerypublic <X,Y> Join<X,Y> correlate(Join<X,Y> source)
Subquerypublic <X,Y> CollectionJoin<X,Y> correlate(CollectionJoin<X,Y> source)
Subquerypublic <X,Y> SetJoin<X,Y> correlate(SetJoin<X,Y> source)
Subquerypublic <X,Y> ListJoin<X,Y> correlate(ListJoin<X,Y> source)
Subquerypublic <X,K,V> MapJoin<X,K,V> correlate(MapJoin<X,K,V> source)
Subquerypublic <U> Subquery<U> subquery(Class<U> subqueryType)
CommonAbstractCriteriasubquery in interface CommonAbstractCriteriasubqueryType - the subquery result typepublic String render(RenderingContext renderingContext)
render in interface Renderablepublic String renderProjection(RenderingContext renderingContext)
renderProjection in interface RenderableCopyright © 2017 JBoss by Red Hat. All rights reserved.