When creating a Criteria from the session object, it would be nice if the Criteria object used generics. That way the .list() and .uniqueResult() methods, and possibly more, could return the specific object types instead of requiring a cast in the DAO.
I imagine something like this:
Criteria<Foo> criteria = session.createCriteria(Foo.class)
List<Foo> data = criteria.list();
Foo foo = criteria.uniqueResult();
|