org.hibernate.transform
Class AliasToBeanConstructorResultTransformer

java.lang.Object
  extended byorg.hibernate.transform.AliasToBeanConstructorResultTransformer
All Implemented Interfaces:
ResultTransformer, Serializable

public class AliasToBeanConstructorResultTransformer
extends Object
implements ResultTransformer

Wraps the tuples in a constructor call. todo : why Alias* in the name???

See Also:
Serialized Form

Constructor Summary
AliasToBeanConstructorResultTransformer(Constructor constructor)
          Instantiates a AliasToBeanConstructorResultTransformer.
 
Method Summary
 boolean equals(Object other)
          2 AliasToBeanConstructorResultTransformer are considered equal if they have the same defined constructor.
 int hashCode()
          Define our hashCode by our defined constructor's hasCode.
 List transformList(List collection)
          
 Object transformTuple(Object[] tuple, String[] aliases)
          Wrap the incoming tuples in a call to our configured constructor.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AliasToBeanConstructorResultTransformer

public AliasToBeanConstructorResultTransformer(Constructor constructor)
Instantiates a AliasToBeanConstructorResultTransformer.

Parameters:
constructor - The contructor in which to wrap the tuples.
Method Detail

transformTuple

public Object transformTuple(Object[] tuple,
                             String[] aliases)
Wrap the incoming tuples in a call to our configured constructor.

Specified by:
transformTuple in interface ResultTransformer

transformList

public List transformList(List collection)

Specified by:
transformList in interface ResultTransformer

hashCode

public int hashCode()
Define our hashCode by our defined constructor's hasCode.

Returns:
Our defined ctor hashCode

equals

public boolean equals(Object other)
2 AliasToBeanConstructorResultTransformer are considered equal if they have the same defined constructor.

Parameters:
other - The other instance to check for equality.
Returns:
True if both have the same defined constuctor; false otherwise.