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 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 TupleTransformer is automatically wrapped in an instance of RowTransformerTupleTransformerAdapter, adapting it to the RowTransformer contract, which is always used to actually process the results internally.
  • Method Summary

    Modifier and Type
    Method
    Description
    transformTuple(Object[] tuple, String[] aliases)
    Tuples are the elements making up each "row" of the query result.
  • Method Details

    • 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 elements
      aliases - The result aliases ("parallel" array to tuple)
      Returns:
      The transformed row.