You can use a container ValueProxy
and embed EntityProxy
objects.
Something like this:
@ProxyFor(AccountPage.class)
public interface AccountPageProxy extends ValueProxy {
public List<AccountProxy> getAccounts();
int getNumber();
long getTotalElements();
int getTotalPages();
}
@ProxyFor(...)
public interface AccountProxy extends EntityProxy {
}
For example I use this approach to transfer a Page (start, end) of a list of EntityProxy
to the client (see above example).