Class TupleImpl
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.querydef.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.ReportQueryResultrqrprotected 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.Objectget(int i)Get the value of the element at the specified position in the result tuple.<X> Xget(int i, java.lang.Class<X> type)Get the value of the element at the specified position in the result tuple.java.lang.Objectget(java.lang.String alias)Get the value of the tuple element to which the specified alias has been assigned.<X> Xget(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> Xget(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 tuplejava.lang.Object[]toArray()Return the values of the result tuple as an array.
-
-
-
Method Detail
-
get
public <X> X get(javax.persistence.TupleElement<X> tupleElement)
Get the value of the specified result element.- Specified by:
getin interfacejavax.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:
getin interfacejavax.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:
getin interfacejavax.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:
getin interfacejavax.persistence.Tuple- Parameters:
i- position in result tupletype- 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:
getin interfacejavax.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:
toArrayin interfacejavax.persistence.Tuple- Returns:
- result element values
-
getElements
public java.util.List<javax.persistence.TupleElement<?>> getElements()
Return the elements of the tuple- Specified by:
getElementsin interfacejavax.persistence.Tuple
-
-