RequestFactory: Client-side Methods in EntityProxy/ValueProxy

34 views
Skip to first unread message

Aidan O'Kelly

unread,
Jul 15, 2011, 9:48:07 AM7/15/11
to google-we...@googlegroups.com
Is there a way to have methods that only exist in the client side
EntityProxy/ValueProxy object?

class Foo {
private Integer start;
private Integer end;
private Integer interval;

public Integer getStart() { return start; }
public Integer getEnd() { return end; }
public Integer getInterval() { return interval; }

public List<Integer> getIntervals() {
// Generate all intervals between start & end.
}

}

What would be the best way to have getIntervals() be translated and
run on the client side... ?

Thomas Broyer

unread,
Jul 15, 2011, 11:18:32 AM7/15/11
to google-we...@googlegroups.com
Put it in a helper class, passing a FooProxy as argument (or an interface implemented by both Foo and FooProxy, if you want to share the code with the server). I can't imagine any other mean.
Reply all
Reply to author
Forward
0 new messages