Package org.hibernate.query
Interface TupleTransformer<T>
- All Known Subinterfaces:
ResultTransformer<T>,TypedTupleTransformer<T>
- All Known Implementing Classes:
AliasToBeanConstructorResultTransformer,AliasToBeanResultTransformer,AliasToEntityMapResultTransformer,NativeQueryArrayTransformer,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.
Defines some transformation applied to each result of a
Query
before the results are packaged as a List and returned to the caller. Each result
is received as a tuple (that is, as an Object[]), and may be transformed to
some other type.- See Also:
- Implementation Note:
- Every
TupleTransformeris automatically wrapped in an instance ofRowTransformerTupleTransformerAdapter, adapting it to theRowTransformercontract, which is always used to actually process the results internally.
-
Method Summary
Modifier and TypeMethodDescriptiontransformTuple(Object[] tuple, String[] aliases) Tuples are the elements making up each "row" of the query result.
-
Method Details
-
transformTuple
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.
-