Nice how far and fast we should go. My question is if we need support for NOT paging functions. When page parameter is null we should return all results. When paging parameter is filled we should follow it. Only reason for keeping no paging interface is backward compatibility but we can break it with new version, can't we?
Pavel On Mon, Oct 12, 2009 at 8:56 PM, Patrik Nordwall <patrik.nordw...@gmail.com> wrote: > > > > 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 > ------------------------------------------------------------------------------ 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