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?