[ ] IDataProvider<I,T>
[x] Iterator<IModel<T>> , drop model
[ ] Leave as is.
Leaving it as is just doesn't make sense as it doesn't support the use case
on hand.
Using IDataProvider<I, T> is OK too. For those whose I == T, we can always
have a convenient base class:
abstract class ModelProvider<T> implements IDataProvider<T, T> {
IModel<T> model(T object) {
return object;
}
}
Iterator<IModel<T>> will make the interface simpler. For those who
need to wrap domain objects as models, we can provide a wrapper
iterator:
abstract class ModelWrapperIterator<T> implements Iterator<T> {
ModelWrapperIterator(Iterator<T> source) {
...
}
abstract IModel<T> map(T sourceElement);
}
-----
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
--
View this message in context:
http://www.nabble.com/VOTE%3A-Generics-of-IDataProvider-tp16871723p16957615.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]