ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: PaginatedList question
Date Tue, 28 Jun 2005 12:10:48 GMT
Could you add your experience with this to the WIKI?

Something in the FAQ re: "How do I get record/page counts for a mapped
statement?" would be great.

Larry


On 6/28/05, Aladin <ibatis@aladin.ca> wrote:
> Hi,
> 
> Thanks for the responses.  It's unfortunate that the documentation was
> wrong... because that would have been a nice way of getting a general
> idea as to the number of pages in the set.
> 
> Aladin
> 
> 
> Clinton Begin wrote:
> >
> > The documentation is mistaken.  Previous() should not wrap for the
> > paginated list.  Regardless, you shouldn't use that approach to
> > calculate the number of pages, you should use a separate count(*) query
> > and divide by page size.
> >
> > For high performance systems, you should not use paginated list at
> > all....you should use queryForList with skip and count parameters.
> >
> > Clinton
> >
> >
> > On 6/27/05, ibatis@aladin.ca <mailto:ibatis@aladin.ca> <ibatis@aladin.ca
> > <mailto:ibatis@aladin.ca>> wrote:
> >
> >     Hello,
> >
> >     I seem to be having some problem with the PaginatedList.
> >
> >     When I'm on the first page and I do paginatedList.getPreviousPage(),
> >     iBatis doesn't wrap to the last page... as specified in the javadoc.  I
> >     need this wrapping functionality to compute the total number of pages in
> >     the result set.
> >
> >     Does anyone have any idea as to why this might be happening?
> >
> >     I am using postgres with jdb3.
> >
> >     Thanks.
> >     Aladin
> >
> >
>

Mime
View raw message