EclipseLink 2.0.0_ 2.0.0.v20090626-r4569 API Reference

javax.persistence
Interface Tuple


public interface Tuple

Interface for extracting the select list items from a query result tuple.


Method Summary
 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(TupleElement<X> tupleElement)
          Get the value of the specified result element.
 java.util.List<TupleElement<?>> getElements()
          Return the elements of the tuple
 java.lang.Object[] toArray()
          Return the values of the result tuple as an array.
 

Method Detail

get

<X> X get(TupleElement<X> tupleElement)
Get the value of the specified result element.

Parameters:
resultElement - tuple result element
Returns:
value of result element
Throws:
IllegalArgument - exception if result element does not correspond to an element in the query result tuple

get

<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.

Parameters:
alias - alias assigned to result element
Returns:
type of the result element
Throws:
IllegalArgument - exception if alias does not correspond to an element in the query tuple result or type is incorrect

get

java.lang.Object get(java.lang.String alias)
Get the value of the tuple element to which the specified alias has been assigned.

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

<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.

Parameters:
i - position in result tuple
type - type of the result element
Returns:
value of the result element
Throws:
IllegalArgument - exception if i exceeds length of result tuple or type is incorrect

get

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.

Parameters:
i - position in result tuple
Returns:
value of the result element
Throws:
IllegalArgument - exception if i exceeds length of result list

toArray

java.lang.Object[] toArray()
Return the values of the result tuple as an array.

Returns:
result element values

getElements

java.util.List<TupleElement<?>> getElements()
Return the elements of the tuple


EclipseLink 2.0.0_ 2.0.0.v20090626-r4569 API Reference