Class AliasToBeanConstructorResultTransformer<T>

java.lang.Object
org.hibernate.transform.AliasToBeanConstructorResultTransformer<T>
All Implemented Interfaces:
Serializable, ResultListTransformer<T>, TupleTransformer<T>, TypedTupleTransformer<T>, ResultTransformer<T>

@Deprecated public class AliasToBeanConstructorResultTransformer<T> extends Object implements ResultTransformer<T>, TypedTupleTransformer<T>
Deprecated.
since ResultTransformer is deprecated
Wraps the tuples in a constructor call.
See Also:
  • Constructor Details

    • AliasToBeanConstructorResultTransformer

      public AliasToBeanConstructorResultTransformer(Constructor<T> constructor)
      Deprecated.
      Instantiates a AliasToBeanConstructorResultTransformer.
      Parameters:
      constructor - The constructor in which to wrap the tuples.
  • Method Details

    • getTransformedType

      public Class<T> getTransformedType()
      Deprecated.
      Description copied from interface: TypedTupleTransformer
      The type resulting from this transformation
      Specified by:
      getTransformedType in interface TypedTupleTransformer<T>
    • transformTuple

      public T transformTuple(Object[] tuple, String[] aliases)
      Deprecated.
      Wrap the incoming tuples in a call to our configured constructor.
      Specified by:
      transformTuple in interface TupleTransformer<T>
      Parameters:
      tuple - The result elements
      aliases - The result aliases ("parallel" array to tuple)
      Returns:
      The transformed row.
    • hashCode

      public int hashCode()
      Deprecated.
      Define our hashCode by our defined constructor's hasCode.
      Overrides:
      hashCode in class Object
      Returns:
      Our defined ctor hashCode
    • equals

      public boolean equals(Object other)
      Deprecated.
      2 AliasToBeanConstructorResultTransformer are considered equal if they have the same defined constructor.
      Overrides:
      equals in class Object
      Parameters:
      other - The other instance to check for equality.
      Returns:
      True if both have the same defined constructor; false otherwise.