Ah, thanks for the clarification. Your findings are correct: @ProxyFor is
designed to specify an entity implementation only, not an interface.
Ideally, it's just a POJO with getters and setters. However,
Locator/ServiceLocator is designed to move data access methods out of
entities into services. Is it a possibility for you to move data access
methods in your entity impls into an entity service instead?

/dmc

On Sat, Jan 8, 2011 at 5:33 AM, John Maitland <[email protected]>wrote:

> David,
> Thank you for the reply. I already have a Locator and a
> ServiceLocator, but left it out of the above example for simplicity.
> After reading the source, all the entity proxies map to classes and
> not interfaces. Hence, if your AppUser class was defined as an
> interface and a implementation:
>
> public interface AppUser extends DatastoreObject {
>        String getEmail()
>        void setEmail(String email)
> }
>
> public class AppUserImpl extends DatastoreObjectImpl implements
> AppUser {
>        ....
> }
>
> @ProxyFor(value=AppUser.class, locator=ObjectifyLocator.class)
> public interface AppUserProxy extends DatastoreObjectProxy {
>        String getEmail();
> }
>
> Then I don’t think this arrangement would currently work because of
> the getSupertypes in the RequestFactoryInterfaceValidator class.
> Therefore, by ‘must reference the Entity itself’ you mean an
> implementation (the type of the actual object from the service) and
> it’s not possible to supply an interface in the @ProxyFor?
>
> John
>
> p.s. I ask because my implementations are in a separate data access
> layer and are only exposes through its interfaces, called by my
> services.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to