On 10 Feb 2015 at 10:07:22, Marius Dumitru Florea 
([email protected](mailto:[email protected])) wrote:

[snip]

> > Option 1:
> > =========
> >
> > GroupManager
> > |_ Iterator getAllUsers()
> >
> > (in the future we would also have a getMatchingUsers(…))
> >
> > By default the impl would retrieve batches of user references from the 
> > group (say 100 at a time)
> >
> > However, if you want to get just 1 user for example, this is a bit overkill 
> > to get 100 DB results. But is that a real use case? So we also have option 
> > 2:
> >
> > Option 2:
> > ==========
> >
> > GroupManager
> > |_ GroupResultSet getAllUsers()
> >
> > Where:
> >
> > GroupResultSet
> > |_ Iterator iterator() - default to batch size of 100
> > |_ Iterator iterator(int batchSize)
>  
> > |_ Collection get(int nb, int offset) (do we really need this api?)
>  
> Definitely. For an API that may return a very large list we need to be
> able to paginate the display (e.g. group members live table).

Indeed, good point.

Thanks
-Vincent

[snip]

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to