public interface Tuple
Tuple defines an interface for generic query result projection
Usage example:
List<Tuple> result = query.from(employee).select(employee.firstName, employee.lastName).fetch();
for (Tuple row : result) {
System.out.println("firstName " + row.get(employee.firstName));
System.out.println("lastName " + row.get(employee.lastName));
}
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
All Tuples should override equals and hashCode.
|
<T> T |
get(Expression<T> expr)
Get a tuple element by expression
|
<T> T |
get(int index,
java.lang.Class<T> type)
Get a Tuple element by index
|
int |
hashCode()
All Tuples should override equals and hashCode.
|
int |
size()
Get the size of the Tuple
|
java.lang.Object[] |
toArray()
Get the content as an Object array
|
@Nullable
<T> T get(int index,
java.lang.Class<T> type)
T - type of elementindex - zero based indextype - type of element@Nullable <T> T get(Expression<T> expr)
T - type of elementexpr - expression keyint size()
java.lang.Object[] toArray()
boolean equals(java.lang.Object o)
java.util.Arrays#equals(Object[], Object[]) with #toArray() as parameters.equals in class java.lang.Objectint hashCode()
java.util.Arrays#hashCode(Object[]) with #toArray() as parameter.hashCode in class java.lang.ObjectCopyright © 2007–2021 Querydsl. All rights reserved.