db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject Re: startIndex for getIteratorByQuery ???
Date Mon, 10 Nov 2003 16:36:51 GMT
hi all,

any ideas regarding this feature ?

jakob

Jakob Braeuchi wrote:

> 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);
> }
> 
> prefetchRelationships(query);
> 
> 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 
>  ???
> 
> jakob
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


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


Mime
View raw message