public class

AliasToBeanConstructorResultTransformer

extends Object
implements ResultTransformer
java.lang.Object
   ↳ org.hibernate.transform.AliasToBeanConstructorResultTransformer

Class Overview

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

Summary

Public Constructors
AliasToBeanConstructorResultTransformer(Constructor constructor)
Instantiates a AliasToBeanConstructorResultTransformer.
Public Methods
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)
Here we have an opportunity to perform transformation on the query result as a whole.
Object transformTuple(Object[] tuple, String[] aliases)
Wrap the incoming tuples in a call to our configured constructor.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.transform.ResultTransformer

Public Constructors

public AliasToBeanConstructorResultTransformer (Constructor constructor)

Instantiates a AliasToBeanConstructorResultTransformer.

Parameters
constructor The contructor in which to wrap the tuples.

Public Methods

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.

public int hashCode ()

Define our hashCode by our defined constructor's hasCode.

Returns
  • Our defined ctor hashCode

public List transformList (List collection)

Here we have an opportunity to perform transformation on the query result as a whole. This might be useful to convert from one collection type to another or to remove duplicates from the result, etc.

Parameters
collection The result.
Returns
  • The transformed result.

public Object transformTuple (Object[] tuple, String[] aliases)

Wrap the incoming tuples in a call to our configured constructor.

Parameters
tuple The result elements
aliases The result aliases ("parallel" array to tuple)
Returns
  • The transformed row.