On Sun, Apr 19, 2009 at 4:51 AM, Pelle Poluha <[email protected]> wrote:
>> 'next' is a placeholder, and will return the returnvalue from the >> method call, and it will throw Exception if that was the outcome of >> the method call. But the return from the SideEffect will be ignored. > > When you say "the method call", do you mean the mixin method call? I > thought I read somewhere on the Qi4j site that "next" referred to the > next fragment in the call chain. 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. > With regards to saving and loading enities from the entity store, did > I understand you correctly in my previous post? Ie when I save an > object graph, each object (or composite) needs to be saved explicitly. > When I access them again, they will be lazy loaded from the store when > I traverse the graph. 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. HTH -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

