RequestFactory EntityProxy.create with related ValueProxies ?

2011-03-07 Thread koma
I have a working request context : public interface ContactsService extends RequestContext { RequestListContactEntryProxy getContacts(int offset, int pageLength); RequestString persist(ContactEntryProxy entry); RequestVoid remove(ContactEntryProxy entry); RequestListContactEntryProxy

Re: RequestFactory EntityProxy.create with related ValueProxies ?

2011-03-07 Thread koma
This is a missing piece of code for the above question : *@ProxyForName(value = com.google.gdata.data.contacts.ContactEntry, locator = xxx.server.request.ContactLocator)* *public interface ContactEntryProxy extends EntityProxy {* * * * ListEmailProxy getEmailAddresses();* * * * NameProxy

Re: RequestFactory EntityProxy.create with related ValueProxies ?

2011-03-07 Thread David Chandler
You'll need a setter in order to save the Contact entity with the list of email addresses in one request. Since RequestFactory on the client knows only about the entity interface, the create() method can do no more than initialize all entity properties with null. You could, however, make multiple

Re: RequestFactory EntityProxy.create with related ValueProxies ?

2011-03-07 Thread koma
I was thinking about adding parameter ListEmailAddress to persist : *public String persist(ContactEntry contactEntry) { ... }* would become : *public String persist(ContactEntry contactEntry, ListEmailAddress emailAddresses) { ... }* and take care of the linking in one go. It would be great

Re: RequestFactory EntityProxy.create with related ValueProxies ?

2011-03-07 Thread David Chandler
Sure, that works. Locator eliminates the need for static methods in the entity. Can you elaborate on what you mean by matching for getters / setters in the Locator? /dmc On Mon, Mar 7, 2011 at 3:51 PM, koma k...@koma.be wrote: I was thinking about adding parameter ListEmailAddress to persist

Re: RequestFactory EntityProxy.create with related ValueProxies ?

2011-03-07 Thread koma
* ServiceLocator eliminates the need for static methods * Locator is great when you don't control the source code for the entities. In my case, the underlying entities are GData Contacts. I cannot implement the EntityProxy interface in the server side object, because the server side object is *