Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class DAOFactory {
- public static final int MYSQL = 1;
- public static final int CASSANDRA = 2;
- public abstract EventVariableDAO getEventVariableDAO();
- public abstract SessionVariableDAO getSessionVariableDAO();
- public abstract UserVariableDAO getUserVariableDAO();
- public abstract VisitorDAO getVisitorDAO();
- public abstract VisitDAO getVisitDAO();
- public abstract RequestDAO getRequestDAO();
- public static DAOFactory getDAOFactory(int whichFactory) {
- switch (whichFactory) {
- case MYSQL:
- return new MysqlDAOFactory();
- case CASSANDRA:
- return new CassandraDAOFactory();
- default:
- return null;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement