Create SqliteDaoFactory

This commit is contained in:
2019-01-02 22:50:07 +01:00
parent 2013e2e517
commit 4cc19191c0
5 changed files with 79 additions and 1 deletions

View File

@ -6,6 +6,8 @@ public interface DaoAbstractFactory {
switch (type) {
case XmlDaoFactory:
return new XmlDaoFactory();
case SqliteDaoFactory:
return new SqliteDaoFactory();
default:
case DaoFactory:
return new DaoFactory();

View File

@ -2,5 +2,6 @@ package fr.gasser.daoexample.dao;
public enum FactoryType {
DaoFactory,
XmlDaoFactory
XmlDaoFactory,
SqliteDaoFactory
}

View File

@ -0,0 +1,20 @@
package fr.gasser.daoexample.dao;
public class SqliteDaoFactory implements DaoAbstractFactory {
@Override
public StudentDao createStudentDao() {
return null;
}
@Override
public TeacherDao createTeacherDao() {
return null;
}
@Override
public DisciplineDao createDisciplineDao() {
return null;
}
}