Class SelectionImpl<X>

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

    public abstract class SelectionImpl<X>
    extends Object
    implements jakarta.persistence.criteria.Selection<X>, InternalSelection, 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
    • Constructor Detail

      • SelectionImpl

        public SelectionImpl​(Class<X> javaType,
                             Expression expressionNode)
    • Method Detail

      • getCurrentNode

        public 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 jakarta.persistence.criteria.Selection<X> alias​(String name)
        Assign an alias to the selection.
        Specified by:
        alias in interface jakarta.persistence.criteria.Selection<X>
        Parameters:
        name - alias
      • getAlias

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

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

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

        public List<jakarta.persistence.criteria.Selection<?>> getCompoundSelectionItems()
        Return selection items composing a compound selection
        Specified by:
        getCompoundSelectionItems in interface jakarta.persistence.criteria.Selection<X>
        Returns:
        list of selection items
        Throws:
        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 jakarta.persistence.criteria.Selection<X>
        Returns:
        boolean