Good ideas and would like to support paging in the standard queries, such as
findAll. Let me know when you have something that you would like to
contribute to trunk and I will review it and commit. 

I assume that we need to support paging in FindByCriteriaAccessImpl. We need
to add Paging and PagedResult classes in the framework, i.e. in package
org.fornax.cartridges.sculptor.framework.domain
To simplify usage in DSL we could define special types for PagedResult and
Paging.

Isn't the result always a List? 
public class PagedResult<T> {
        public List<T> getValues();

Any questions, please ask and I will try to advice.

/Patrik



Steffen Stundzig wrote:
> 
> thanks pavel for this information. It sounds better than my first attempt.
> 
> The api of the example PlanetServiceImpl could looks like:
> -----    
>     public List<Planet> findAll(ServiceContext ctx) {
>         return planetRepository.findAll();
>     }
> 
>     public PagedResult<List<Planet>> findAll(ServiceContext ctx, Paging
> paging) {
>       return planetRepository.findAll(paging);
>     }
> -----
> 
> PagedResult is parameterized with the real finder result:
> -----
>     public class PagedResult<T> {
>       public <T> getValues();
>       int currentPage;
>       int pageSize;
>       int maxResults;
>       int maxNumberOfPages;
>         // ctor
>         // getter/setter
>     }
> -----
> Paging contains:
> -----    
>     public class Paging {
>       int currentPage = 0;
>       int pageSize = 25;
>       boolean calculateCount = true;
>       // ctor
>       // getter/setter
>     }
> ------
> 
> It's correct?
> 
> 
> PaloT wrote:
>> 
>> When "count" is set to false another parameter in Paging will say how
>> many
>> pages forward we have to look that GUI can show only so many pages
>> forward
>> in pager.
>> 
> 
> Could you explain these a little bit please? 
> 
> regards
>    Steffen...
> 

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


-------------------------------------------------------------------------
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

Reply via email to