|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 representing a persistent attribute traversed from a 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 parent representing the given 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)
Gets the field that may have been embedded inside the given field. |
|
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()
Gets the bindable object that corresponds to the path expression. |
|
Path<Z> |
getParentPath()
Gets the parent of this path or null if this path is the root. |
|
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)
parent - the path from which this path needs to be constructed. Must not be null.member - the persistent property that represents this path.cls - denotes the type expressed by this path.| Method Detail |
|---|
public Bindable<X> getModel()
getModel in interface Path<X>IllegalArgumentException - if this path is not bindablepublic final Path<Z> getParentPath()
getParentPath in interface Path<X>public PathImpl<?,?> getInnermostParentPath()
protected FieldMetaData getEmbeddedFieldMetaData(FieldMetaData fmd)
fmd - a given field
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 CriteriaExpressionasValue in class SelectionImpl<X>public StringBuilder asVariable(AliasContext q)
CriteriaExpression
asVariable in interface CriteriaExpressionasVariable in class SelectionImpl<X>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||