You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Jakob Braeuchi <jb...@gmx.ch> on 2003/11/06 22:05:01 UTC
startIndex for getIteratorByQuery ???
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
Re: startIndex for getIteratorByQuery ???
Posted by Jakob Braeuchi <jb...@gmx.ch>.
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