public final class RootEntityResultTransformer extends BasicTransformerAdapter implements TupleSubsetResultTransformer
ResultTransformer
implementation which limits the result tuple
to only the "root entity".
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 RootEntityResultTransformer |
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?
|
Object |
transformTuple(Object[] tuple,
String[] aliases)
Return just the root entity from the row tuple.
|
transformList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transformList
public static final RootEntityResultTransformer 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)
TupleSubsetResultTransformer
isTransformedValueATupleElement
in interface TupleSubsetResultTransformer
aliases
- - the aliases that correspond to the tupletupleLength
- - the number of elements in the tuplepublic boolean[] includeInTransform(String[] aliases, int tupleLength)
TupleSubsetResultTransformer
includeInTransform
in interface TupleSubsetResultTransformer
aliases
- - the aliases that correspond to the tupletupleLength
- - the number of elements in the tupleCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.