01: package auction.dao;
02:
03: public abstract class DAOFactory {
04:
05: public static final Class HIBERNATE = auction.dao.hibernate.HibernateDAOFactory.class;
06:
07: public static DAOFactory instance(Class factory) {
08: try {
09: return (DAOFactory) factory.newInstance();
10: } catch (Exception ex) {
11: throw new RuntimeException("Couldn't create DAOFactory: "
12: + factory);
13: }
14: }
15:
16: public abstract CategoryDAO getCategoryDAO();
17:
18: public abstract LanguageDAO getLanguageDAO();
19:
20: public abstract BookDAO getBookDAO();
21:
22: public abstract UserDAO getUserDAO();
23: }
|