org.datanucleus.jpa.criteria
Class FromImpl<Z,X>

java.lang.Object
  extended by org.datanucleus.jpa.criteria.ExpressionImpl<X>
      extended by org.datanucleus.jpa.criteria.PathImpl<Z,X>
          extended by org.datanucleus.jpa.criteria.FromImpl<Z,X>
Type Parameters:
Z - the parent type
X - the type represented by this
All Implemented Interfaces:
javax.persistence.criteria.Expression<X>, javax.persistence.criteria.FetchParent<Z,X>, javax.persistence.criteria.From<Z,X>, javax.persistence.criteria.Path<X>, javax.persistence.criteria.Selection<X>, javax.persistence.TupleElement<X>
Direct Known Subclasses:
JoinImpl, RootImpl

public class FromImpl<Z,X>
extends PathImpl<Z,X>
implements javax.persistence.criteria.From<Z,X>

Implementation of JPA2 Criteria "From".


Field Summary
protected  java.util.Set<javax.persistence.criteria.Fetch<X,?>> fetchJoins
           
protected  java.util.Set<javax.persistence.criteria.Join<X,?>> joins
           
protected  javax.persistence.metamodel.Type<X> type
           
 
Fields inherited from class org.datanucleus.jpa.criteria.PathImpl
attribute, parent
 
Constructor Summary
FromImpl(javax.persistence.metamodel.ManagedType<X> type)
           
FromImpl(PathImpl<?,Z> parent, AttributeImpl<? super Z,?> type)
           
 
Method Summary
<Y> javax.persistence.criteria.Fetch<X,Y>
fetch(javax.persistence.metamodel.PluralAttribute<? super X,?,Y> attr)
           
<Y> javax.persistence.criteria.Fetch<X,Y>
fetch(javax.persistence.metamodel.PluralAttribute<? super X,?,Y> attr, javax.persistence.criteria.JoinType joinType)
           
<Y> javax.persistence.criteria.Fetch<X,Y>
fetch(javax.persistence.metamodel.SingularAttribute<? super X,Y> attr)
           
<Y> javax.persistence.criteria.Fetch<X,Y>
fetch(javax.persistence.metamodel.SingularAttribute<? super X,Y> attr, javax.persistence.criteria.JoinType joinType)
           
<X,Y> javax.persistence.criteria.Fetch<X,Y>
fetch(java.lang.String attrName)
           
<X,Y> javax.persistence.criteria.Fetch<X,Y>
fetch(java.lang.String attrName, javax.persistence.criteria.JoinType joinType)
           
protected  javax.persistence.metamodel.Attribute getAttributeForAttributeName(java.lang.String attrName)
           
 javax.persistence.criteria.From<Z,X> getCorrelationParent()
           
 java.util.Set<javax.persistence.criteria.Fetch<X,?>> getFetches()
           
 java.util.Set<javax.persistence.criteria.Join<X,?>> getJoins()
           
 org.datanucleus.query.expression.Expression getQueryExpression()
          Accessor for the underlying DataNucleus expression for this path.
 org.datanucleus.query.expression.Expression getQueryExpression(boolean from)
          Accessor for the underlying DataNucleus expression for this path.
 boolean isCorrelated()
           
<Y> javax.persistence.criteria.CollectionJoin<X,Y>
join(javax.persistence.metamodel.CollectionAttribute<? super X,Y> collection)
           
<Y> javax.persistence.criteria.CollectionJoin<X,Y>
join(javax.persistence.metamodel.CollectionAttribute<? super X,Y> attr, javax.persistence.criteria.JoinType joinType)
           
<Y> javax.persistence.criteria.ListJoin<X,Y>
join(javax.persistence.metamodel.ListAttribute<? super X,Y> list)
           
<Y> javax.persistence.criteria.ListJoin<X,Y>
join(javax.persistence.metamodel.ListAttribute<? super X,Y> attr, javax.persistence.criteria.JoinType joinType)
           
<K,V> javax.persistence.criteria.MapJoin<X,K,V>
join(javax.persistence.metamodel.MapAttribute<? super X,K,V> map)
           
<K,V> javax.persistence.criteria.MapJoin<X,K,V>
join(javax.persistence.metamodel.MapAttribute<? super X,K,V> attr, javax.persistence.criteria.JoinType joinType)
           
<Y> javax.persistence.criteria.SetJoin<X,Y>
join(javax.persistence.metamodel.SetAttribute<? super X,Y> set)
           
<Y> javax.persistence.criteria.SetJoin<X,Y>
join(javax.persistence.metamodel.SetAttribute<? super X,Y> attr, javax.persistence.criteria.JoinType joinType)
           
<Y> javax.persistence.criteria.Join<X,Y>
join(javax.persistence.metamodel.SingularAttribute<? super X,Y> singular)
           
<Y> javax.persistence.criteria.Join<X,Y>
join(javax.persistence.metamodel.SingularAttribute<? super X,Y> attr, javax.persistence.criteria.JoinType joinType)
           
