Class SelectionImpl<X>

  • All Implemented Interfaces:
    java.io.Serializable, javax.persistence.criteria.Selection<X>, javax.persistence.TupleElement<X>, InternalSelection
    Direct Known Subclasses:
    CompoundSelectionImpl, ExpressionImpl

    public abstract class SelectionImpl<X>
    extends java.lang.Object
    implements javax.persistence.criteria.Selection<X>, InternalSelection, java.io.Serializable

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

    Description: The Selection is the expression describing what should be returned by the query.

    Since:
    EclipseLink 1.2
    Author:
    gyorke
    See Also:
    Join, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String alias  
      protected org.eclipse.persistence.expressions.Expression currentNode  
      protected java.lang.Class<X> javaType  
    • Constructor Summary

      Constructors 
      Constructor Description
      SelectionImpl​(java.lang.Class<X> javaType, org.eclipse.persistence.expressions.Expression expressionNode)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.persistence.criteria.Selection<X> alias​(java.lang.String name)
      Assign an alias to the selection.
      java.lang.String getAlias()  
      java.util.List<javax.persistence.criteria.Selection<?>> getCompoundSelectionItems()
      Return selection items composing a compound selection
      org.eclipse.persistence.expressions.Expression getCurrentNode()
      Returns the current EclipseLink expression at this node in the criteria expression tree
      java.lang.Class<? extends X> getJavaType()  
      boolean isCompoundSelection()
      Whether the selection item is a compound selection
      boolean isConstructor()  
      boolean isFrom()  
      boolean isRoot()  
      void setJavaType​(java.lang.Class<X> javaType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • javaType

        protected java.lang.Class<X> javaType
      • currentNode

        protected org.eclipse.persistence.expressions.Expression currentNode
      • alias

        protected java.lang.String alias
    • Constructor Detail

      • SelectionImpl

        public SelectionImpl​(java.lang.Class<X> javaType,
                             org.eclipse.persistence.expressions.Expression expressionNode)
    • Method Detail

      • getCurrentNode

        public org.eclipse.persistence.expressions.Expression getCurrentNode()
        Returns the current EclipseLink expression at this node in the criteria expression tree
        Specified by:
        getCurrentNode in interface InternalSelection
        Returns:
        the currentNode
      • alias

        public javax.persistence.criteria.Selection<X> alias​(java.lang.String name)
        Assign an alias to the selection.
        Specified by:
        alias in interface javax.persistence.criteria.Selection<X>
        Parameters:
        name - alias
      • getAlias

        public java.lang.String getAlias()
        Specified by:
        getAlias in interface javax.persistence.TupleElement<X>
      • getJavaType

        public java.lang.Class<? extends X> getJavaType()
        Specified by:
        getJavaType in interface javax.persistence.TupleElement<X>
      • setJavaType

        public void setJavaType​(java.lang.Class<X> javaType)
      • getCompoundSelectionItems

        public java.util.List<javax.persistence.criteria.Selection<?>> getCompoundSelectionItems()
        Return selection items composing a compound selection
        Specified by:
        getCompoundSelectionItems in interface javax.persistence.criteria.Selection<X>
        Returns:
        list of selection items
        Throws:
        java.lang.IllegalStateException - if selection is not a compound selection
      • isCompoundSelection

        public boolean isCompoundSelection()
        Whether the selection item is a compound selection
        Specified by:
        isCompoundSelection in interface javax.persistence.criteria.Selection<X>
        Returns:
        boolean