public class DistinctRootEntityResultTransformer extends Object implements TupleSubsetResultTransformer
Much like RootEntityResultTransformer, but we also distinct
the entity in the final result.
<p/>
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 DistinctRootEntityResultTransformer |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
boolean[] |
includeInTransform(String[] aliases,
int tupleLength)
Returns an array with the i-th element indicating whether the i-th
element of the tuple is included in the transformed value.
|
boolean |
isTransformedValueATupleElement(String[] aliases,
int tupleLength)
When a tuple is transformed, is the result a single element of the tuple?
|
List |
transformList(List list)
Simply delegates to
DistinctResultTransformer.transformList(java.util.List). |
Object |
transformTuple(Object[] tuple,
String[] aliases)
Simply delegates to
RootEntityResultTransformer.transformTuple(java.lang.Object[], java.lang.String[]). |
public static final DistinctRootEntityResultTransformer INSTANCE
public Object transformTuple(Object[] tuple, String[] aliases)
Simply delegates to RootEntityResultTransformer.transformTuple(java.lang.Object[], java.lang.String[]).
transformTuple in interface ResultTransformertuple - The tuple to transformaliases - The tuple aliasespublic List transformList(List list)
Simply delegates to DistinctResultTransformer.transformList(java.util.List).
transformList in interface ResultTransformerlist - The list to transform.public boolean[] includeInTransform(String[] aliases, int tupleLength)
TupleSubsetResultTransformerReturns an array with the i-th element indicating whether the i-th element of the tuple is included in the transformed value.
includeInTransform in interface TupleSubsetResultTransformeraliases - - the aliases that correspond to the tupletupleLength - - the number of elements in the tuplepublic boolean isTransformedValueATupleElement(String[] aliases, int tupleLength)
TupleSubsetResultTransformerWhen a tuple is transformed, is the result a single element of the tuple?
isTransformedValueATupleElement in interface TupleSubsetResultTransformeraliases - - the aliases that correspond to the tupletupleLength - - the number of elements in the tupleCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.