public class DistinctRootEntityResultTransformer extends java.lang.Object implements TupleSubsetResultTransformer
RootEntityResultTransformer
, but we also distinct
the entity in the final result.
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(java.lang.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(java.lang.String[] aliases,
int tupleLength)
When a tuple is transformed, is the result a single element of the tuple?
|
java.util.List |
transformList(java.util.List list)
Simply delegates to
DistinctResultTransformer.transformList(java.util.List) . |
java.lang.Object |
transformTuple(java.lang.Object[] tuple,
java.lang.String[] aliases)
Simply delegates to
RootEntityResultTransformer.transformTuple(java.lang.Object[], java.lang.String[]) . |
public static final DistinctRootEntityResultTransformer INSTANCE
public java.lang.Object transformTuple(java.lang.Object[] tuple, java.lang.String[] aliases)
RootEntityResultTransformer.transformTuple(java.lang.Object[], java.lang.String[])
.transformTuple
in interface ResultTransformer
tuple
- The tuple to transformaliases
- The tuple aliasespublic java.util.List transformList(java.util.List list)
DistinctResultTransformer.transformList(java.util.List)
.transformList
in interface ResultTransformer
list
- The list to transform.public boolean[] includeInTransform(java.lang.String[] aliases, int tupleLength)
TupleSubsetResultTransformer
includeInTransform
in interface TupleSubsetResultTransformer
aliases
- - the aliases that correspond to the tupletupleLength
- - the number of elements in the tuplepublic boolean isTransformedValueATupleElement(java.lang.String[] aliases, int tupleLength)
TupleSubsetResultTransformer
isTransformedValueATupleElement
in interface TupleSubsetResultTransformer
aliases
- - the aliases that correspond to the tupletupleLength
- - the number of elements in the tupleCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.