public class CriteriaSubqueryImpl<T> extends ExpressionImpl<T> implements Subquery<T>, Serializable
Subquery contract. Mostlty a set of delegation to its internal
QueryStructure.ParameterContainer.Helper| Constructor and Description |
|---|
CriteriaSubqueryImpl(CriteriaBuilderImpl criteriaBuilder,
Class<T> javaType,
AbstractQuery<?> 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.
|
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 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(CriteriaQueryCompiler.RenderingContext renderingContext) |
String |
renderProjection(CriteriaQueryCompiler.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, AbstractQuery<?> parent)
public AbstractQuery<?> getParent()
public void registerParameters(ParameterRegistry registry)
registerParameters in interface ParameterContainerregistry - The parameter registry with which to register.public Class<T> getResultType()
createQuery or subquery method, that
type will be returned. If the query was created using the
createTupleQuery method, the result type is
Tuple. Otherwise, the result type is
Object.getResultType in interface AbstractQuery<T>public Set<Root<?>> getRoots()
CriteriaQuery 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)
from in interface AbstractQuery<T>entityType - metamodel entity representing the entity
of type Xpublic <X> Root<X> from(Class<X> entityClass)
from 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()
getRestriction in interface AbstractQuery<T>public Subquery<T> where(Expression<Boolean> expression)
AbstractQuery method.public Subquery<T> where(Predicate... predicates)
AbstractQuery method.public List<Expression<?>> getGroupList()
getGroupList in interface AbstractQuery<T>public Subquery<T> groupBy(Expression<?>... groupings)
AbstractQuery method.public Subquery<T> groupBy(List<Expression<?>> groupings)
AbstractQuery method.public Predicate getGroupRestriction()
getGroupRestriction in interface AbstractQuery<T>public Subquery<T> having(Expression<Boolean> expression)
AbstractQuery method.public Subquery<T> having(Predicate... predicates)
AbstractQuery method.public Set<Join<?,?>> getCorrelatedJoins()
getCorrelatedJoins in interface Subquery<T>public <Y> Root<Y> correlate(Root<Y> source)
public <X,Y> Join<X,Y> correlate(Join<X,Y> source)
public <X,Y> CollectionJoin<X,Y> correlate(CollectionJoin<X,Y> source)
public <X,Y> SetJoin<X,Y> correlate(SetJoin<X,Y> source)
public <X,Y> ListJoin<X,Y> correlate(ListJoin<X,Y> source)
public <X,K,V> MapJoin<X,K,V> correlate(MapJoin<X,K,V> source)
public <U> Subquery<U> subquery(Class<U> subqueryType)
subquery in interface AbstractQuery<T>subqueryType - the subquery result typepublic String render(CriteriaQueryCompiler.RenderingContext renderingContext)
render in interface Renderablepublic String renderProjection(CriteriaQueryCompiler.RenderingContext renderingContext)
renderProjection in interface RenderableCopyright © 2012 JBoss by Red Hat. All Rights Reserved.