|
||||||||||
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<X> org.apache.openjpa.persistence.criteria.PathImpl<Z,X>
Z
- the type of the parent pathX
- the type of this pathclass PathImpl<Z,X>
Path is an expression often representing a persistent attribute traversed from another (parent) path. The type of the path is the type of the persistent attribute. If the persistent attribute is bindable, then further path can be traversed from this path.
Field Summary | |
---|---|
protected Members.Member<? super Z,?> |
_member
|
protected PathImpl<?,Z> |
_parent
|
Constructor Summary | |
---|---|
protected |
PathImpl(Class<X> cls)
Protected constructor use by root path which neither represent a member nor has a parent. |
|
PathImpl(PathImpl<?,Z> parent,
Members.Member<? super Z,?> member,
Class<X> cls)
Create a path from the given non-null parent representing the given non-null member. |
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. |
|
|
get(MapAttribute<X,K,V> map)
Gets a new path that represents the given map-valued attribute from this path. |
|
|
get(PluralAttribute<X,C,E> coll)
Gets a new path that represents the given multi-valued attribute from this path. |
|
|
get(SingularAttribute<? super X,Y> attr)
Gets a new path that represents the given single-valued attribute from this path. |
|
|
get(String attName)
Gets a new path that represents the attribute of the given name from this path. |
|
PathImpl<?,?> |
getCorrelatedJoin(PathImpl<?,?> path)
|
|
PathImpl<?,?> |
getCorrelatedPath()
Gets the path correlated to this path, if any. |
|
PathImpl<?,?> |
getCorrelatedRoot(SubqueryImpl<?> subquery)
|
|
protected FieldMetaData |
getEmbeddedFieldMetaData(FieldMetaData fmd)
|
|
protected Members.Member<?,?> |
getInnermostMember(PathImpl<?,?> parent,
Members.Member<?,?> member)
|
|
PathImpl<?,?> |
getInnermostParentPath()
Gets the path that originates this traversal. |
|
Members.Member<? extends Z,X> |
getMember()
|
|
Bindable<X> |
getModel()
Returns the bindable object that corresponds to the path expression. |
|
Path<Z> |
getParentPath()
Return the parent "node" in the path or null if no parent. |
|
Type<?> |
getType()
|
|
boolean |
inSubquery(SubqueryImpl<?> subquery)
Affirms if this receiver occurs in the roots of the given subquery. |
|
boolean |
isCorrelated()
Affirms if this path is correlated to another path. |
|
void |
setCorrelatedPath(PathImpl<?,?> correlatedPath)
Makes this path correlated to the given path. |
|
Value |
toValue(ExpressionFactory factory,
CriteriaQueryImpl<?> q)
Convert this path to a kernel path. |
|
protected void |
traversePath(PathImpl<?,?> parent,
Path path,
FieldMetaData fmd)
|
|
Expression<Class<? extends X>> |
type()
Get the type() expression corresponding to this path. |
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 |
Field Detail |
---|
protected final PathImpl<?,Z> _parent
protected final Members.Member<? super Z,?> _member
Constructor Detail |
---|
protected PathImpl(Class<X> cls)
public PathImpl(PathImpl<?,Z> parent, Members.Member<? super Z,?> member, Class<X> cls)
Method Detail |
---|
public Bindable<X> getModel()
getModel
in interface Path<X>
public final Path<Z> getParentPath()
getParentPath
in interface Path<X>
public PathImpl<?,?> getInnermostParentPath()
protected FieldMetaData getEmbeddedFieldMetaData(FieldMetaData fmd)
protected Members.Member<?,?> getInnermostMember(PathImpl<?,?> parent, Members.Member<?,?> member)
public void setCorrelatedPath(PathImpl<?,?> correlatedPath)
public PathImpl<?,?> getCorrelatedPath()
public boolean isCorrelated()
public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> q)
toValue
in class ExpressionImpl<X>
factory
- creates the kernel expressionq
- the query definition context of this expression
public PathImpl<?,?> getCorrelatedRoot(SubqueryImpl<?> subquery)
public PathImpl<?,?> getCorrelatedJoin(PathImpl<?,?> path)
public boolean inSubquery(SubqueryImpl<?> subquery)
protected void traversePath(PathImpl<?,?> parent, Path path, FieldMetaData fmd)
public <Y> Path<Y> get(SingularAttribute<? super X,Y> attr)
get
in interface Path<X>
public <E,C extends Collection<E>> Expression<C> get(PluralAttribute<X,C,E> coll)
get
in interface Path<X>
public <K,V,M extends Map<K,V>> Expression<M> get(MapAttribute<X,K,V> map)
get
in interface Path<X>
public <Y> Path<Y> get(String attName)
get
in interface Path<X>
IllegalArgumentException
- if this path represents a basic attribute that is can not be traversed
further.public Type<?> getType()
public Members.Member<? extends Z,X> getMember()
public Expression<Class<? extends X>> type()
type
in interface Path<X>
public StringBuilder asValue(AliasContext q)
CriteriaExpression
asValue
in interface CriteriaExpression
asValue
in class SelectionImpl<X>
public StringBuilder asVariable(AliasContext q)
CriteriaExpression
asVariable
in interface CriteriaExpression
asVariable
in class SelectionImpl<X>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |