After calling list() on a Hibernate Query which you expect to just return a list of Foo objects (see example below), how best would you deal with this situation?
Query query = session.createQuery("from Foo");
List list = query.list();
I don't particularly like seeing this:
public List read() { ... }
When I would much prefer:
public List<Foo> read() { ... }
Would you expect callers of the read method to have cast to Foo for each element? Is there a nice way to get the read method to return List< Foo >?