Forgot to add this...
My Entity Locator Class:
public class EmployeeLocator extends Locator<Employee, Long>{
public static final PersistenceManager persistenceManager() {
return PMF.get().getPersistenceManager();
}
@Override
public Employee create(Class<? extends Employee> clazz) {
try {
return clazz.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return null;
}
@Override
public Employee find(Class<? extends Employee> clazz, Long id) {
System.out.println("Finding entity...");
return persistenceManager().getObjectById(clazz, id);
}
@Override
public Class<Employee> getDomainType() {
return null;
}
@Override
public Long getId(Employee domainObject) {
return domainObject.getId();
}
@Override
public Class<Long> getIdType() {
return Long.class;
}
@Override
public Object getVersion(Employee domainObject) {
return domainObject.getVersion();
}
}
--
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.