|
This is a theoretical question rather than a question of use with Hibernate.
In "normal" coding, you might have a DAO with methods for a Product class, say such as getById, getByCategory etc etc.
Since tools such as Hibernate allow you to pass the class and a criteria query for example would allow you to pass a property or properties to query on, is it a good idea to have a DAO layer (one DAO / class) or rather develop a DAO layer that simply abstracts away from the Hibernate layer and is implemented similar to Criteria queries where class names and properties are passed rather than creating a DAO per class and a method per property query.
Gabe
|