|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
QueryResult is a wrapper interface wrapping results of an executed query.
Don't forget to release allocated resources using release()
method.
Example:
QueryResult res = myQuery.run(pm); try { process(res); } finally { res.release(); } // don't access res here anymore!
JQuery
,
JQueryFactory
Method Summary | |
MeIterator |
iterator()
Get iterator over the query result. |
MeIterator |
iterator(JQueryResultBuilder resultBuilder)
Get iterator over the query result. |
void |
prefetchAllRows()
Cache all rows in the query in memory and release underlying SQL result set. |
void |
release()
Release associated resources. |
boolean |
setEnableCache(boolean on)
Set cache on query result iterator current instance. |
int |
size()
Deprecated. |
Method Detail |
public MeIterator iterator()
Note: The iterator may reuse the returned object for next next()
or previous() call. If you wish to disable this caching, you may use
setEnableCache(boolean)
to disable it.
public MeIterator iterator(JQueryResultBuilder resultBuilder)
Note: The iterator may reuse the returned object for next next()
or previous() call. If you wish to disable this caching, you may use
setEnableCache(boolean)
to disable it.
resultBuilder
- result builder to change result row into custom row.
public int size()
Note: This method needs to actually execute the whole query in order to count # of returned elements. This poses a performance problem. Use with extreme caution!
public boolean setEnableCache(boolean on)
on
- if true, turn on the cache, if false, turn it off.
public void prefetchAllRows()
This method can only be called before obtaining the iterator.
public void release()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |