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 Jakob Braeuchi <jb...@gmx.ch> on 2003/05/04 19:53:17 UTC
Re: Using the Methods setStartAtIndex & SetEndAtIndex in Class Query
hi christian,
this works for me using the latest from repository and mysql.
jakob
Christian Ehmig wrote:
>I am using PB API and trying to "imitate" a SELECT * FROM * LIMIT x,y.
>While browsing through the JavaDoc for the Class Query I found the following two methods:
>
> setStartAtIndex(int arg)
> (comment: Set the row at which the query should start retrieving results, inclusive.)
>
> setEndAtIndex(int arg)
> (comment: Set the row at which the query should stop retieving results, exlusive.)
>
>I tried to use them but they seem to do really nothing.
>
>Code excerpt:
>Query query = new QueryByCriteria(Foo.class, null);
>
>query.setStartAtIndex(10);
>
>query.setEndAtIndex(25);
>
>
>
>Does anybody know a solution or even a workaround? I desperately need this for paging results.
>
>Thanks a lot,
>
>Christian
>
>
>