java.lang.Object
org.eclipse.persistence.internal.jpa.querydef.TupleImpl
All Implemented Interfaces:
Tuple, Serializable

public class TupleImpl extends Object implements Tuple, Serializable
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • get

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

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

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

      public <X> X get(int i, 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 Tuple
      Parameters:
      i - position in result tuple
      type - type of the result element
      Returns:
      value of the result element
      Throws:
      IllegalArgumentException - if i exceeds length of result tuple or type is incorrect
    • get

      public 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 Tuple
      Parameters:
      i - position in result tuple
      Returns:
      value of the result element
      Throws:
      IllegalArgumentException - if i exceeds length of result list
    • toArray

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

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