Interface ResultListTransformer<T>
- Type Parameters:
T- The result list element type
- All Known Subinterfaces:
ResultTransformer<T>
- All Known Implementing Classes:
AliasToBeanConstructorResultTransformer, AliasToBeanResultTransformer, AliasToEntityMapResultTransformer, 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.
-
Method Summary
Modifier and TypeMethodDescriptiontransformList(List<T> resultList) Here we have an opportunity to perform transformation on the query result as a whole.static <T> ResultListTransformer<T> AResultListTransformerwhich collapses a list of results into a single result when all results are equal, or throwsNonUniqueResultExceptionotherwise.
-
Method Details
-
transformList
Here we have an opportunity to perform transformation on the query result as a whole. This might be useful to convert from one collection type to another or to remove duplicates from the result, etc.- Parameters:
resultList- The result list as would otherwise be returned by theQuerywithout the intervention of thisResultListTransformer- Returns:
- The transformed result.
-
uniqueResultTransformer
AResultListTransformerwhich collapses a list of results into a single result when all results are equal, or throwsNonUniqueResultExceptionotherwise.- Type Parameters:
T- The result list element type- Since:
- 7.3
-