create()のメソッドを使用して、クライアント上でプロキシを作成できますRequestContext。あなたの場合、プロキシValueProxyはEntityProxy. 値プロキシを「保存」する必要はありません (エンティティ プロキシとは異なります)。
私はあなたとまったく同じユースケースを持っていますが、それは非常にうまく機能します。
@Service(MyService.class)
interface MyRequestContext extends RequestContext {
Request<List<TaskProxy>> findTasks(FilterProxy filter);
}
@ProxyFor(Filter.class)
interface FilterProxy extends ValueProxy {
// your getters and setters here
}
...
MyRequestContext ctx = ...;
FilterProxy filter = ctx.create(FilterProxy.class);
filter.setXxx(...);
// set your other filter
ctx.findTasks(filter).fire(new Receiver<List<TaskProxy>>() {
@Override
public void onSuccess(List<TaskProxy> tasks) {
// ...
}
});
補足として、「パラメーターとして使用できるのは xxxProxy オブジェクトのみ」と書いていましたが、これは誤りです。intプリミティブ型 ( 、booleanなど)、それらのラッパー型 ( Integer、Booleanなど)、String、Date、およびそれら (ListまたはSetプロキシ型) をうまく使用できます。