Class FromImpl<Z,​X>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, 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>, InternalExpression, InternalSelection
    Direct Known Subclasses:
    JoinImpl, RootImpl

    public class FromImpl<Z,​X>
    extends PathImpl<X>
    implements javax.persistence.criteria.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
    Author:
    gyorke
    See Also:
    From, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FromImpl​(javax.persistence.criteria.Path<Z> parentPath, javax.persistence.metamodel.ManagedType managedType, javax.persistence.metamodel.Metamodel metamodel, java.lang.Class<X> javaClass, org.eclipse.persistence.expressions.Expression expressionNode, javax.persistence.metamodel.Bindable<T> modelArtifact)  
      FromImpl​(javax.persistence.criteria.Path<Z> parentPath, javax.persistence.metamodel.ManagedType managedType, javax.persistence.metamodel.Metamodel metamodel, java.lang.Class<X> javaClass, org.eclipse.persistence.expressions.Expression expressionNode, javax.persistence.metamodel.Bindable<T> modelArtifact, FromImpl correlatedParent)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T,​Y>
      javax.persistence.criteria.Fetch<T,​Y>
      fetch​(java.lang.String assocName)
      Fetch join to the specified attribute or association using an inner join.
      <T,​Y>
      javax.persistence.criteria.Fetch<T,​Y>
      fetch​(java.lang.String assocName, javax.persistence.criteria.JoinType jt)
      Fetch join to the specified attribute or association using the given join type.
      <Y> javax.persistence.criteria.Fetch<X,​Y> fetch​(javax.persistence.metamodel.PluralAttribute<? super X,​?,​Y> assoc)
      Fetch join to the specified collection using an inner join.
      <Y> javax.persistence.criteria.Fetch<X,​Y> fetch​(javax.persistence.metamodel.PluralAttribute<? super X,​?,​Y> assoc, javax.persistence.criteria.JoinType jt)
      Fetch join to the specified collection using the given join type.
      <Y> javax.persistence.criteria.Fetch<X,​Y> fetch​(javax.persistence.metamodel.SingularAttribute<? super X,​Y> assoc)
      Fetch join to the specified attribute using an inner join.
      <Y> javax.persistence.criteria.Fetch<X,​Y> fetch​(javax.persistence.metamodel.SingularAttribute<? super X,​Y> assoc, javax.persistence.criteria.JoinType jt)
      Fetch join to the specified attribute using the given join type.
      java.util.List<org.eclipse.persistence.expressions.Expression> findJoinFetches()  
      void findJoins​(AbstractQueryImpl query)  
      <Y> javax.persistence.criteria.Path<Y> get​(java.lang.String attName)  
      <K,​V,​M extends java.util.Map<K,​V>>
      javax.persistence.criteria.Expression<M>
      get​(javax.persistence.metamodel.MapAttribute<X,​K,​V> map)
      Return the path corresponding to the referenced map-valued attribute.
      <E,​C extends java.util.Collection<E>>
      javax.persistence.criteria.Expression<C>
      get​(javax.persistence.metamodel.PluralAttribute<X,​C,​E> collection)
      Return the path corresponding to the referenced collection-valued attribute.
      <Y> javax.persistence.criteria.Path<Y> get​(javax.persistence.metamodel.SingularAttribute<? super X,​Y> att)
      Return the path corresponding to the referenced non-collection valued attribute.
      javax.persistence.criteria.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).
      java.util.Set<javax.persistence.criteria.Fetch<X,​?>> getFetches()
      Return the fetch joins that have been made from this type.
      java.util.Set<javax.persistence.criteria.Join<X,​?>> getJoins()  
      boolean isCorrelated()
      Whether the From object has been obtained as a result of correlation (use of a Subquery correlate method).
      boolean isFrom()  
      <T,​Y>
      javax.persistence.criteria.Join<T,​Y>
      join​(java.lang.String attributeName)  
      <T,​Y>
      javax.persistence.criteria.Join<T,​Y>
      join​(java.lang.String attributeName, javax.persistence.criteria.JoinType jt)  
      <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> collection, javax.persistence.criteria.JoinType jt)  
      <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> list, javax.persistence.criteria.JoinType jt)  
      <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> map, javax.persistence.criteria.JoinType jt)  
      <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> set, javax.persistence.criteria.JoinType jt)  
      <Y> javax.persistence.criteria.Join<X,​Y> join​(javax.persistence.metamodel.SingularAttribute<? super X,​Y> attribute)  
      <Y> javax.persistence.criteria.Join<X,​Y> join​(javax.persistence.metamodel.SingularAttribute<? super X,​Y> attribute, javax.persistence.criteria.JoinType jt)  
      <T,​Y>
      javax.persistence.criteria.CollectionJoin<T,​Y>
      joinCollection​(java.lang.String attributeName)  
      <T,​Y>
      javax.persistence.criteria.CollectionJoin<T,​Y>
      joinCollection​(java.lang.String attributeName, javax.persistence.criteria.JoinType jt)  
      <T,​Y>
      javax.persistence.criteria.ListJoin<T,​Y>
      joinList​(java.lang.String attributeName)  
      <T,​Y>
      javax.persistence.criteria.ListJoin<T,​Y>
      joinList​(java.lang.String attributeName, javax.persistence.criteria.JoinType jt)  
      <T,​K,​Y>
      javax.persistence.criteria.MapJoin<T,​K,​Y>
      joinMap​(java.lang.String attributeName)  
      <T,​K,​Y>
      javax.persistence.criteria.MapJoin<T,​K,​Y>
      joinMap​(java.lang.String attributeName, javax.persistence.criteria.JoinType jt)  
      <T,​Y>
      javax.persistence.criteria.SetJoin<T,​Y>
      joinSet​(java.lang.String attributeName)  
      <T,​Y>
      javax.persistence.criteria.SetJoin<T,​Y>
      joinSet​(java.lang.String attributeName, javax.persistence.criteria.JoinType jt)  
      javax.persistence.criteria.Expression<java.lang.Class<? extends X>> type()
      Return an expression corresponding to the type of the path.
      • Methods inherited from class java.lang.Object

        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.Path

        getModel, getParentPath
      • Methods inherited from interface javax.persistence.criteria.Selection

        alias, getCompoundSelectionItems, isCompoundSelection
      • Methods inherited from interface javax.persistence.TupleElement

        getAlias, getJavaType
    • Field Detail

      • managedType

        protected javax.persistence.metamodel.ManagedType managedType
      • joins

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

        protected java.util.Set<javax.persistence.criteria.Fetch<X,​?>> fetches
      • isJoin

        protected boolean isJoin
      • isFetch

        protected boolean isFetch
      • correlatedParent

        protected FromImpl correlatedParent
    • Constructor Detail

      • FromImpl

        public FromImpl​(javax.persistence.criteria.Path<Z> parentPath,
                        javax.persistence.metamodel.ManagedType managedType,
                        javax.persistence.metamodel.Metamodel metamodel,
                        java.lang.Class<X> javaClass,
                        org.eclipse.persistence.expressions.Expression expressionNode,
                        javax.persistence.metamodel.Bindable<T> modelArtifact)
      • FromImpl

        public FromImpl​(javax.persistence.criteria.Path<Z> parentPath,
                        javax.persistence.metamodel.ManagedType managedType,
                        javax.persistence.metamodel.Metamodel metamodel,
                        java.lang.Class<X> javaClass,
                        org.eclipse.persistence.expressions.Expression expressionNode,
                        javax.persistence.metamodel.Bindable<T> modelArtifact,
                        FromImpl correlatedParent)
    • Method Detail

      • getFetches

        public java.util.Set<javax.persistence.criteria.Fetch<X,​?>> getFetches()
        Return the fetch joins that have been made from this type.
        Specified by:
        getFetches in interface javax.persistence.criteria.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 javax.persistence.criteria.From<Z,​X>
        Returns:
        boolean indicating whether the object has been obtained through correlation
      • getCorrelationParent

        public javax.persistence.criteria.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 javax.persistence.criteria.From<Z,​X>
        Returns:
        the parent of the correlated From object
        Throws:
        java.lang.IllegalStateException - if the From object has not been obtained through correlation
      • fetch

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

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

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

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

        public <T,​Y> javax.persistence.criteria.Fetch<T,​Y> fetch​(java.lang.String assocName)
        Fetch join to the specified attribute or association using an inner join.
        Specified by:
        fetch in interface javax.persistence.criteria.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> javax.persistence.criteria.Fetch<T,​Y> fetch​(java.lang.String assocName,
                                                                             javax.persistence.criteria.JoinType jt)
        Fetch join to the specified attribute or association using the given join type.
        Specified by:
        fetch in interface javax.persistence.criteria.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 java.util.Set<javax.persistence.criteria.Join<X,​?>> getJoins()
        Specified by:
        getJoins in interface javax.persistence.criteria.From<Z,​X>
      • get

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

        public <E,​C extends java.util.Collection<E>> javax.persistence.criteria.Expression<C> get​(javax.persistence.metamodel.PluralAttribute<X,​C,​E> collection)
        Return the path corresponding to the referenced collection-valued attribute.
        Specified by:
        get in interface javax.persistence.criteria.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 java.util.Map<K,​V>> javax.persistence.criteria.Expression<M> get​(javax.persistence.metamodel.MapAttribute<X,​K,​V> map)
        Return the path corresponding to the referenced map-valued attribute.
        Specified by:
        get in interface javax.persistence.criteria.Path<Z>
        Overrides:
        get in class PathImpl<X>
        Parameters:
        map - map-valued attribute
        Returns:
        expression corresponding to the referenced attribute
      • type

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

        public <Y> javax.persistence.criteria.Path<Y> get​(java.lang.String attName)
        Specified by:
        get in interface javax.persistence.criteria.Path<Z>
        Overrides:
        get in class PathImpl<X>
      • join

        public <Y> javax.persistence.criteria.Join<X,​Y> join​(javax.persistence.metamodel.SingularAttribute<? super X,​Y> attribute)
        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> attribute,
                                                                   javax.persistence.criteria.JoinType jt)
        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.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.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> map)
        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,
                                                                             javax.persistence.criteria.JoinType jt)
        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,
                                                                      javax.persistence.criteria.JoinType jt)
        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,
                                                                       javax.persistence.criteria.JoinType jt)
        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,
                                                                                      javax.persistence.criteria.JoinType jt)
        Specified by:
        join in interface javax.persistence.criteria.From<Z,​X>
      • join

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

        public <T,​Y> javax.persistence.criteria.Join<T,​Y> join​(java.lang.String attributeName,
                                                                           javax.persistence.criteria.JoinType jt)
        Specified by:
        join in interface javax.persistence.criteria.From<Z,​X>
      • joinCollection

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

        public <T,​Y> javax.persistence.criteria.CollectionJoin<T,​Y> joinCollection​(java.lang.String attributeName,
                                                                                               javax.persistence.criteria.JoinType jt)
        Specified by:
        joinCollection in interface javax.persistence.criteria.From<Z,​X>
      • joinList

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

        public <T,​Y> javax.persistence.criteria.ListJoin<T,​Y> joinList​(java.lang.String attributeName,
                                                                                   javax.persistence.criteria.JoinType jt)
        Specified by:
        joinList in interface javax.persistence.criteria.From<Z,​X>
      • joinMap

        public <T,​K,​Y> javax.persistence.criteria.MapJoin<T,​K,​Y> joinMap​(java.lang.String attributeName)
        Specified by:
        joinMap in interface javax.persistence.criteria.From<Z,​X>
      • joinMap

        public <T,​K,​Y> javax.persistence.criteria.MapJoin<T,​K,​Y> joinMap​(java.lang.String attributeName,
                                                                                                 javax.persistence.criteria.JoinType jt)
        Specified by:
        joinMap in interface javax.persistence.criteria.From<Z,​X>
      • joinSet

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

        public <T,​Y> javax.persistence.criteria.SetJoin<T,​Y> joinSet​(java.lang.String attributeName,
                                                                                 javax.persistence.criteria.JoinType jt)
        Specified by:
        joinSet in interface javax.persistence.criteria.From<Z,​X>
      • findJoinFetches

        public java.util.List<org.eclipse.persistence.expressions.Expression> findJoinFetches()