Class TupleImpl

  • All Implemented Interfaces:
    java.io.Serializable, javax.persistence.Tuple

    public class TupleImpl
    extends java.lang.Object
    implements javax.persistence.Tuple, java.io.Serializable
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.persistence.queries.ReportQueryResult rqr  
      protected java.util.List<? super javax.persistence.criteria.Selection<?>> selections  
    • Constructor Summary

      Constructors 
      Constructor Description
      TupleImpl​(java.util.List<? super javax.persistence.criteria.Selection<?>> selections, org.eclipse.persistence.queries.ReportQueryResult rqr)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(int i)
      Get the value of the element at the specified position in the result tuple.
      <X> X get​(int i, java.lang.Class<X> type)
      Get the value of the element at the specified position in the result tuple.
      java.lang.Object get​(java.lang.String alias)
      Get the value of the tuple element to which the specified alias has been assigned.
      <X> X get​(java.lang.String alias, java.lang.Class<X> type)
      Get the value of the tuple result element to which the specified alias has been assigned.
      <X> X get​(javax.persistence.TupleElement<X> tupleElement)
      Get the value of the specified result element.
      java.util.List<javax.persistence.TupleElement<?>> getElements()
      Return the elements of the tuple
      java.lang.Object[] toArray()
      Return the values of the result tuple as an array.
      • Methods inherited from class java.lang.Object

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

      • selections

        protected java.util.List<? super javax.persistence.criteria.Selection<?>> selections
      • rqr

        protected org.eclipse.persistence.queries.ReportQueryResult rqr
    • Constructor Detail

      • TupleImpl

        public TupleImpl​(java.util.List<? super javax.persistence.criteria.Selection<?>> selections,
                         org.eclipse.persistence.queries.ReportQueryResult rqr)
    • Method Detail

      • get

        public <X> X get​(javax.persistence.TupleElement<X> tupleElement)
        Get the value of the specified result element.
        Specified by:
        get in interface javax.persistence.Tuple
        Parameters:
        tupleElement - tuple result element
        Returns:
        value of result element
        Throws:
        java.lang.IllegalArgumentException - if result element does not correspond to an element in the query result tuple
      • get

        public <X> X get​(java.lang.String alias,
                         java.lang.Class<X> type)
        Get the value of the tuple result element to which the specified alias has been assigned.
        Specified by:
        get in interface javax.persistence.Tuple
        Parameters:
        alias - alias assigned to result element
        Returns:
        type of the result element
        Throws:
        java.lang.IllegalArgumentException - if alias does not correspond to an element in the query tuple result or type is incorrect
      • get

        public java.lang.Object get​(java.lang.String alias)
        Get the value of the tuple element to which the specified alias has been assigned.
        Specified by:
        get in interface javax.persistence.Tuple
        Parameters:
        alias - alias assigned to tuple element
        Returns:
        value of the tuple element
        Throws:
        java.lang.IllegalArgumentException - if alias does not correspond to an element in the query result tuple
      • get

        public <X> X get​(int i,
                         java.lang.Class<X> type)
        Get the value of the element at the specified position in the result tuple. The first position is 0.
        Specified by:
        get in interface javax.persistence.Tuple
        Parameters:
        i - position in result tuple
        type - type of the result element
        Returns:
        value of the result element
        Throws:
        java.lang.IllegalArgumentException - if i exceeds length of result tuple or type is incorrect
      • get

        public java.lang.Object get​(int i)
        Get the value of the element at the specified position in the result tuple. The first position is 0.
        Specified by:
        get in interface javax.persistence.Tuple
        Parameters:
        i - position in result tuple
        Returns:
        value of the result element
        Throws:
        java.lang.IllegalArgumentException - if i exceeds length of result list
      • toArray

        public java.lang.Object[] toArray()
        Return the values of the result tuple as an array.
        Specified by:
        toArray in interface javax.persistence.Tuple
        Returns:
        result element values
      • getElements

        public java.util.List<javax.persistence.TupleElement<?>> getElements()
        Return the elements of the tuple
        Specified by:
        getElements in interface javax.persistence.Tuple