org.hibernate.transform
Class DistinctRootEntityResultTransformer
java.lang.Object
org.hibernate.transform.DistinctRootEntityResultTransformer
- ResultTransformer, Serializable
public class DistinctRootEntityResultTransformer
extends java.lang.Object
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
).
DistinctRootEntityResultTransformer
public DistinctRootEntityResultTransformer()
Use the INSTANCE
reference instead of explicitly creating a new one (to be removed in 3.4).
Instantiate a DistinctRootEntityResultTransformer.
todo : make private, see deprecation notice
equals
public boolean equals(Object other)
hashCode
public int hashCode()
transformTuple
public Object transformTuple(Object[] tuple,
String[] aliases)
- transformTuple in interface ResultTransformer
tuple
- The tuple to transformaliases
- The tuple aliases
- The transformed tuple row.