db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject startIndex for getIteratorByQuery ???
Date Thu, 06 Nov 2003 21:05:01 GMT
hi all,

in the post http://article.gmane.org/gmane.comp.jakarta.ojb.user/10034 
dougall asks if startIndex is supported for ReportQueries.

after a little digging i found a quite simple solution in the 
constructor of RsIterator:

m_query = query;
m_rsAndStmt = broker.serviceJdbcAccess().executeQuery(query, mif);

// BRJ : position resultset before start index
if (query.getStartAtIndex() > 1)
    absolute(query.getStartAtIndex() - 1);


this allows using startIndex not only for Collections. endIndex is not 
supported though.

do you think it's reasonable to support startIndex for Iterators as well 


To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message