public class AliasToEntityMapResultTransformer extends AliasedTupleSubsetResultTransformer
ResultTransformer
implementation which builds a map for each "row",
made up of each aliased value where the alias is the map key.
Since this transformer is stateless, all instances would be considered equal.
So for optimization purposes we limit it to a single, singleton instance
.Modifier and Type | Field and Description |
---|---|
static AliasToEntityMapResultTransformer |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
isTransformedValueATupleElement(String[] aliases,
int tupleLength)
When a tuple is transformed, is the result a single element of the tuple?
|
Object |
transformTuple(Object[] tuple,
String[] aliases)
Tuples are the elements making up each "row" of the query result.
|
includeInTransform
transformList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transformList
public static final AliasToEntityMapResultTransformer INSTANCE
public Object transformTuple(Object[] tuple, String[] aliases)
transformTuple
in interface ResultTransformer
transformTuple
in class BasicTransformerAdapter
tuple
- The result elementsaliases
- The result aliases ("parallel" array to tuple)public boolean isTransformedValueATupleElement(String[] aliases, int tupleLength)
aliases
- - the aliases that correspond to the tupletupleLength
- - the number of elements in the tupleCopyright © 2012 JBoss by Red Hat. All Rights Reserved.