I have a method that takes a list of entities (Class
es) and does some computation. To describe my needs here is the simplest outline of the method (pseudo-code):
public void do(List<Class<?> entities) {
for (Class<?> entity : entities) {
List<?> list = session.createCriteria(entity).list();
for (Object o : list) {
System.out.println(o.getClass().getSimpleName() + " " + o.getId());
}
}
}
Is there a way that I can access/get the Id of o
?