Steffen Stundzig wrote:
> 
> yes i know these parameters. In the old (no JPA) hibernate usage i use
> the criteria api which has support for first and max result since many
> years.
> 
> But what I need as parameters are
> - first page
> - page size
> 
> and as result I need a result object, something like
> - FindResult<Planet>()
> 
> with
> - List<Planet> getValues()
> - int maxNumberOfPages
> - int pageSize
> 
> So we have something more then only two parameters to add.
> 

Ok, so the difference is that in the response you get a count of how many
values there are in total (but in pages). Do you execute an extra count
query each time?

I suggest that our access objects (FindAll, FindByQuery, FindByCriteria)
support firstResult and maxResult, since that is simple and something that
developers recognize from JPA/Hibernate.

We can also add a CountAll access object.

Thereafter we add other built in repository operations pageableFindAll,
pageableFindByQuery, pageableFindByCriteria, which use the mechanisms of
firstResult, maxResult and count, but expose another API, with the paging
objects you suggest.

I can do an attempt with pageableFindAll and you can review the
implementation before we continue with more. Steffen, can you send me a code
example of your implementation, or anything you think is useful.

/Patrik

-- 
View this message in context: 
http://www.nabble.com/-sculptor--pagination-tp20636538s17564p25861179.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to