Package org.hibernate.transform
Interface TupleSubsetResultTransformer
-
- All Superinterfaces:
ResultTransformer
,java.io.Serializable
- All Known Implementing Classes:
AliasedTupleSubsetResultTransformer
,AliasToBeanResultTransformer
,AliasToEntityMapResultTransformer
,DistinctRootEntityResultTransformer
,PassThroughResultTransformer
,RootEntityResultTransformer
public interface TupleSubsetResultTransformer extends ResultTransformer
A ResultTransformer that operates on "well-defined" and consistent subset of a tuple's elements. "Well-defined" means that:- the indexes of tuple elements accessed by a TupleSubsetResultTransformer depends only on the aliases and the number of elements in the tuple; i.e, it does not depend on the value of the tuple being transformed;
- any tuple elements included in the transformed value are unmodified by the transformation;
- transforming equivalent tuples with the same aliases multiple times results in transformed values that are equivalent;
- the result of transforming the tuple subset (only those elements accessed by the transformer) using only the corresponding aliases is equivalent to transforming the full tuple with the full array of aliases;
- the result of transforming a tuple with non-accessed tuple elements and corresponding aliases set to null is equivalent to transforming the full tuple with the full array of aliases;
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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?-
Methods inherited from interface org.hibernate.transform.ResultTransformer
transformList, transformTuple
-
-
-
-
Method Detail
-
isTransformedValueATupleElement
boolean isTransformedValueATupleElement(java.lang.String[] aliases, int tupleLength)
When a tuple is transformed, is the result a single element of the tuple?- Parameters:
aliases
- - the aliases that correspond to the tupletupleLength
- - the number of elements in the tuple- Returns:
- true, if the transformed value is a single element of the tuple; false, otherwise.
-
includeInTransform
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.- Parameters:
aliases
- - the aliases that correspond to the tupletupleLength
- - the number of elements in the tuple- Returns:
- array with the i-th element indicating whether the i-th element of the tuple is included in the transformed value.
-
-