> That is true for Concerns. Perhaps the member name is unfortunate,
> because SideEffects are not 'chained' they are executed one by one in
> sequence, and 'next' refers to an internal object holding the result
> of the chained call.
> Similar to the Constraints in that they are not chained, and exeuted
> in sequence.

Yes, I think the member name is unfortunate as it doesn't convey the
meaning of its function. Perhaps "result" would be a better name?

In my example, the side effect implemented an interface with two
methods. Using next, it could call any of these two methods,
next.giveMeContent() or next.giveMeSubject(). But surely, inside the
side effect of the giveMeContent call it doesn't make sense to get the
result of the call chain of the other method. In my (inexperienced)
eyes, using only "next" makes better sense as this would give you the
result of the current method. And this is the way (by accident?) the
Groovy example works. It uses the next reference and gets the result
of the chained call to giveMeContent.

> No. You (client developer) do the folllowing;
>
> + create a UnitOfWork.
> + read, modify, create and delete entities.
> + complete() the UoW.
>
> Upon the completion, Qi4j will make all the changes in persistent
> storage reflecting your changes in the object graph. It will also make
> sure that if you have 'read' an entity that has been modified prior to
> your completion, you will receive a ConcurrentModificationException,
> to allow your UoW can ensure consistency.

It's getting clearer! Thanks!

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

Reply via email to