i dont know if we want to go down this road. its a mixin that is not very
obvious, how many people do you think know about IStyledColumn? besides it
might be two objects that represent the pk - like two longs for composite
pks. i really dont think it is that big a deal to implement equals/hashcode
on a model, and if people have their own variants of entitymodels they only
have one place to implement it. imho this is just bloat.

-igor


On 8/27/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
>
> Perhaps IEntityModel Object getEntityId/PK() would be better name?
> ICompressedModel doesn't really say much, sounds too abstract to me. Also
> I
> could live with EqualsDecorator as long as it clearly states with CAPITAL
> LETTERS that it can't be used on detachable models :)
>
> -Matej
>
> On 8/27/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> >
> > On 8/27/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > the reason i did not provide this when i wrote the repeaters package
> is
> > that
> > > it can lead down some pretty awful roads. an easy example where this
> > goes
> > > totally wrong is when you use detachable models for the items. if you
> > use
> > > this decorator all models from the previous page will be loaded
> because
> > they
> > > will all be compared - but in case of the detachable model it is not
> > > necesary to load the object, it is enough to only compare the id.
> > > so while this makes it easy it also makes it easy to make something
> > > inefficient because you dont have to think about it.
> >
> > Ok, I can follow that. If you are not using such models however, this
> > is a very convenient class. I think that if we give a clear enough
> > warning in the docs (and book) it should be ok.
> >
> > How about facilitating the case you described a little bit better as
> > well? Every project probably has it's own variants of entity models by
> > now. Wouldn't it be an idea to introduce an interface like
> > ICompressedModel { Object getCompressed() } or something along those
> > lines that people can implement and which would return e.g. the id
> > which would then be used by the wrapper?
> >
> > Eelco
> >
>

Reply via email to