I am trying to build a BaseHibernateDAO. Looking at the caveatemptor example I wonder why no Base DAO was used? Do Hibernate guys dont like the idea? If yes any reason?
This is what I have come up with :
public interface BaseHibernateDAO {
public Serializable addObject( Object object ) throws InfrastructureException, DAOException;
public Serializable updateObject( Object object ) throws InfrastructureException, DAOException;
public void deleteObject( Object ) throws InfrastructureException, DAOException;
public Object retrieveObject( Class c, Long id ) throws InfrastructureException, DAOException;
public Collection findAll( Class c ) throws InfrastructureException, DAOException;
}
Thanks
|