org.hibernate.transform

Class AliasToBeanConstructorResultTransformer

Implemented Interfaces:
ResultTransformer, Serializable

public class AliasToBeanConstructorResultTransformer
extends java.lang.Object
implements ResultTransformer

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

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.

Constructor Details

AliasToBeanConstructorResultTransformer

public AliasToBeanConstructorResultTransformer(Constructor constructor)
Instantiates a AliasToBeanConstructorResultTransformer.
Parameters:
constructor - The contructor in which to wrap the tuples.

Method Details

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.

hashCode

public int hashCode()
Define our hashCode by our defined constructor's hasCode.
Returns:
Our defined ctor hashCode

transformList

public List transformList(List collection)
Specified by:
transformList in interface ResultTransformer

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