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 |
|---|---|
| public static final AliasToEntityMapResultTransformer |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | isTransformedValueATupleElement(String[]
- the aliases that correspond to the tuple aliases, int - the number of elements in the tuple tupleLength)Implements org. |
| private Object | Returns: The singleton instance :INSTANCESerialization hook for ensuring singleton uniqueing. |
| public Object | transformTuple(Object[]
The result elements tuple, String[] The result aliases ("parallel" array to tuple) aliases)Overrides org. Implements org. |
| INSTANCE | back to summary |
|---|---|
| public static final AliasToEntityMapResultTransformer INSTANCE | |
| AliasToEntityMapResultTransformer | back to summary |
|---|---|
| private AliasToEntityMapResultTransformer() Disallow instantiation of AliasToEntityMapResultTransformer. | |
| isTransformedValueATupleElement | back to summary |
|---|---|
| public boolean isTransformedValueATupleElement(String[] aliases, int tupleLength) Implements org. Doc from org. When a tuple is transformed, is the result a single element of the tuple? | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() Serialization hook for ensuring singleton uniqueing. | |
| transformTuple | back to summary |
|---|---|
| public Object transformTuple(Object[] tuple, String[] aliases) Overrides org. Implements org. Doc from org. Tuples are the elements making up each "row" of the query result. The contract here is to transform these elements into the final row. | |