org.apache.openjpa.persistence.criteria
Class FromImpl<Z,X>

java.lang.Object
  extended by org.apache.openjpa.persistence.criteria.SelectionImpl<X>
      extended by org.apache.openjpa.persistence.criteria.ExpressionImpl<X>
          extended by org.apache.openjpa.persistence.criteria.PathImpl<Z,X>
              extended by org.apache.openjpa.persistence.criteria.FromImpl<Z,X>
Type Parameters:
Z - the parent type of this receiver
X - the type represented by this receiver
All Implemented Interfaces:
Expression<X>, FetchParent<Z,X>, From<Z,X>, Path<X>, Selection<X>, TupleElement<X>, CriteriaExpression
Direct Known Subclasses:
Joins.AbstractCollection, Joins.SingularJoin, RootImpl

 class FromImpl<Z,X>
extends PathImpl<Z,X>
implements From<Z,X>

Represents a bound type, usually an entity that appears in the from clause, but may also be an embeddable belonging to an entity in the from clause. Serves as a factory for Joins of associations, embeddables and collections belonging to the type, and for Paths of attributes belonging to the type.


Field Summary
 
Fields inherited from class org.apache.openjpa.persistence.criteria.PathImpl
_member, _parent
 
Constructor Summary
protected FromImpl(AbstractManagedType<X> type)
          Supply the non-null managed type.
protected FromImpl(PathImpl<?,Z> parent, Members.Member<? super Z,?> m, Class<X> x)
           
 
Method Summary
 void acceptVisit(CriteriaExpressionVisitor visitor)
          Accept visit from the given visitor.
(package private)  void assertJoinable(Type<?> type)
           
<Y> Fetch<X,Y>
fetch(PluralAttribute<? super X,?,Y> assoc)
           
<Y> Fetch<X,Y>
fetch(PluralAttribute<? super X,?,Y> assoc, JoinType jt)
           
<Y> Fetch<X,Y>
fetch(SingularAttribute<? super X,Y> assoc)
           
<Y> Fetch<X,Y>
fetch(SingularAttribute<? super X,Y> assoc, JoinType jt)
           
<X,Y> Fetch<X,Y>
fetch(String assocName)
           
<X,Y> Fetch<X,Y>
fetch(String name, JoinType jt)
           
 From<Z,X> getCorrelationParent()
           
 Set<Fetch<X,?>> getFetches()
           
 Set<Join<X,?>> getJoins()
          Return the joins that have been made from this receiver.
 Type<?> getType()
           
<Y> CollectionJoin<X,Y>
join(CollectionAttribute<? super X,Y> collection)
          Join to the given Collection-valued attribute using an inner join.
<Y> CollectionJoin<X,Y>
join(CollectionAttribute<? super X,Y> collection, JoinType jt)
          Join to the given Collection-valued attribute using the given join type.
<Y> ListJoin<X,Y>
join(ListAttribute<? super X,Y> list)
          Join to the given List-valued attribute using an inner join.
<Y> ListJoin<X,Y>
join(ListAttribute<? super X,Y> list, JoinType jt)
          Join to the given List-valued attribute using the given join type.
<K,V> MapJoin<X,K,V>
join(MapAttribute<? super X,K,V> map)
          Join to the given Map-valued attribute using an inner join.
<K,V> MapJoin<X,K,V>
join(MapAttribute<? super X,K,V> map, JoinType jt)
          Join to the given Map-valued attribute using the given join type.
<Y> SetJoin<X,Y>
join(SetAttribute<? super X,Y> set)
          Join to the given Set-valued attribute using an inner join.
<Y> SetJoin<X,Y>
join(SetAttribute<? super X,Y> set, JoinType jt)
          Join to the given Set-valued attribute using the given join type.
<Y> Join<X,Y>
join(SingularAttribute<? super X,Y> attribute)
          Join to the given attribute using an inner join.
<Y> Join<X,Y>
join(SingularAttribute<? super X,Y> attribute, JoinType jt)
          Join to the given attribute using the given join type.
<W,Y> Join<W,Y>
join(String attr)
           
<W,Y> Join<W,Y>
join(String name, JoinType jt)
           
<W,Y> CollectionJoin<W,Y>
joinCollection(String attr)
           
<W,Y> CollectionJoin<W,Y>
joinCollection(String attr, JoinType jt)
           
<W,Y> ListJoin<W,Y>
joinList(String attr)
           
<W,Y> ListJoin<W,Y>
joinList(String attr, JoinType jt)
           
<W,K,V> MapJoin<W,K,V>
joinMap(String attr)
           
<W,K,V> MapJoin<W,K,V>
joinMap(String attr, JoinType jt)
           
<W,Y> SetJoin<W,Y>
joinSet(String attr)
           
<W,Y> SetJoin<W,Y>
joinSet(String attr, JoinType jt)
           
 
Methods inherited from class org.apache.openjpa.persistence.criteria.PathImpl
asValue, asVariable, get, get, get, get, getCorrelatedJoin, getCorrelatedPath, getCorrelatedRoot, getEmbeddedFieldMetaData, getInnermostMember, getInnermostParentPath, getMember, getModel, getParentPath, inSubquery, isCorrelated, setCorrelatedPath, toValue, traversePath, type
 
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
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.From
isCorrelated
 
Methods inherited from interface javax.persistence.criteria.Path
get, get, get, get, getModel, getParentPath, type
 
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

FromImpl

protected FromImpl(AbstractManagedType<X> type)
Supply the non-null managed type.


FromImpl

