|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- the entity type yielded by the query, as determined by which Select
factory method was usedR
- the result type that the consumer will return once all entities have been acceptedpublic interface EntityListConsumer<E,R>
Provide an entity list consumer to SelectQuery.ExecutionContext.consumeWith(EntityListConsumer)
to accept a stream of results from the entity engine.
Note that use of this interface is not sufficient to guarantee streaming behaviour on all database types. Some
implementations (MySQL and Postgres in particular) have special requirements regarding transaction state and
fetch size to make that work. If you need an example of how to do this, see DefaultSaxEntitiesExporter
.
Method Summary | |
---|---|
void |
consume(E entity)
Called by the entity engine so that the entity yielded by the query may be accepted and processed by the consumer. |
R |
result()
Called by the entity engine to obtain the return value after all entities have been consumed. |
Method Detail |
---|
void consume(E entity)
entity
- the entity yielded by the select queryR result()
consume(Object)
will not be called again
afterwards.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |