org.hibernate.transform
public class: DistinctRootEntityResultTransformer [javadoc |
source]
java.lang.Object
org.hibernate.transform.DistinctRootEntityResultTransformer
All Implemented Interfaces:
ResultTransformer, Serializable
Much like
RootEntityResultTransformer , but we also distinct the entity in the final result.
Since this transformer is stateless, all instances would be considered equal. So for optimization purposes
we limit it to a single, singleton
instance (this is not quite true yet: see deprecation notice
on
constructor ).
- author:
Gavin - King
- author:
Steve - Ebersole
| Field Summary |
|---|
| public static final DistinctRootEntityResultTransformer | INSTANCE | |
| Method from org.hibernate.transform.DistinctRootEntityResultTransformer Detail: |
public boolean equals(Object other) {
// todo : we can remove this once the deprecated ctor can be made private...
return other != null && DistinctRootEntityResultTransformer.class.isInstance( other );
}
|
public int hashCode() {
// todo : we can remove this once the deprecated ctor can be made private...
return DistinctRootEntityResultTransformer.class.getName().hashCode();
}
|
public List transformList(List list) {
return DistinctResultTransformer.INSTANCE.transformList( list );
}
|
public Object transformTuple(Object[] tuple,
String[] aliases) {
return RootEntityResultTransformer.INSTANCE.transformTuple( tuple, aliases );
}
|