Save This Page
Home » Hibernate-3.3.2.GA » org.hibernate » transform » [javadoc | source]
org.hibernate.transform
public interface: ResultTransformer [javadoc | source]

All Implemented Interfaces:
    Serializable

All Known Implementing Classes:
    RootEntityResultTransformer, PassThroughResultTransformer, ToListResultTransformer, DistinctRootEntityResultTransformer, DistinctResultTransformer, AliasToBeanConstructorResultTransformer, BasicTransformerAdapter, AliasToBeanResultTransformer, AliasToEntityMapResultTransformer

Implementors define a strategy for transforming query results into the actual application-visible query result list.
Method from org.hibernate.transform.ResultTransformer Summary:
transformList,   transformTuple
Method from org.hibernate.transform.ResultTransformer Detail:
 public 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.
 public 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.