T - the type of entity bean being queried.public interface QueryResultVisitor<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)
.fetch("contacts", new FetchConfig().query(2))
.where().gt("id", 0)
.orderBy("id")
.setMaxRows(2);
query.findVisit(new QueryResultVisitor<Customer>() {
public boolean accept(Customer customer) {
// do something with customer
System.out.println("-- visit " + customer);
return true;
}
});
boolean accept(T bean)
bean - the entity bean to processCopyright © 2014. All Rights Reserved.