On Sunday, January 9, 2011 5:42:01 PM UTC+1, John Maitland wrote:
>
> Frustratingly, as I know I'm so close, all my entities (both the 
> implementation and the interface) only contain getter and setter 
> (simple POJO for use in Hibernate). All my data access methods 
> currently reside in the entity service, as recommended. Now in the 
> entity service, I could do a horrible cast from the interface back to 
> its implementation and send that back to the client. However I have a 
> custom ServiceLayerDecorator, to use Spring to create my Locators (for 
> the find method), and hence I can override the following... 
>
>     @Override 
>     public <T> Class<? extends T> resolveClientType(Class<?> 
> domainClass, Class<T> clientType, boolean required) { 
>         ProxyFor a = clientType.getAnnotation(ProxyFor.class); 
>
>         if (a != null && a.value().isAssignableFrom(domainClass)) { 
>             return super.resolveClientType(a.value(), clientType, 
> required);
>

Because you change the value, you should use getTop().resolveClientType 
instead of super.resolveClientType.

-- 
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