TupleSubsetResultTransformer (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.transform
Interface TupleSubsetResultTransformer

All Superinterfaces:
  ResultTransformer, 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:

1. 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;
2. any tuple elements included in the transformed value are unmodified by the transformation;
3. transforming equivalent tuples with the same aliases multiple times results in transformed values that are equivalent;
4. 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;
5. 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
`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?

Methods inherited from interface org.hibernate.transform.ResultTransformer
`transformList, transformTuple`

Method Detail

### isTransformedValueATupleElement

    boolean isTransformedValueATupleElement(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 tuple
    `tupleLength` - - 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(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 tuple
    `tupleLength` - - 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.