Niclas Hedhman wrote:
Ouch!!!
I was looking at the details. EntityComposite.remove() is the
"callback" Lifecycle.remove(), and shouldn't be called from outside.
Doesn't that mean that the Lifecycle interface should note be exposed
in EntityComposite and instead be a private mixin that the Qi4j
runtime calls, if present?
It might be that it really should be more like Initializable, meaning,
it can be implemented by any mixin, and when we do UoW.remove() we call
it on any mixin that has it. That would seem to make even more sense.
The problem otherwise, if we make it a private mixin, is that there's no
code referencing it so we would have to "hack" its presence. Also, since
usually the implementation will be to handle aggregated state the only
thing you'd want to do with it is to create Concerns that catch create()
and remove(), and then do the buildup/cleanup. By allowing mixins to
implement it directly I think both of these things become much cleaner
to implement.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev