Package healthwatcher.data.factories

Source Code of healthwatcher.data.factories.JDORepositoryFactory

package healthwatcher.data.factories;

import lib.persistence.IPersistenceMechanism;
import healthwatcher.data.IComplaintRepository;
import healthwatcher.data.IDiseaseRepository;
import healthwatcher.data.IEmployeeRepository;
import healthwatcher.data.IHealthUnitRepository;
import healthwatcher.data.ISpecialityRepository;
import healthwatcher.data.ISymptomRepository;
import healthwatcher.data.jdo.ComplaintRepositoryJDO;
import healthwatcher.data.jdo.DiseaseTypeRepositoryJDO;
import healthwatcher.data.jdo.EmployeeRepositoryJDO;
import healthwatcher.data.jdo.HealthUnitRepositoryJDO;
import healthwatcher.data.jdo.SpecialityRepositoryJDO;
import healthwatcher.data.jdo.SymptomRepositoryJDO;

public class JDORepositoryFactory extends AbstractRepositoryFactory {
 
  protected IPersistenceMechanism pm = null;
 
  public JDORepositoryFactory(IPersistenceMechanism pm){
    this.pm = pm;
  }

  public IComplaintRepository createComplaintRepository() {
    return new ComplaintRepositoryJDO(pm);
  }
 
  public IHealthUnitRepository createHealthUnitRepository() {
    return new HealthUnitRepositoryJDO(pm);
  }
 
  public ISpecialityRepository createMedicalSpecialityRepository() {
    return new SpecialityRepositoryJDO(pm);
  }
 
  public IDiseaseRepository createDiseaseRepository() {
    return new DiseaseTypeRepositoryJDO(pm);
  }
 
  public IEmployeeRepository createEmployeeRepository() {
    return new EmployeeRepositoryJDO(pm);
  }
 
  public ISymptomRepository createSymptomRepository() {
    return new SymptomRepositoryJDO(pm);
  }
}
TOP

Related Classes of healthwatcher.data.factories.JDORepositoryFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.