This has been discussed before as well. Here is Niclas' explanation:
--------------------------------------------------------------------
Ok, this comes back to the same thing;
* A declared mixin is NOT to say that it must be included in the
Composite, but that it is a CANDIDATE for inclusion. The exact
composition depends on what methods are found in the Composite.
This seems to be a very recurring issue, and perhaps the single most
complicated thing in Qi4j to overcome initially.
When you declare
@Mixins(SomeEntityMixinWithJustLC.class)
public interface SomeEntityWithJustLC
extends SomeEntity, EntityComposite
{
}
There is no method that needs an implementation provided by the
SomeEntityMixinWithJustLC mixin, hence it will not be part of the
Composite.
OTOH, if you declare
@Mixins(SomeEntityMixinWithJustLC.class)
public interface SomeEntityWithJustLC
extends SomeEntity, EntityComposite, Lifecycle
{
}
then THERE IS something needed from the SomeEntityMixinWithJustLC
mixin, namely the create() and remove() methods.
I don't know how this can be better documented, but it obviously needs
some improvements and focus.
Cheers
Niclas
Quoting Marc Grue <[email protected]>:
Is Lifecycle supposed not to work, if the entity/extended interface has no
methods but only Properties? Or am I missing something?
Cheers,
Marc
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev