|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LazyOutputHandler<T,S>
Lazy output handler handles output from LazyStatementHandler
and allows lazy
loading of data from it.
Useful in cases when you have to fetch a lot of data, but not all of it will be actually needed. For example if user searched for 100 pages but will be able to browse few pages only.
Please be informed that while using Lazy output handler you are responsible for manual resource handling.
Please do not forget to use QueryRunnerService.commit()
and
close()
after you finish with it's usage
Example usage: QueryRunnerService runner = MidaoFactory.getQueryRunner(ds, null, LazyStatementHandler.class); runner.setManualTransactionMode(true); ... LazyOutputHandler output = ... ... output.close(); runner.commit(); // use it even if you only executed query
Please be aware that functionality might be changed and most likely will be extended in future. Features which might be added in future: scrollability(not only forward) and updatability
Method Summary | |
---|---|
void |
close()
Function closes all resources used by this Lazy output handler instance. |
S |
getNext()
Returns next element from lazy list |
boolean |
hasNext()
Checks if lazy list has next element |
Methods inherited from interface org.midao.jdbc.core.handlers.output.OutputHandler |
---|
handle |
Method Detail |
---|
boolean hasNext()
S getNext()
void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |