I understand you idea however from practice I know that from service method you have to return not only result set but also some additional information for paging. For example total number of pages to show, or how many next pages is available for paging.
Pavel On Sun, Nov 23, 2008 at 11:02 AM, Steffen Stundzig <[EMAIL PROTECTED]> wrote: > Hi, > > what i mean is, e.g. on each findAll we could generate two findAll > methods in services and/or repositories. The first is the current one, > the second (new) contains 2 additional parameters (int firstResult, int > maxResults). So we are compatible with older versions. > > These parameters could we very simple propagated to the criteria based > FinderAccessApi-classes with criteria.setMaxResults() and so on. > > These feature is generic and should be paramterizable per > generate.pagination. > > I'm implementing it in my local sculptor-generator project and be very > appreciated if it could be in the main trunk. So the diff between the > generator branches is a little bit smaller. ;-) > > I don't know how we could implement this without hibernate but with real > JPA, but I'm sure it's possible. > > > What do you mean? > > regards > Steffen... > > Patrik Nordwall schrieb: >> Do you mean that you would like to have support for pagination in the built >> in queries, such as findAll? >> If you write your own query (access object) I don't think there is anything >> stopping you from implementing pagination. You can pass your own (non >> persistent) objects holding these parameters. Please explain more. >> /Patrik >> >> >> Steffen Stundzig wrote: >>> Hi all, >>> >>> there are any thoughts about pagination of hibernate queries in sculptor? >>> >>> We could use the criteria or the query api for that, but we need also >>> propagation of the page parameters such firstResult and MaxResults in the >>> Services and Repositories, so clients could use it. >>> >>> see >>> http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/objectstate.html#d0e763 >>> hibernate reference >>> >>> regards >>> >> > > -- > Steffen Stundzig > > Telefon: +49 (0) 341 / 231-0183-401 > Telefax: +49 (0) 341 / 231-0183-411 > Mobil: +49 (0) 151 / 173-9673-1 (!neu) > > http://itemis.de > [EMAIL PROTECTED] > https://www.xing.com/profile/Steffen_Stundzig > > itemis AG > Ludwig-Erhard-Straße 51 > 04103 Leipzig > > Rechtlicher Hinweis: > > Amtsgericht Dortmund, HRB 20621 > > Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek > > Aufsichtsrat: Dr. Burkhard Igel(Vors.), Stephan Grollmann, Michael Neuhaus > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Fornax-developer mailing list > Fornax-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fornax-developer > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer