Quoting Niclas Hedhman <[email protected]>:

On Fri, Jul 9, 2010 at 4:25 PM, Stanislav Muhametsin
<[email protected]> wrote:

Come to think about it, is it possible to make those roles extend just
"Composite" instead of "EntityComposite" or any other types of composites?
But I guess you couldn't add them to assembly then, could you?

Correct, the assembly requires concrete Composite subtypes.

Personally i have previously viewed your case as "We need a easy
mechanism to 'transform' an Entity to a Value.", which in previous
reviews have shown to be hard to define in precise terms.


Let's try to define it more precise terms then: Have a (transient?) composite with custom methods, which can access the state of the entity composite it represents. Whenever the state of entity changes, this composite will reflect the changes immediately. It should be also possible for client code to invoke calls, which may change state of entity (in my case, giving the changeable role happens in few precisely predetermined places), without worrying about things like unit of work. In other words, some kind of entity proxy.

It is true that my case is in big part about transforming an Entity to a Value. Yet still, the abilities mentioned in QI-165 would help (at least me) in many other cases too, where strict separation of roles is required.


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

Reply via email to