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.
@Incubating@FunctionalInterfacepublic interfaceTupleTransformer<T>
Defines some transformation applied to each result of aQuerybefore the results are packaged as aListand 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
TupleTransformeris automatically wrapped in an instance ofRowTransformerTupleTransformerAdapter, adapting it to theRowTransformercontract, which is always used to actually process the results internally.
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TtransformTuple(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.