protected FromImpl(PathImpl<?,Z> parent,
                   Members.Member<? super Z,?> m,
                   Class<X> x)
Method Detail

getType

public Type<?> getType()
Overrides:
getType in class PathImpl<Z,X>

getJoins

public Set<Join<X,?>> getJoins()
Return the joins that have been made from this receiver.

Specified by:
getJoins in interface From<Z,X>

join

public <Y> Join<X,Y> join(SingularAttribute<? super X,Y> attribute)
Join to the given attribute using an inner join.

Specified by:
join in interface From<Z,X>

join

public <Y> Join<X,Y> join(SingularAttribute<? super X,Y> attribute,
                          JoinType jt)
Join to the given attribute using the given join type.

Specified by:
join in interface From<Z,X>

join

public <Y> CollectionJoin<X,Y> join(CollectionAttribute<? super X,Y> collection)
Join to the given Collection-valued attribute using an inner join.

Specified by:
join in interface From<Z,X>

join

public <Y> CollectionJoin<X,Y> join(CollectionAttribute<? super X,Y> collection,
                                    JoinType jt)
Join to the given Collection-valued attribute using the given join type.

Specified by:
join in interface From<Z,X>

join

public <Y> SetJoin<X,Y> join(SetAttribute<? super X,Y> set)
Join to the given Set-valued attribute using an inner join.

Specified by:
join in interface From<Z,X>

join

public <Y> SetJoin<X,Y> join(SetAttribute<? super X,Y> set,
                             JoinType jt)
Join to the given Set-valued attribute using the given join type.

Specified by:
join in interface From<Z,X>

join

public <Y> ListJoin<X,Y> join(ListAttribute<? super X,Y> list)
Join to the given List-valued attribute using an inner join.

Specified by:
join in interface From<Z,X>

join

public <Y> ListJoin<X,Y> join(ListAttribute<? super X,Y> list,
                              JoinType jt)
Join to the given List-valued attribute using the given join type.

Specified by:
join in interface From<Z,X>

join

public <K,V> MapJoin<X,K,V> join(MapAttribute<? super X,K,V> map)
Join to the given Map-valued attribute using an inner join.

Specified by:
join in interface From<Z,X>

join

public <K,V> MapJoin<X,K,V> join(MapAttribute<? super X,K,V> map,
                                 JoinType jt)
Join to the given Map-valued attribute using the given join type.

Specified by:
join in interface From<Z,X>

join

public <W,Y> Join<W,Y> join(String attr)
Specified by:
join in interface From<Z,X>

join

public <W,Y> Join<W,Y> join(String name,
                            JoinType jt)
Specified by:
join in interface From<Z,X>

joinCollection

public <W,Y> CollectionJoin<W,Y> joinCollection(String attr)
Specified by:
joinCollection in interface From<Z,X>

joinCollection

public <W,Y> CollectionJoin<W,Y> joinCollection(String attr,
                                                JoinType jt)
Specified by:
joinCollection in interface From<Z,X>

joinList

public <W,Y> ListJoin<W,Y> joinList(String attr)
Specified by:
joinList in interface From<Z,X>

joinList

public <W,Y> ListJoin<W,Y> joinList(String attr,
                                    JoinType jt)
Specified by:
joinList in interface From<Z,X>

joinMap

public <W,K,V> MapJoin<W,K,V> joinMap(String attr)
Specified by:
joinMap in interface From<Z,X>

joinMap

public <W,K,V> MapJoin<W,K,V> joinMap(String attr,
                                      JoinType jt)
Specified by:
joinMap in interface From<Z,X>

joinSet

public <W,Y> SetJoin<W,Y> joinSet(String attr)
Specified by:
joinSet in interface From<Z,X>

joinSet

public <W,Y> SetJoin<W,Y> joinSet(String attr,
                                  JoinType jt)
Specified by:
joinSet in interface From<Z,X>

assertJoinable

void assertJoinable(Type<?> type)

fetch

public <Y> Fetch<X,Y> fetch(SingularAttribute<? super X,Y> assoc,
                            JoinType jt)
Specified by:
fetch in interface FetchParent<Z,X>

fetch

public <Y> Fetch<X,Y> fetch(SingularAttribute<? super X,Y> assoc)
Specified by:
fetch in interface FetchParent<Z,X>

fetch

public <Y> Fetch<X,Y> fetch(PluralAttribute<? super X,?,Y> assoc,
                            JoinType jt)
Specified by:
fetch in interface FetchParent<Z,X>

fetch

public <Y> Fetch<X,Y> fetch(PluralAttribute<? super X,?,Y> assoc)
Specified by:
fetch in interface FetchParent<Z,X>

fetch

public <X,Y> Fetch<X,Y> fetch(String assocName)
Specified by:
fetch in interface FetchParent<Z,X>

fetch

public <X,Y> Fetch<X,Y> fetch(String name,
                              JoinType jt)
Specified by:
fetch in interface FetchParent<Z,X>

getFetches

public Set<Fetch<X,?>> getFetches()
Specified by:
getFetches in interface FetchParent<Z,X>

acceptVisit

public void acceptVisit(CriteriaExpressionVisitor visitor)
Description copied from interface: CriteriaExpression
Accept visit from the given visitor. The receiver is responsible to propagate the visitor to the constituent sub-nodes if any.

Specified by:
acceptVisit in interface CriteriaExpression
Overrides:
acceptVisit in class SelectionImpl<X>
Parameters:
visitor - a processor to walk the nodes of a tree.

getCorrelationParent

public From<Z,X> getCorrelationParent()
Specified by:
getCorrelationParent in interface From<Z,X>


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.