|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type of entity beanpublic interface QueryListener<T>
Provides a mechanism for processing a query one bean at a time.
This is useful when the query will return a large number of results and you want to process the beans one at a time rather than whole all of the beans in memory at once.
QueryListener<Order> listener = ...; Query<Order> query = Ebean.createQuery(Order.class); // set the listener that will process each order one at a time query.setListener(listener); // execute the query. Note that the returned // list will be empty ... so don't bother assigning it query.findList();
Method Summary | |
---|---|
void |
process(T bean)
Process the bean that has just been read. |
Method Detail |
---|
void process(T bean)
This bean will not be added to the List Set or Map and nor will it be put into the PersistenceContext. This is what makes this a good way to process a large result set (which could normally use a lot of memory).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |