Package com.orchestranetworks.query
Interface Tuple
public interface Tuple
Interface for extracting the elements of a query result tuple.
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptionget
(int i) Returns the value of the element at the specified position in the result tuple.<X> X
Returns the value of the element at the specified position in the result tuple.Returns the value of the tuple element to which the specified alias has been assigned.<X> X
Returns the value of the tuple element to which the specified alias has been assigned.Object[]
toArray()
Returns the values of the result tuple elements as an array.
-
Method Details
-
get
Returns the value of the tuple element to which the specified alias has been assigned. See SQL documentation to have more information about the mapping between SQL and Java types.- Parameters:
alias
- alias assigned to the tuple elementtype
- type of the tuple element- Returns:
- the value of the tuple element
- Throws:
IllegalArgumentException
- if the alias does not correspond to an element in the query result tuple, or if element cannot be assigned to the specified type
-
get
Returns the value of the tuple element to which the specified alias has been assigned.- Parameters:
alias
- alias assigned to the tuple element- Returns:
- value of the tuple element
- Throws:
IllegalArgumentException
- if alias does not correspond to an element in the query result tuple
-
get
Returns the value of the element at the specified position in the result tuple. The first position is 0. See SQL documentation to have more information about the mapping between SQL and Java types.- Parameters:
i
- position in result tupletype
- type of the tuple element- Returns:
- value of the tuple element
- Throws:
IllegalArgumentException
- if i exceeds length of result tuple or element cannot be assigned to the specified type
-
get
Returns 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 tuple element
- Throws:
IllegalArgumentException
- if i exceeds length of result tuple
-
toArray
Object[] toArray()Returns the values of the result tuple elements as an array.- Returns:
- tuple element values
-