It's a good approach to have a root class with hibernate "stuff" on it,
but i rather use DAO. The benefit of the DAO pattern is that nothing on
the business layer knows about Hibernate. The disadvantege of the DAO is
that you have to write lot of classes (generally 1 business class, 1 DAO
class).
Both approaches are good (root class, and DAO), it just depend on the
project and what you like. |