To make it more clear... then your first page starts on page 1
(pageNumber = 1) .. so you don't have to transform the value you 
send in for page 1, to 0 :-)

Clear as ink :-)

-----Opprinnelig melding-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sendt: 2. juli 2007 18:13
Til: user-java@ibatis.apache.org
Emne: SV: Pagination

Hi there!

In your dao class you can call the sqlMap for example like this:

result = sqlMap.queryForList("searchCompanies", searchBean, ((pageNumber-1) * 
pageSize), pageSize);

Use of variables named like this, makes it more easy to read if you ask me :-)


Take care,
Erlend

-----Opprinnelig melding-----
Fra: Hemant.Kamatgi [mailto:[EMAIL PROTECTED] 
Sendt: 2. juli 2007 18:07
Til: user-java@ibatis.apache.org
Emne: RE: Pagination

Correct, In our project we've used the below api to achieve pagination 
successfully.

public List queryForList(String id, Object parameterObject, int skip, int max)

Rgds
HK

-----Original Message-----
From: Clinton Begin [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 02, 2007 10:59 AM
To: user-java@ibatis.apache.org; [EMAIL PROTECTED]
Subject: Re: Pagination

Right.  Don't use the paginator stuff...but feel free to still use the
query limits:

queryForList("statement", param, offset, maxrows)

clinton

On 7/1/07, Larry Meadors <[EMAIL PROTECTED]> wrote:
> The best example is one that doesn't exist: don't use it. :)
>
> It's not going to be in iBATIS 3 because it's not really part of the
> core of what iBATIS does - mapping data.
>
> Most all modern databases provide similar functionality that will
> perform better, and use fewer resources.
>
> Larry
>
>
> On 7/1/07, André Rodrigues Pena <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > I'm new to iBatis. I'd like to see a complete example of how to use
> > pagination in my queries. I searched google but I didn't find an example
> > including both query and java example of usage.
> >
> > Thanks in advance
> >
> > --
> > André Rodrigues Pena
>

Reply via email to