I have used the @ExtraTypes annotation on the interface that extends
RequestFactory and has worked fine for me.
ex:
@ ExtraTypes ({SubOne.class, SubTwo.class, SubThree.class})
public interface extends YourRequestFactory RequestFactory {
....
}
Atenciosamente,
Markenson Paulo França
2012/5/16 Geoff Gibbs <[email protected]>
> I'm trying to create a proxy for a class containing a collection of
> classes that all extend from a generic abstract class:
>
> Here's the model structure:
>
> @Entity
> public class Container {
> public Set<SuperType<?>> getContent();
> }
>
>
> @Entity
> public abstract class SuperType<T> {}
>
> @Entity
> public class SubOne extends SuperType<Something> {}
>
> @Entity
> public class SubTwo extends SuperType<SomethingElse> {}
>
> @Entity
> public class SubThree extends SuperType<Other> {}
>
> My Proxy classes:
>
> @ProxyFor(Container.class)
> @ExtraTypes({SubOne.class, SubTwo.class, SubThree.class})
> public interface ContainerProxy {
> Set<SuperTypeProxy> getContent();
> }
>
> @ProxyFor(SuperType.class)
> public interface SuperTypeProxy {}
>
> @ProxyFor(SubOne.class)
> public interface SubOneProxy extends SuperTypeProxy {}
>
> @ProxyFor(SubTwo.class)
> public interface SubTwo Proxy extends SuperTypeProxy {}
>
> @ProxyFor(SubThree.class)
> public interface SubThree Proxy extends SuperTypeProxy {}
>
> The problem is that when building I get the following warning and the
> build fails:
>
> ...ContainerProxy.java:xx: Could not find domain method similar to
> java.util.Set<SuperType<T>> getContent()
>
> If I remove that method from the proxy, then the build succeeds. Is there
> any way to get this to work that does not involve changing the model?
>
> --
> 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/-/eaQ2FvLcoiMJ.
> 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.
>
--
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.