Top Description Fields Constructors Methods
org.hibernate.transform

public Class AliasToBeanConstructorResultTransformer<T>

extends Object
implements ResultTransformer<T>, TypedTupleTransformer<T>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.TypedTupleTransformer, org.hibernate.query.TupleTransformer, org.hibernate.transform.ResultTransformer, java.io.Serializable, org.hibernate.query.ResultListTransformer
Annotations
@Deprecated
Imports
java.lang.reflect.Constructor, org.hibernate.InstantiationException, .QueryException, org.hibernate.query.TypedTupleTransformer

Deprecated

since ResultTransformer is deprecated

Wraps the tuples in a constructor call.

Field Summary

Modifier and TypeField and Description
private final Constructor<T>

Constructor Summary

AccessConstructor and Description
public
AliasToBeanConstructorResultTransformer(Constructor<T>
The constructor in which to wrap the tuples.
constructor
)

Instantiates a AliasToBeanConstructorResultTransformer.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if both have the same defined constructor; false otherwise.
equals
(Object
The other instance to check for equality.
other
)

Overrides java.lang.Object.equals.

2 AliasToBeanConstructorResultTransformer are considered equal if they have the same defined constructor.
public Class<T>
getTransformedType()

Implements org.hibernate.query.TypedTupleTransformer.getTransformedType.

The type resulting from this transformation
public int

Returns:

Our defined ctor hashCode
hashCode
()

Overrides java.lang.Object.hashCode.

Define our hashCode by our defined constructor's hasCode.
public T
transformTuple(Object[]
The result elements
tuple
,
String[]
The result aliases ("parallel" array to tuple)
aliases
)

Implements org.hibernate.query.TupleTransformer.transformTuple.

Wrap the incoming tuples in a call to our configured constructor.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

constructorback to summary
private final Constructor<T> constructor

Constructor Detail

AliasToBeanConstructorResultTransformerback to summary
public AliasToBeanConstructorResultTransformer(Constructor<T> constructor)

Instantiates a AliasToBeanConstructorResultTransformer.

Parameters
constructor:Constructor<T>

The constructor in which to wrap the tuples.

Method Detail

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

2 AliasToBeanConstructorResultTransformer are considered equal if they have the same defined constructor.

Parameters
other:Object

The other instance to check for equality.

Returns:boolean

True if both have the same defined constructor; false otherwise.

Annotations
@Override
getTransformedTypeback to summary
public Class<T> getTransformedType()

Implements org.hibernate.query.TypedTupleTransformer.getTransformedType.

Doc from org.hibernate.query.TypedTupleTransformer.getTransformedType.

The type resulting from this transformation

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Define our hashCode by our defined constructor's hasCode.

Returns:int

Our defined ctor hashCode

Annotations
@Override
transformTupleback to summary
public T transformTuple(Object[] tuple, String[] aliases)

Implements org.hibernate.query.TupleTransformer.transformTuple.

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

Parameters
tuple:Object[]

Doc from org.hibernate.query.TupleTransformer.transformTuple.

The result elements

aliases:String[]

Doc from org.hibernate.query.TupleTransformer.transformTuple.

The result aliases ("parallel" array to tuple)

Returns:T

Doc from org.hibernate.query.TupleTransformer.transformTuple.

The transformed row.

Annotations
@Override