I use the class separately from my DAO to handle access requests, but I don’t know how to implement the InstanceRequest methods:
public class Service
{
public static DAO findDAO(Long id);
}
@Service(Service.class)
public interface DAORequestContext extends RequestContext
{
Request<ProxyForDAO> findDAO(Long id);
InstanceRequest<ProxyForDAO, Long> persist();
}
I define public Long persist()in my implementation DAObecause gwt docs say : "Instance methods must be implemented on the server as non-static methods in the entity type", but the factory query cannot find it:
SEVERE: Could not find any methods named persist in com.activegrade.server.data.Service
Feb 23, 2011 10:03:02 PM com.google.gwt.requestfactory.server.ServiceLayerDecorator die
How to implement an instance method in Service? I do not know how to convert InstanceRequest. Do I need to somehow connect the class DAOwith Serviceso that the code generator knows that it is in Servicefor most methods, but to go to the calls DAOfor InstanceRequest?