You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Dougall Squair <Do...@metcash.com> on 2003/11/04 23:37:04 UTC

ReportQueryRsIterator

Hi,

Should the class org.apache.ojb.broker.accesslayer.ReportQueryRsIterator
also set the cursor position

e.g. Like the code in

org.apache.ojb.broker.core.PersistenceBrokerImpl#getCollectionByQuery(Class
collectionClass, Class itemClass, Query query)

            int startAt = query.getStartAtIndex();
            int endAt = query.getEndAtIndex();
            if (startAt > 1)
            {
                // needs to be just before startAt, as next() is called for
first result.
                iter.absolute(startAt - 1);
            }
            if (endAt < startAt)
            {
                // BRJ : make sure endAt > startAt
                endAt = iter.size() + 1;
            }

at the moment report queries seems to be ignoring the startAt and endAt
values which have been set within a Query.

Regards

Dougall

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


Re: ReportQueryRsIterator

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi dougall,

paging is now possible for all OJBIterators.

hth
jakob

Jakob Braeuchi wrote:

> hi dougall,
> 
> i'll have a look at startIndex for Iterators. endIndex is imo not possible.
> 
> jakob
> 
> Dougall Squair wrote:
> 
>> Hi,
>>
>> Should the class org.apache.ojb.broker.accesslayer.ReportQueryRsIterator
>> also set the cursor position
>>
>> e.g. Like the code in
>>
>> org.apache.ojb.broker.core.PersistenceBrokerImpl#getCollectionByQuery(Class 
>>
>> collectionClass, Class itemClass, Query query)
>>
>>             int startAt = query.getStartAtIndex();
>>             int endAt = query.getEndAtIndex();
>>             if (startAt > 1)
>>             {
>>                 // needs to be just before startAt, as next() is 
>> called for
>> first result.
>>                 iter.absolute(startAt - 1);
>>             }
>>             if (endAt < startAt)
>>             {
>>                 // BRJ : make sure endAt > startAt
>>                 endAt = iter.size() + 1;
>>             }
>>
>> at the moment report queries seems to be ignoring the startAt and endAt
>> values which have been set within a Query.
>>
>> Regards
>>
>> Dougall
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 


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


Re: ReportQueryRsIterator

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi dougall,

i'll have a look at startIndex for Iterators. endIndex is imo not possible.

jakob

Dougall Squair wrote:

> Hi,
> 
> Should the class org.apache.ojb.broker.accesslayer.ReportQueryRsIterator
> also set the cursor position
> 
> e.g. Like the code in
> 
> org.apache.ojb.broker.core.PersistenceBrokerImpl#getCollectionByQuery(Class
> collectionClass, Class itemClass, Query query)
> 
>             int startAt = query.getStartAtIndex();
>             int endAt = query.getEndAtIndex();
>             if (startAt > 1)
>             {
>                 // needs to be just before startAt, as next() is called for
> first result.
>                 iter.absolute(startAt - 1);
>             }
>             if (endAt < startAt)
>             {
>                 // BRJ : make sure endAt > startAt
>                 endAt = iter.size() + 1;
>             }
> 
> at the moment report queries seems to be ignoring the startAt and endAt
> values which have been set within a Query.
> 
> Regards
> 
> Dougall
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 


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