Monday, May 23, 2011

adding code to RequestFactory Proxy

I am using the web bindery requestfactory proxies successfully
throughout a web app under development.
One thing that I'm finding myself writing over and over are simple
methods that define the logic for the proxy data fields.
For example:

class MeetingProxy extends EntityProxy {
public Date getStartTime();
public Date getStopTime();
....
}

I would like to add simple logic methods to MeetingProxy like
public boolean isStarted() { return getStartTime() != null );
public boolean isFinished() { return getStopTime() != null );

Is there some way I can put this code within the Proxy definition so
that I can use it everywhere the proxy is accessed?
Perhaps as a public inner class within the interface?
Not sure how that would work or is it worth the effort...

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate