Suppose there is an interface
@Service(MyEntity.class)
public interface MyEntityRequest extends RequestContext {
Request<MyEntityProxy> getCurrentEntity();
InstanceRequest<MyEntityProxy, Void> persist();
}
I can move the static method MyEntity.getCurrentEntity() to
MyEnityService.getCurrentEntity() transparently for the client (the only
change is in the @Service attribute)
@Service(MyEntityService.class)
public interface MyEntityRequest extends RequestContext {
Request<MyEntityProxy> getCurrentEntity();
// ...
}
I'd also like to remove the dependency of MyEntity from
com.javax.persistence.EntityManager by moving persist() method
from MyEntity to MyEnityService:
public class MyEntityService {
// ...
public void persist(MyEntity entity) { /*...*/ }
}
Is it correct that I would have to modify the client signature as follows:
@Service(MyEntityService.class)
public interface MyEntityRequest extends RequestContext {
// ...
Request<Void> persist(MyEntityProxy entity);
}
i.e, I have to change InstanceRequest to Request and pass the entity
instance as a parameter. Just wanted to make sure I didn't overlook
anything...
May be there is a way to keep InstanceRequest and the method signature
intact?
Thanks for your help!
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.