Skip to content

Instantly share code, notes, and snippets.

Yves Martin ymartin59

  • Switzerland
View GitHub Profile
@ymartin59
ymartin59 / IterableListScrollableResults.java
Created Apr 1, 2014
IterableListScrollableResults<E> is a partial wrapper view as a List<E> on an Hibernate ScrollableResults. When an existing code process a large amount of Hibernate entities as a List<E>, it allows to work with data in stream without a large code refactoring.
View IterableListScrollableResults.java
import java.util.AbstractList;
import java.util.Iterator;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import org.hibernate.ScrollableResults;
import org.hibernate.Session;
/**
* A List<E> partial wrapper view on an Hibernate ScrollableResults.
You can’t perform that action at this time.