|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.persistence.criteria.SelectionImpl<X> org.apache.openjpa.persistence.criteria.ExpressionImpl<T> org.apache.openjpa.persistence.criteria.SubqueryImpl<T>
T
- the type selected by this subquery.class SubqueryImpl<T>
Subquery is an expression which itself is a query and always appears in the context of a parent query. A subquery delegates to a captive query for most of the operations but also maintains its own joins and correlated joins.
Constructor Summary | |
---|---|
SubqueryImpl(Class<T> cls,
AbstractQuery<?> parent)
Construct a subquery always in the context of a parent query. |
Method Summary | ||
---|---|---|
StringBuilder |
asValue(AliasContext q)
Get a string representation of this node as a value in the context of the given query. |
|
StringBuilder |
asVariable(AliasContext q)
Get a string representation of this node as a variable in the context of the given query. |
|
|
correlate(CollectionJoin<X,Y> parentJoin)
|
|
|
correlate(Join<X,Y> parentJoin)
Correlate this subquery with the given join. |
|
|
correlate(ListJoin<X,Y> parentJoin)
|
|
|
correlate(MapJoin<X,K,V> parentJoin)
|
|
|
correlate(Root<Y> root)
Correlate this subquery with the given root. |
|
|
correlate(SetJoin<X,Y> parentJoin)
|
|
Subquery<T> |
distinct(boolean distinct)
|
|
|
from(Class<X> entityClass)
|
|
|
from(EntityType<X> entity)
|
|
(package private) Stack<Context> |
getContexts()
|
|
Set<Join<?,?>> |
getCorrelatedJoins()
|
|
(package private) CriteriaQueryImpl<T> |
getDelegate()
Gets the captive query to which this subquery delegates. |
|
List<Expression<?>> |
getGroupList()
|
|
Predicate |
getGroupRestriction()
|
|
CriteriaQueryImpl<?> |
getInnermostParent()
Gets the 'root' query for this subquery. |
|
MetamodelImpl |
getMetamodel()
|
|
AbstractQuery<?> |
getParent()
Gets the parent query of this subquery. |
|
Predicate |
getRestriction()
|
|
Class<T> |
getResultType()
|
|
Root<?> |
getRoot()
|
|
Set<Root<?>> |
getRoots()
|
|
Expression<T> |
getSelection()
|
|
(package private) Subquery |
getSubQ()
|
|
Subquery<T> |
groupBy(Expression<?>... grouping)
|
|
Subquery<T> |
groupBy(List<Expression<?>> grouping)
|
|
Subquery<T> |
having(Expression<Boolean> restriction)
|
|
Subquery<T> |
having(Predicate... restrictions)
|
|
boolean |
isCorrelated()
Affirms if this is a correlated subquery. |
|
boolean |
isDistinct()
|
|
Subquery<T> |
select(Expression<T> expression)
|
|
|
subquery(Class<U> type)
|
|
Value |
toValue(ExpressionFactory factory,
CriteriaQueryImpl<?> q)
Convert this path to a kernel path value. |
|
Subquery<T> |
where(Expression<Boolean> restriction)
|
|
Subquery<T> |
where(Predicate... restrictions)
|
Methods inherited from class org.apache.openjpa.persistence.criteria.ExpressionImpl |
---|
as, in, in, in, in, isNotNull, isNull, toKernelExpression |
Methods inherited from class org.apache.openjpa.persistence.criteria.SelectionImpl |
---|
acceptVisit, alias, asProjection, assertValidName, getAlias, getCompoundSelectionItems, getJavaType, isAliased, isAutoAliased, isCompoundSelection, setAutoAlias |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.persistence.criteria.Expression |
---|
as, in, in, in, in, isNotNull, isNull |
Methods inherited from interface javax.persistence.criteria.Selection |
---|
alias, getCompoundSelectionItems, isCompoundSelection |
Methods inherited from interface javax.persistence.TupleElement |
---|
getAlias, getJavaType |
Constructor Detail |
---|
SubqueryImpl(Class<T> cls, AbstractQuery<?> parent)
cls
- the result type of this subqueryparent
- the non-null parent query which itself can be a subquery.Method Detail |
---|
public AbstractQuery<?> getParent()
getParent
in interface Subquery<T>
CriteriaQueryImpl<T> getDelegate()
public MetamodelImpl getMetamodel()
Stack<Context> getContexts()
public CriteriaQueryImpl<?> getInnermostParent()
public Subquery<T> select(Expression<T> expression)
select
in interface Subquery<T>
public Expression<T> getSelection()
getSelection
in interface AbstractQuery<T>
getSelection
in interface Subquery<T>
public <X> Root<X> from(EntityType<X> entity)
from
in interface AbstractQuery<T>
public <X> Root<X> from(Class<X> entityClass)
from
in interface AbstractQuery<T>
public Set<Root<?>> getRoots()
getRoots
in interface AbstractQuery<T>
public Root<?> getRoot()
public Subquery<T> where(Expression<Boolean> restriction)
where
in interface AbstractQuery<T>
where
in interface Subquery<T>
public Subquery<T> where(Predicate... restrictions)
where
in interface AbstractQuery<T>
where
in interface Subquery<T>
public Subquery<T> groupBy(Expression<?>... grouping)
groupBy
in interface AbstractQuery<T>
groupBy
in interface Subquery<T>
public Subquery<T> groupBy(List<Expression<?>> grouping)
groupBy
in interface AbstractQuery<T>
groupBy
in interface Subquery<T>
public Subquery<T> having(Expression<Boolean> restriction)
having
in interface AbstractQuery<T>
having
in interface Subquery<T>
public Subquery<T> having(Predicate... restrictions)
having
in interface AbstractQuery<T>
having
in interface Subquery<T>
public Subquery<T> distinct(boolean distinct)
distinct
in interface AbstractQuery<T>
distinct
in interface Subquery<T>
public List<Expression<?>> getGroupList()
getGroupList
in interface AbstractQuery<T>
public Predicate getRestriction()
getRestriction
in interface AbstractQuery<T>
public Predicate getGroupRestriction()
getGroupRestriction
in interface AbstractQuery<T>
public boolean isDistinct()
isDistinct
in interface AbstractQuery<T>
public <U> Subquery<U> subquery(Class<U> type)
subquery
in interface AbstractQuery<T>
public <Y> Root<Y> correlate(Root<Y> root)
correlate
in interface Subquery<T>
public Set<Join<?,?>> getCorrelatedJoins()
getCorrelatedJoins
in interface Subquery<T>
public <X,Y> Join<X,Y> correlate(Join<X,Y> parentJoin)
correlate
in interface Subquery<T>
public boolean isCorrelated()
public <X,Y> CollectionJoin<X,Y> correlate(CollectionJoin<X,Y> parentJoin)
correlate
in interface Subquery<T>
public <X,Y> SetJoin<X,Y> correlate(SetJoin<X,Y> parentJoin)
correlate
in interface Subquery<T>
public <X,Y> ListJoin<X,Y> correlate(ListJoin<X,Y> parentJoin)
correlate
in interface Subquery<T>
public <X,K,V> MapJoin<X,K,V> correlate(MapJoin<X,K,V> parentJoin)
correlate
in interface Subquery<T>
Subquery getSubQ()
public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> q)
toValue
in class ExpressionImpl<T>
factory
- creates the kernel expressionq
- the query definition context of this expression
public Class<T> getResultType()
getResultType
in interface AbstractQuery<T>
public StringBuilder asValue(AliasContext q)
CriteriaExpression
asValue
in interface CriteriaExpression
asValue
in class SelectionImpl<T>
public StringBuilder asVariable(AliasContext q)
CriteriaExpression
asVariable
in interface CriteriaExpression
asVariable
in class SelectionImpl<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |