org.hibernate.transform
public final class: RootEntityResultTransformer [javadoc |
source]
java.lang.Object
org.hibernate.transform.BasicTransformerAdapter
org.hibernate.transform.RootEntityResultTransformer
All Implemented Interfaces:
Serializable, ResultTransformer
ResultTransformer implementation which limits the result tuple
to only the "root entity".
Since this transformer is stateless, all instances would be considered equal.
So for optimization purposes we limit it to a single, singleton
instance .
- author:
Gavin - King
- author:
Steve - Ebersole
| Field Summary |
|---|
| public static final RootEntityResultTransformer | INSTANCE | |
| Method from org.hibernate.transform.RootEntityResultTransformer Detail: |
public boolean equals(Object other) {
// todo : we can remove this once the deprecated ctor can be made private...
return other != null && RootEntityResultTransformer.class.isInstance( other );
}
|
public int hashCode() {
// todo : we can remove this once the deprecated ctor can be made private...
return RootEntityResultTransformer.class.getName().hashCode();
}
|
public Object transformTuple(Object[] tuple,
String[] aliases) {
return tuple[ tuple.length-1 ];
}
Return just the root entity from the row tuple. |