com.vladmihalcea.hibernate.query
Class ListResultTransformer

java.lang.Object
  extended by com.vladmihalcea.hibernate.query.ListResultTransformer
All Implemented Interfaces:
Serializable, org.hibernate.transform.ResultTransformer
Direct Known Subclasses:
ListResultTransformer

public abstract class ListResultTransformer
extends Object
implements org.hibernate.transform.ResultTransformer

The ListResultTransformer simplifies the way we can use a ResultTransformer by defining a default implementation for the ResultTransformer.transformList(List) method.

This way, the ListResultTransformer can be used as a functional interface.

For more details about how to use it, check out this article on vladmihalcea.com.

Since:
2.9.0
Author:
Vlad Mihalcea
See Also:
Serialized Form

Constructor Summary
ListResultTransformer()
           
 
Method Summary
 List transformList(List tuples)
          Default implementation returning the tuples list as-is.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.transform.ResultTransformer
transformTuple
 

Constructor Detail

ListResultTransformer

public ListResultTransformer()
Method Detail

transformList

public List transformList(List tuples)
Default implementation returning the tuples list as-is.

Specified by:
transformList in interface org.hibernate.transform.ResultTransformer
Parameters:
tuples - tuples list
Returns:
tuples list


Copyright © 2022. All rights reserved.