ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <erlend.bjo...@aftenposten.no>
Subject SV: Pagination
Date Mon, 02 Jul 2007 16:13:21 GMT
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:Hemant.Kamatgi@target.com] 
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:clinton.begin@gmail.com] 
Sent: Monday, July 02, 2007 10:59 AM
To: user-java@ibatis.apache.org; lmeadors@apache.org
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 <lmeadors@apache.org> 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 <andre.ufrj@gmail.com> 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
>

Mime
View raw message