Top Description Fields Constructors Methods
org.hibernate.transform

public Class DistinctRootEntityResultTransformer

extends Object
implements ResultTransformer, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.transform.ResultTransformer
Imports
java.util.List, java.io.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.

Authors
Gavin King, Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final DistinctRootEntityResultTransformer

Constructor Summary

AccessConstructor and Description
private
DistinctRootEntityResultTransformer()

Disallow instantiation of DistinctRootEntityResultTransformer.

Method Summary

Modifier and TypeMethod and Description
private Object

Returns:

The singleton instance : INSTANCE
readResolve
()

Serialization hook for ensuring singleton uniqueing.

public List<E>

Returns:

The transformed List.
transformList
(List<E>
The list to transform.
list
)

Implements org.hibernate.transform.ResultTransformer.transformList.

Simply delegates to DistinctResultTransformer#transformList.
public Object

Returns:

The transformed tuple row.
transformTuple
(Object[]
The tuple to transform
tuple
,
String[]
The tuple aliases
aliases
)

Implements org.hibernate.transform.ResultTransformer.transformTuple.

Simply delegates to RootEntityResultTransformer#transformTuple.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final DistinctRootEntityResultTransformer INSTANCE

Constructor Detail

DistinctRootEntityResultTransformerback to summary
private DistinctRootEntityResultTransformer()

Disallow instantiation of DistinctRootEntityResultTransformer.

Method Detail

readResolveback to summary
private Object readResolve()

Serialization hook for ensuring singleton uniqueing.

Returns:Object

The singleton instance : INSTANCE

transformListback to summary
public List<E> transformList(List<E> list)

Implements org.hibernate.transform.ResultTransformer.transformList.

Simply delegates to DistinctResultTransformer#transformList.

Parameters
list:List<E>

The list to transform.

Returns:List<E>

The transformed List.

transformTupleback to summary
public Object transformTuple(Object[] tuple, String[] aliases)

Implements org.hibernate.transform.ResultTransformer.transformTuple.

Simply delegates to RootEntityResultTransformer#transformTuple.

Parameters
tuple:Object[]

The tuple to transform

aliases:String[]

The tuple aliases

Returns:Object

The transformed tuple row.