T - the type of entity bean being queried.public interface QueryEachConsumer<T>
If you wish to stop further processing return false from the accept method.
Unlike findList() and findSet() using a QueryResultVisitor does not require all the beans in the query result to be held in memory at once. This makes QueryResultVisitor useful for processing large queries.
Query<Customer> query = server.find(Customer.class)
.where().eq("status", Status.NEW)
.order().asc("id");
query.findEach((Customer customer) -> {
// do something with customer
System.out.println("-- visit " + customer);
});
| Modifier and Type | Method and Description |
|---|---|
void |
accept(T bean)
Process the bean.
|
Copyright © 2016. All rights reserved.