【发布时间】:2014-07-26 17:01:56
【问题描述】:
想象一下使用 GWT、RequestFactory 和 JPA 时的以下情况。
服务器端:
@Entity
public class SuperEmployee implements IsEmployee {...}
@Entity
public class BadEmployee implements IsEmployee {...}
@Entity
public class Supervisor {
List<IsEmployee> employees;
...
}
客户端代理:
@ProxyFor(value = Supervisor.class, ...)
public interface SupervisorProxy {...}
现在我想要类似的东西:
@ProxyFor(value = IsEmployee.class, ...)
public interface EmployeerProxy {...}
当然这是行不通的,但是如果我对客户端的具体类型不感兴趣并且只想使用接口方法,那么解决方案是什么。
我已阅读以下可能有帮助的文章(但也许我没有理解正确的观点): http://www.gwtproject.org/doc/latest/DevGuideRequestFactory.html(“可传输类型”部分)。
感谢您启发我的 Requestfactory 知识!
拉尔夫
【问题讨论】:
标签: java gwt requestfactory