On 2010-07-08 00.28, Stanislav Muhametsin wrote:
As I understood correctly from looking at latest commit new tests, even thought the DomainEntityComposite is not extending the role interfaces directly, you still have to do the direct cast on it?
Not necessarily. Look at AssemblyRoleTest.testAssemblyMixinsEntity which does uow.get(Foo.class, "123"), i.e. the client code does not have to know about the entity interface at all, and the "cast" is done inside Qi4j.
I guess i should rephrase that question: what kind of access control is available to roles? I mean specifying which roles are exposed through some role. Or is any role castable into any other role at any time? That would at least invalidate to use roles for immutable query -type of roles, as one could just cast the immutable query role into mutable one.
A composite has only one proxy, which implements the composite type plus all roles, so yes you can cast it any way you want to. It is up to the code to ensure that it only uses roles within it's context.
/Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

