so if you want IDataProvider<A,B> A being iterator and B being model,
why not do the A->B transform in iterator() itself? obviously you are
caching the lookup anyways so there shouldnt be a performance hit...
-igor
On Wed, Apr 23, 2008 at 12:46 AM, Jan Kriesten
<[EMAIL PROTECTED]> wrote:
>
> hi,
>
> i stumbled over the generification of the IDataProvider, which IMHO doesn't
> make sense as it is now:
>
> public interface IDataProvider<T>
> extends IDetachable
> {
> java.util.Iterator<T> iterator(int first, int count);
> IModel<T> model(java.lang.Object object);
> int size();
> }
>
> this would mean, that the Iterator + the IModel would contain the same type
> information, making it impossible to use an Iterator over Integers and
> lookup those Integer-ids within model to return a User e.g.
>
> best regards, --- jan.
>
>
>