Class TupleImpl
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.querydef.TupleImpl
-
- All Implemented Interfaces:
jakarta.persistence.Tuple,Serializable
public class TupleImpl extends Object implements jakarta.persistence.Tuple, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ReportQueryResultrqrprotected List<? super jakarta.persistence.criteria.Selection<?>>selections
-
Constructor Summary
Constructors Constructor Description TupleImpl(List<? super jakarta.persistence.criteria.Selection<?>> selections, ReportQueryResult rqr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(int i)Get the value of the element at the specified position in the result tuple.<X> Xget(int i, Class<X> type)Get the value of the element at the specified position in the result tuple.<X> Xget(jakarta.persistence.TupleElement<X> tupleElement)Get the value of the specified result element.Objectget(String alias)Get the value of the tuple element to which the specified alias has been assigned.<X> Xget(String alias, Class<X> type)Get the value of the tuple result element to which the specified alias has been assigned.List<jakarta.persistence.TupleElement<?>>getElements()Return the elements of the tupleObject[]toArray()Return the values of the result tuple as an array.
-
-
-
Field Detail
-
selections
protected List<? super jakarta.persistence.criteria.Selection<?>> selections
-
rqr
protected ReportQueryResult rqr
-
-
Constructor Detail
-
TupleImpl
public TupleImpl(List<? super jakarta.persistence.criteria.Selection<?>> selections, ReportQueryResult rqr)
-
-
Method Detail
-
get
public <X> X get(jakarta.persistence.TupleElement<X> tupleElement)
Get the value of the specified result element.- Specified by:
getin interfacejakarta.persistence.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:
getin interfacejakarta.persistence.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:
getin interfacejakarta.persistence.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:
getin interfacejakarta.persistence.Tuple- Parameters:
i- position in result tupletype- 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:
getin interfacejakarta.persistence.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:
toArrayin interfacejakarta.persistence.Tuple- Returns:
- result element values
-
getElements
public List<jakarta.persistence.TupleElement<?>> getElements()
Return the elements of the tuple- Specified by:
getElementsin interfacejakarta.persistence.Tuple
-
-