On Monday, November 5, 2012 9:31:30 PM UTC+1, Jens wrote:
>
> Ouch! Totally forgot that you have to return the proxy on client side :( 
> Well in that case you probably have to duplicate your validation 
> annotations or implement the proxy interface in your entity as mentioned 
> above. I would go with duplication as the entity shouldn't be a proxy. It 
> should be relatively easy to write a small generator tool that generates 
> proxies for your entities and copies all validation annotations to the 
> proxy interface. Maybe someone has already done it on github/google code.


Couldn't you simply override the methods and refine the return type? (Java 
has covariant return types)

interface Employee {
  Employee getBoss();
}

interface EmployeeProxy extends Employee, EntityProxy {
  EmployeeProxy getBoss();
}

class EmployeeEntity implements Employee {
  @Override
  public EmployeeEntity getBoss() { … }
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/NKdCosg2Z-4J.
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