<X,Y> javax.persistence.criteria.Join<X,Y>
join(java.lang.String attr)
           
<X,Y> javax.persistence.criteria.Join<X,Y>
join(java.lang.String attrName, javax.persistence.criteria.JoinType joinType)
           
<X,Y> javax.persistence.criteria.CollectionJoin<X,Y>
joinCollection(java.lang.String attrName)
           
<X,Y> javax.persistence.criteria.CollectionJoin<X,Y>
joinCollection(java.lang.String attrName, javax.persistence.criteria.JoinType joinType)
           
<X,Y> javax.persistence.criteria.ListJoin<X,Y>
joinList(java.lang.String attrName)
           
<X,Y> javax.persistence.criteria.ListJoin<X,Y>
joinList(java.lang.String attrName, javax.persistence.criteria.JoinType joinType)
           
<X,K,V> javax.persistence.criteria.MapJoin<X,K,V>
joinMap(java.lang.String attrName)
           
<X,K,V> javax.persistence.criteria.MapJoin<X,K,V>
joinMap(java.lang.String attrName, javax.persistence.criteria.JoinType joinType)
           
<X,Y> javax.persistence.criteria.SetJoin<X,Y>
joinSet(java.lang.String attr)
           
<X,Y> javax.persistence.criteria.SetJoin<X,Y>
joinSet(java.lang.String attrName, javax.persistence.criteria.JoinType joinType)
           
 java.lang.String toString()
          Method to return a JPQL string form of the root expression.
 java.lang.String toString(boolean from)
          Method to return a JPQL string form of the root expression.
 
Methods inherited from class org.datanucleus.jpa.criteria.PathImpl
get, get, get, get, getModel, getParentPath, getType, type
 
Methods inherited from class org.datanucleus.jpa.criteria.ExpressionImpl
alias, as, getAlias, getCompoundSelectionItems, getJavaType, in, in, in, in, isCompoundSelection, isNotNull, isNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

joins

protected java.util.Set<javax.persistence.criteria.Join<X,?>> joins

fetchJoins

protected java.util.Set<javax.persistence.criteria.Fetch<X,?>> fetchJoins

type

protected javax.persistence.metamodel.Type<X> type
Constructor Detail

FromImpl

public FromImpl(javax.persistence.metamodel.ManagedType<X> type)

FromImpl

public FromImpl(PathImpl<?,Z> parent,
                AttributeImpl<? super Z,?> type)
Method Detail

getCorrelationParent

public javax.persistence.criteria.From<Z,X> getCorrelationParent()
Specified by:
getCorrelationParent in interface javax.persistence.criteria.From<Z,X>

isCorrelated

public boolean isCorrelated()
Specified by:
isCorrelated in interface javax.persistence.criteria.From<Z,X>

getJoins

public java.util.Set<javax.persistence.criteria.Join<X,?>> getJoins()
Specified by:
getJoins in interface javax.persistence.criteria.From<Z,X>

join

public <Y> javax.persistence.criteria.CollectionJoin<X,Y> join(javax.persistence.metamodel.CollectionAttribute<? super X,Y> attr,
                                                               javax.persistence.criteria.JoinType joinType)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <Y> javax.persistence.criteria.CollectionJoin<X,Y> join(javax.persistence.metamodel.CollectionAttribute<? super X,Y> collection)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <Y> javax.persistence.criteria.ListJoin<X,Y> join(javax.persistence.metamodel.ListAttribute<? super X,Y> attr,
                                                         javax.persistence.criteria.JoinType joinType)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <Y> javax.persistence.criteria.ListJoin<X,Y> join(javax.persistence.metamodel.ListAttribute<? super X,Y> list)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <K,V> javax.persistence.criteria.MapJoin<X,K,V> join(javax.persistence.metamodel.MapAttribute<? super X,K,V> attr,
                                                            javax.persistence.criteria.JoinType joinType)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <K,V> javax.persistence.criteria.MapJoin<X,K,V> join(javax.persistence.metamodel.MapAttribute<? super X,K,V> map)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <Y> javax.persistence.criteria.SetJoin<X,Y> join(javax.persistence.metamodel.SetAttribute<? super X,Y> attr,
                                                        javax.persistence.criteria.JoinType joinType)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <Y> javax.persistence.criteria.SetJoin<X,Y> join(javax.persistence.metamodel.SetAttribute<? super X,Y> set)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <Y> javax.persistence.criteria.Join<X,Y> join(javax.persistence.metamodel.SingularAttribute<? super X,Y> attr,
                                                     javax.persistence.criteria.JoinType joinType)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <Y> javax.persistence.criteria.Join<X,Y> join(javax.persistence.metamodel.SingularAttribute<? super X,Y> singular)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <X,Y> javax.persistence.criteria.Join<X,Y> join(java.lang.String attrName,
                                                       javax.persistence.criteria.JoinType joinType)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

join

