All Implemented Interfaces:
Expression<X>, FetchParent<Z,X>, From<Z,X>, Path<X>, Selection<X>, TupleElement<X>, Serializable, Cloneable, InternalExpression, InternalSelection
Direct Known Subclasses:
JoinImpl, RootImpl

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

Purpose: Contains the implementation of the From interface of the JPA criteria API.

Description: This class represents a from clause element which could be the root of the query of the end node of a join statement.

Since:
EclipseLink 1.2
See Also:
  • Field Details

    • managedType

      protected ManagedType managedType
    • joins

      protected Set<Join<X,?>> joins
    • fetches

      protected Set<Fetch<X,?>> fetches
    • isJoin

      protected boolean isJoin
    • isFetch

      protected boolean isFetch
    • correlatedParent

      protected FromImpl correlatedParent
  • Constructor Details

  • Method Details

    • getFetches

      public Set<Fetch<X,?>> getFetches()
      Return the fetch joins that have been made from this type.
      Specified by:
      getFetches in interface FetchParent<Z,X>
      Returns:
      fetch joins made from this type
    • isCorrelated

      public boolean isCorrelated()
      Whether the From object has been obtained as a result of correlation (use of a Subquery correlate method).
      Specified by:
      isCorrelated in interface From<Z,X>
      Returns:
      boolean indicating whether the object has been obtained through correlation
    • getCorrelationParent

      public From<Z,X> getCorrelationParent()
      Returns the parent From object from which the correlated From object has been obtained through correlation (use of a Subquery correlate method).
      Specified by:
      getCorrelationParent in interface From<Z,X>
      Returns:
      the parent of the correlated From object
      Throws:
      IllegalStateException - if the From object has not been obtained through correlation
    • fetch

      public <Y> Fetch<X,Y> fetch(SingularAttribute<? super X,Y> assoc)
      Fetch join to the specified attribute using an inner join.
      Specified by:
      fetch in interface FetchParent<Z,X>
      Parameters:
      assoc - target of the join
      Returns:
      the resulting fetch join
    • fetch

      public <Y> Fetch<X,Y> fetch(SingularAttribute<? super X,Y> assoc, JoinType jt)
      Fetch join to the specified attribute using the given join type.
      Specified by:
      fetch in interface FetchParent<Z,X>
      Parameters:
      assoc - target of the join
      jt - join type
      Returns:
      the resulting fetch join
    • fetch

      public <Y> Fetch<X,Y> fetch(PluralAttribute<? super X,?,Y> assoc)
      Fetch join to the specified collection using an inner join.
      Specified by:
      fetch in interface FetchParent<Z,X>
      Parameters:
      assoc - target of the join
      Returns:
      the resulting join
    • fetch

      public <Y> Fetch<X,Y> fetch(PluralAttribute<? super X,?,Y> assoc, JoinType jt)
      Fetch join to the specified collection using the given join type.
      Specified by:
      fetch in interface FetchParent<Z,X>
      Parameters:
      assoc - target of the join
      jt - join type
      Returns:
      the resulting join
    • fetch

      public <T, Y> Fetch<T,Y> fetch(String assocName)
      Fetch join to the specified attribute or association using an inner join.
      Specified by:
      fetch in interface FetchParent<Z,X>
      Parameters:
      assocName - name of the attribute or association for the target of the join
      Returns:
      the resulting fetch join
    • fetch

      public <T, Y> Fetch<T,Y> fetch(String assocName, JoinType jt)
      Fetch join to the specified attribute or association using the given join type.
      Specified by:
      fetch in interface FetchParent<Z,X>
      Parameters:
      assocName - assocName of the attribute or association for the target of the join
      jt - join type
      Returns:
      the resulting fetch join
    • getJoins

      public Set<Join<X,?>> getJoins()
      Specified by:
      getJoins in interface From<Z,X>
    • get

      public <Y> Path<Y> get(SingularAttribute<? super X,Y> att)
      Return the path corresponding to the referenced non-collection valued attribute.
      Specified by:
      get in interface Path<Z>
      Overrides:
      get in class PathImpl<X>
      Parameters:
      att - attribute
      Returns:
      path corresponding to the referenced attribute
    • get

      public <E, C extends Collection<E>> Expression<C> get(PluralAttribute<X,C,E> collection)
      Return the path corresponding to the referenced collection-valued attribute.
      Specified by:
      get in interface Path<Z>
      Overrides:
      get in class PathImpl<X>
      Parameters:
      collection - collection-valued attribute
      Returns:
      expression corresponding to the referenced attribute
    • get

      public <K, V, M extends Map<K, V>> Expression<M> get(MapAttribute<X,K,V> map)
      Return the path corresponding to the referenced map-valued attribute.
      Specified by:
      get in interface Path<Z>
      Overrides:
      get in class PathImpl<X>
      Parameters:
      map - map-valued attribute
      Returns:
      expression corresponding to the referenced attribute
    • type

      public Expression<Class<? extends X>> type()
      Return an expression corresponding to the type of the path.
      Specified by:
      type in interface Path<Z>
      Overrides:
      type in class PathImpl<X>
      Returns:
      expression corresponding to the type of the path
    • get

      public <Y> Path<Y> get(String attName)
      Specified by:
      get in interface Path<Z>
      Overrides:
      get in class PathImpl<X>
    • join

      public <Y> Join<X,Y> join(SingularAttribute<? super X,Y> attribute)
      Specified by:
      join in interface From<Z,X>
    • join

      public <Y> Join<X,Y> join(SingularAttribute<? super X,Y> attribute, JoinType jt)
      Specified by:
      join in interface From<Z,X>
    • join

      public <Y> CollectionJoin<X,Y> join(CollectionAttribute<? super X,Y> collection)
      Specified by:
      join in interface From<Z,X>
    • join

      public <Y> SetJoin<X,Y> join(SetAttribute<? super X,Y> set)
      Specified by:
      join in interface From<Z,X>
    • join

      public <Y> ListJoin<X,Y> join(ListAttribute<? super X,Y> list)
      Specified by:
      join in interface From<Z,X>
    • join

      public <K, V> MapJoin<X,K,V> join(MapAttribute<? super X,K,V> map)
      Specified by:
      join in interface From<Z,X>
    • join

      public <Y> CollectionJoin<X,Y> join(CollectionAttribute<? super X,Y> collection, JoinType jt)
      Specified by:
      join in interface From<Z,X>
    • join

      public <Y> SetJoin<X,Y> join(SetAttribute<? super X,Y> set, JoinType jt)
      Specified by:
      join in interface From<Z,X>
    • join

      public <Y> ListJoin<X,Y> join(ListAttribute<? super X,Y> list, JoinType jt)
      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)
      Specified by:
      join in interface From<Z,X>
    • join

      public <T, Y> Join<T,Y> join(String attributeName)
      Specified by:
      join in interface From<Z,X>
    • join

      public <T, Y> Join<T,Y> join(String attributeName, JoinType jt)
      Specified by:
      join in interface From<Z,X>
    • joinCollection

      public <T, Y> CollectionJoin<T,Y> joinCollection(String attributeName)
      Specified by:
      joinCollection in interface From<Z,X>
    • joinCollection

      public <T, Y> CollectionJoin<T,Y> joinCollection(String attributeName, JoinType jt)
      Specified by:
      joinCollection in interface From<Z,X>
    • joinList

      public <T, Y> ListJoin<T,Y> joinList(String attributeName)
      Specified by:
      joinList in interface From<Z,X>
    • joinList

      public <T, Y> ListJoin<T,Y> joinList(String attributeName, JoinType jt)
      Specified by:
      joinList in interface From<Z,X>
    • joinMap

      public <T, K, Y> MapJoin<T,K,Y> joinMap(String attributeName)
      Specified by:
      joinMap in interface From<Z,X>
    • joinMap

      public <T, K, Y> MapJoin<T,K,Y> joinMap(String attributeName, JoinType jt)
      Specified by:
      joinMap in interface From<Z,X>
    • joinSet

      public <T, Y> SetJoin<T,Y> joinSet(String attributeName)
      Specified by:
      joinSet in interface From<Z,X>
    • joinSet

      public <T, Y> SetJoin<T,Y> joinSet(String attributeName, JoinType jt)
      Specified by:
      joinSet in interface From<Z,X>
    • findJoins

      public void findJoins(AbstractQueryImpl query)
    • findJoinFetches

      public List<Expression> findJoinFetches()
    • isFrom

      public boolean isFrom()
      Specified by:
      isFrom in interface InternalSelection
      Overrides:
      isFrom in class SelectionImpl<X>