openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Keays <roger.ke...@ninthavenue.com.au>
Subject Re: JPA Pagination
Date Fri, 27 Jun 2008 08:03:02 GMT
Patel Amit wrote:
> Hi,
> 
>  
> 
> I have a question about JPA Pagination.  I'm using the setFirstResult
> and setMaxResults on the JPA Query object.  These features work great
> (using OpenJPA 1.1.0).  My question is, is there a way to get the total
> number of results returned even with the page number settings set?  For
> example, if I set the MaxResults to 10, and the total results of the
> query is 25 (without setting the MaxResults) is there a way to get the
> 25 value?  Right now, I'm just issuing a second query without the
> maxResults set and getting the collection size, but I'm wondering if
> there is a more efficient way of doing it.

@see also 
http://www.ilikespam.com/blog/paging-large-data-sets-with-a-lazylist

> 
>  
> 
> Thanks for the help.
> 
>  
> 
> Amit Patel 
> 
>  
> 
> 


Mime
View raw message