public <X,Y> javax.persistence.criteria.Join<X,Y> join(java.lang.String attr)
Specified by:
join in interface javax.persistence.criteria.From<Z,X>

joinCollection

public <X,Y> javax.persistence.criteria.CollectionJoin<X,Y> joinCollection(java.lang.String attrName,
                                                                           javax.persistence.criteria.JoinType joinType)
Specified by:
joinCollection in interface javax.persistence.criteria.From<Z,X>

joinCollection

public <X,Y> javax.persistence.criteria.CollectionJoin<X,Y> joinCollection(java.lang.String attrName)
Specified by:
joinCollection in interface javax.persistence.criteria.From<Z,X>

joinList

public <X,Y> javax.persistence.criteria.ListJoin<X,Y> joinList(java.lang.String attrName,
                                                               javax.persistence.criteria.JoinType joinType)
Specified by:
joinList in interface javax.persistence.criteria.From<Z,X>

joinList

public <X,Y> javax.persistence.criteria.ListJoin<X,Y> joinList(java.lang.String attrName)
Specified by:
joinList in interface javax.persistence.criteria.From<Z,X>

joinMap

public <X,K,V> javax.persistence.criteria.MapJoin<X,K,V> joinMap(java.lang.String attrName,
                                                                 javax.persistence.criteria.JoinType joinType)
Specified by:
joinMap in interface javax.persistence.criteria.From<Z,X>

joinMap

public <X,K,V> javax.persistence.criteria.MapJoin<X,K,V> joinMap(java.lang.String attrName)
Specified by:
joinMap in interface javax.persistence.criteria.From<Z,X>

joinSet

public <X,Y> javax.persistence.criteria.SetJoin<X,Y> joinSet(java.lang.String attrName,
                                                             javax.persistence.criteria.JoinType joinType)
Specified by:
joinSet in interface javax.persistence.criteria.From<Z,X>

joinSet

public <X,Y> javax.persistence.criteria.SetJoin<X,Y> joinSet(java.lang.String attr)
Specified by:
joinSet in interface javax.persistence.criteria.From<Z,X>

getFetches

public java.util.Set<javax.persistence.criteria.Fetch<X,?>> getFetches()
Specified by:
getFetches in interface javax.persistence.criteria.FetchParent<Z,X>

fetch

public <Y> javax.persistence.criteria.Fetch<X,Y> fetch(javax.persistence.metamodel.PluralAttribute<? super X,?,Y> attr,
                                                       javax.persistence.criteria.JoinType joinType)
Specified by:
fetch in interface javax.persistence.criteria.FetchParent<Z,X>

fetch

public <Y> javax.persistence.criteria.Fetch<X,Y> fetch(javax.persistence.metamodel.PluralAttribute<? super X,?,Y> attr)
Specified by:
fetch in interface javax.persistence.criteria.FetchParent<Z,X>

fetch

public <Y> javax.persistence.criteria.Fetch<X,Y> fetch(javax.persistence.metamodel.SingularAttribute<? super X,Y> attr,
                                                       javax.persistence.criteria.JoinType joinType)
Specified by:
fetch in interface javax.persistence.criteria.FetchParent<Z,X>

fetch

public <Y> javax.persistence.criteria.Fetch<X,Y> fetch(javax.persistence.metamodel.SingularAttribute<? super X,Y> attr)
Specified by:
fetch in interface javax.persistence.criteria.FetchParent<Z,X>

fetch

public <X,Y> javax.persistence.criteria.Fetch<X,Y> fetch(java.lang.String attrName,
                                                         javax.persistence.criteria.JoinType joinType)
Specified by:
fetch in interface javax.persistence.criteria.FetchParent<Z,X>

fetch

public <X,Y> javax.persistence.criteria.Fetch<X,Y> fetch(java.lang.String attrName)
Specified by:
fetch in interface javax.persistence.criteria.FetchParent<Z,X>

getQueryExpression

public org.datanucleus.query.expression.Expression getQueryExpression(boolean from)
Accessor for the underlying DataNucleus expression for this path. Will be ClassExpression (FROM clause), or PrimaryExpression (otherwise).

Parameters:
from - Whether this is for the from clause
Returns:
The DataNucleus query expression

getQueryExpression

public org.datanucleus.query.expression.Expression getQueryExpression()
Accessor for the underlying DataNucleus expression for this path.

Overrides:
getQueryExpression in class PathImpl<Z,X>
Returns:
The DataNucleus query expression

toString

public java.lang.String toString()
Method to return a JPQL string form of the root expression.

Overrides:
toString in class PathImpl<Z,X>
Returns:
The string form

toString

public java.lang.String toString(boolean from)
Method to return a JPQL string form of the root expression.

Parameters:
from - Whether this is for the FROM clause
Returns:
The string form

getAttributeForAttributeName

protected javax.persistence.metamodel.Attribute getAttributeForAttributeName(java.lang.String attrName)


Copyright © 2011. All Rights Reserved.