01: package auction.persistence;
02:
03: import auction.dao.DAOFactory;
04:
05: public class PojoBase {
06: private static final String ID = "pojo";
07: private static final String NAME = "pojoBase";
08:
09: private String pojoBaseName;
10:
11: public PojoBase(String name) {
12: pojoBaseName = name;
13: }
14:
15: /**
16: * Gets the Hibernate data access object factory, all DAOs
17: * being used in the application can be obtained from it.
18: */
19: public Object getHibernateDAOFactory() {
20: return DAOFactory.instance(DAOFactory.HIBERNATE);
21: }
22:
23: public String getId() {
24: return ID;
25: }
26:
27: public String getName() {
28: return (pojoBaseName != null ? pojoBaseName : NAME);
29: }
30:
31: }
|