Revision: 9223
Author: b...@google.com
Date: Mon Nov 15 09:22:36 2010
Log: Edited wiki page RequestFactory_2_1_1 through web user interface.
http://code.google.com/p/google-web-toolkit/source/detail?r=9223

Modified:
 /wiki/RequestFactory_2_1_1.wiki

=======================================
--- /wiki/RequestFactory_2_1_1.wiki     Mon Nov  8 10:58:24 2010
+++ /wiki/RequestFactory_2_1_1.wiki     Mon Nov 15 09:22:36 2010
@@ -19,13 +19,12 @@
 Stuff not yet published:
   * (Issue 5522, issue 5357) Value types / Embedded objects
* A user-defined value object must extend the empty ValueProxy interface and declare a @ProxyFor annotation. - * This intentionally prevents the VP from being passed into RequestContext.edit(): * ValueProxy instances are never sparse and will implement equals() and hashCode() based on the values in the proxy. * The VP will include the ids for any referenced EntityProxy fields, but will not force data for the referenced EP's to be returned unless there's a with() clause in play. * A ValueProxy returned from an immutable EntityProxy is immutable. The EntityProxy must be placed into an editable mode via the usual RequestContext.edit() before you can make a call like entityProxy.getValue().setFoo("bar"). - * A VP returned from a service method invocation is mutable, since mutating it wouldn't be expected to alter the state of any EntityProxy. - * The sometimes-mutable nature of a VP is slightly confusing, but it can be resolved by asking: Did I get the ValueProxy from a getter or an onSuccess()? - * A new "Proxy" interface will be added as a superclass of ValueProxy and EntityProxy to allow `RequestFactory.create` to operate on both value and entity types.
+    * A VP returned from a service method invocation is immutable.
+ * A new RequestContext.edit() overload will be added to support `valueObject.getEntityProxy().setFoo(42)`. If it were possible to place a `ValueProxy` into an editable mode without a reference to a `RequestContext`, it would be impossible for the mutable `ValueProxy` to guarantee that its `EntityProxy` getters could return mutable objects. + * A new "BaseProxy" interface will be added as a superclass of ValueProxy and EntityProxy to allow `RequestFactory.create` to operate on both value and entity types. * Because ValueProxy doesn't have a stableId() method, there's no way to use a VP with a call to find() or with any other service method that has an EntityProxyId argument. * If you think about a Date object, there's no real meaning in giving a Date an id. * If an EntityProxy has a value property, all of the properties of the VP are checked for mutations and sent to the server.

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to