All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hypersistence.utils.hibernate.query.ListResultTransformer Maven / Gradle / Ivy

There is a newer version: 3.8.3
Show newest version
package io.hypersistence.utils.hibernate.query;

import org.hibernate.transform.ResultTransformer;

import java.util.List;

/**
 * The {@link ListResultTransformer} simplifies the way
 * we can use a ResultTransformer by defining a default implementation for the
 * {@link ResultTransformer#transformList(List)} method.
 * 

* This way, the {@link ListResultTransformer} can be used * as a functional interface. *

* For more details about how to use it, check out this article on vladmihalcea.com. * * @author Vlad Mihalcea * @since 2.9.0 */ @FunctionalInterface public interface ListResultTransformer extends ResultTransformer { /** * Default implementation returning the tuples list as-is. * * @param tuples tuples list * @return tuples list */ @Override default List transformList(List tuples) { return tuples; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy