接口 ResultTransformer
-
- 所有超级接口:
Serializable
- 所有已知子接口:
TupleSubsetResultTransformer
- 所有已知实现类:
AliasedTupleSubsetResultTransformer,AliasToBeanConstructorResultTransformer,AliasToBeanResultTransformer,AliasToEntityMapResultTransformer,BasicTransformerAdapter,CacheableResultTransformer,CriteriaQueryTupleTransformer,DistinctResultTransformer,DistinctRootEntityResultTransformer,NativeQueryTupleTransformer,PassThroughResultTransformer,RootEntityResultTransformer,ToListResultTransformer,TupleBuilderTransformer
public interface ResultTransformer extends Serializable
Implementors define a strategy for transforming query results into the actual application-visible query result list.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ListtransformList(List collection)Here we have an opportunity to perform transformation on the query result as a whole.ObjecttransformTuple(Object[] tuple, String[] aliases)Tuples are the elements making up each "row" of the query result.
-
-
-
方法详细资料
-
transformTuple
Object 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.- 参数:
tuple- The result elementsaliases- The result aliases ("parallel" array to tuple)- 返回:
- The transformed row.
-
transformList
List transformList(List collection)
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.- 参数:
collection- The result.- 返回:
- The transformed result.
-
-