Package org.hibernate.query
Interface TupleTransformer<T>
-
- All Known Subinterfaces:
ResultTransformer<T>
,TypedTupleTransformer<T>
- All Known Implementing Classes:
AliasToBeanConstructorResultTransformer
,AliasToBeanResultTransformer
,AliasToEntityMapResultTransformer
,NativeQueryConstructorTransformer
,NativeQueryListTransformer
,NativeQueryMapTransformer
,NativeQueryTupleTransformer
,ToListResultTransformer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@Incubating @FunctionalInterface public interface TupleTransformer<T>
Defines some transformation applied to each result of aQuery
before the results are packaged as aList
and returned to the caller. Each result is received as a tuple (that is, as anObject[]
), and may be transformed to some other type.- See Also:
Query.setTupleTransformer(org.hibernate.query.TupleTransformer<T>)
,Query.list()
,Query.getResultList()
,ResultListTransformer
,RowTransformer
- Implementation Note:
- Every
TupleTransformer
is automatically wrapped in an instance ofRowTransformerTupleTransformerAdapter
, adapting it to theRowTransformer
contract, which is always used to actually process the results internally.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
transformTuple(Object[] tuple, String[] aliases)
Tuples are the elements making up each "row" of the query result.
-
-
-
Method Detail
-
transformTuple
T transformTuple(Object[] tuple, String[] aliases)
Tuples are the elements making up each "row" of the query result. The contract here is to transform these elements into the final row shape.- Parameters:
tuple
- The result elementsaliases
- The result aliases ("parallel" array to tuple)- Returns:
- The transformed row.
-
-