On 6/25/11 14:04 , Niclas Hedhman wrote:
On Thu, Jun 23, 2011 at 11:26 AM, Rickard Öberg<[email protected]>  wrote:
EntityComposite extends Entity (no methods) and Identity (only has the
identity() property). Identity could easily be added as a role, for the
rest, see above.

Is Identity not a more core concept than a role? Entity can't exist
without Identity. Or are you simply saying that module.entities(
MyType.class ), will add the Identity role at that point (well, that
makes sense)...

Entity and Identity will be there, but does not have to be in the declared interface. If it is missing it is simply added as a Role, so that the final proxy *does* have it.

ValueDescriptor valueDescriptor = (ValueDescriptor)
((CompositeInstance)Proxy.getInvocationHandler( value )).descriptor();
as CompositeInstance is now in API and the descriptors are in SPI.

Uhhhh.... NO! We shouldn't document this as a way to get stuff. Too
much implementation details being exposed, and I object strongly that
this is promoted to API.

Perhaps promoting the accessors in Qi4jSPI to Qi4j (API) to make it
more obvious.

The accessors can be moved to API only if the descriptors are then also moved to API, which I am generally for at this point. It makes no sense to me to have model descriptors in SPI, as they are not related to Service Provider Interface (such as EntityFinder). The issue is still, what do you do if it is not possible to acquire the SPI/API instance. The above would be the only way to do it, but not exactly the first choice.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to