ENH: Add Query findEach() with batch consumer

This is a variation of findEach() that makes it easy to have a batch consumer processing a large result in batches.  For example, process in batches of 50 beans.

Note that the last batch consumed/processed will often have less than the batch size.
This commit is contained in:
Rob Bygrave committed 2021-03-10 00:18:35 +13:00
1 parent 98aee9ca62
commit 2bb5a85bd6
13 files changed
+252 -101

No files matched your search

@@ -675,6 +675,10 @@ public class TDSpiEbeanServer implements SpiEbeanServer {
public <T> void findEach(Query<T> query, Consumer<T> consumer, Transaction transaction) {
}
@Override
public <T> void findEach(Query<T> query, int batch, Consumer<List<T>> consumer, Transaction t) {
}
@Override
public <T> void findEachWhile(Query<T> query, Predicate<T> consumer, Transaction transaction) {
}