Hey,
Yet another interesting side-effect of the refactoring I'm doing is that
it becomes possible to let EntityBuilder hold an actual EntityInstance
with a real EntityState as the thing that is being used for building,
rather than just a fake proxy that can only handle state methods. The
builder will instantiate a real instance, with identity NULL, and the
EntityState is a diff-recording EntityState that keeps the state that is
set along with a diff that can later be applied to the real EntityState
when newInstance is called.
Because of this I'm changing EntityBuilder.stateForComposite to
EntityBuilder.prototype(), which also is more similar to how
ValueBuilder.prototype() works. EntityBuilder.stateOf(mixintype) is also
renamed to EntityBuilder.prototypeFor(mixintype). The main "trick" is
that constraint checking is not done on the new builder instance, *BUT
constraint checking *is* done when state is updated on it. This allows
the prototype to be used for real editing in dialogs etc. The only thing
different between it and other instances is that the identity is fake.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev