Package org.hibernate.transform
Class AliasToEntityMapResultTransformer
- java.lang.Object
-
- org.hibernate.transform.AliasToEntityMapResultTransformer
-
- All Implemented Interfaces:
Serializable,ResultListTransformer<Map<String,Object>>,TupleTransformer<Map<String,Object>>,TypedTupleTransformer<Map<String,Object>>,ResultTransformer<Map<String,Object>>
public class AliasToEntityMapResultTransformer extends Object implements ResultTransformer<Map<String,Object>>, TypedTupleTransformer<Map<String,Object>>
ResultTransformerimplementation which builds a map for each "row", made up of each aliased value where the alias is the map key.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static AliasToEntityMapResultTransformerINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassgetTransformedType()The type resulting from this transformationMap<String,Object>transformTuple(Object[] tuple, String[] aliases)Tuples are the elements making up each "row" of the query result.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.transform.ResultTransformer
transformList
-
-
-
-
Field Detail
-
INSTANCE
public static final AliasToEntityMapResultTransformer INSTANCE
-
-
Method Detail
-
getTransformedType
public Class getTransformedType()
Description copied from interface:TypedTupleTransformerThe type resulting from this transformation- Specified by:
getTransformedTypein interfaceTypedTupleTransformer<Map<String,Object>>
-
transformTuple
public Map<String,Object> transformTuple(Object[] tuple, String[] aliases)
Description copied from interface:TupleTransformerTuples are the elements making up each "row" of the query result. The contract here is to transform these elements into the final row shape.- Specified by:
transformTuplein interfaceTupleTransformer<Map<String,Object>>- Parameters:
tuple- The result elementsaliases- The result aliases ("parallel" array to tuple)- Returns:
- The transformed row.
-
-