@Test public void testSavePatientList() { PatientList pList = new PatientList(); pList.setName("TestList3"); pList.setDescription("Third Test List"); pList.setCreator(Context.getUserContext().getAuthenticatedUser()); pList.setDateCreated(new java.util.Date()); pList.setUuid("68547121-1b70-465c-99ee-c9dfd95e7d30"); pList.setRetired(Boolean.FALSE); pList.setSearchQuery("test Query"); dao.savePatientList(pList); List<PatientList> result = dao.getPatientListByName("TestList3"); String name = result.get(0).getName(); assertEquals(name, "TestList3"); }
@Override public PatientList savePatientList(PatientList patientList) throws DAOException { sessionFactory.getCurrentSession().saveOrUpdate(patientList); return patientList; }
HibernatePatientListDAO implements PatientListDAO { @Override public PatientList savePatientList(PatientList patientList) throws DAOException { sessionFactory.getCurrentSession().saveOrUpdate(patientList); return patientList; } }
HibernatePatientListDAO implements PatientListDAO { @Override public PatientList savePatientList(PatientList patientList) throws DAOException { sessionFactory.getCurrentSession().saveOrUpdate(patientList); return patientList; }  }
HibernatePatientListDAO implements PatientListDAO { @Override public PatientList savePatientList(PatientList patientList) throws DAOException { sessionFactory.getCurrentSession().saveOrUpdate(patientList); return patientList; }  void setSessionFactory(SessionFactory sessionFactory); @Override PatientList savePatientList(PatientList patientList); @Override void deletePatientList(PatientList patientList); @Override PatientList getPatientList(Integer patientListId); @Override List<PatientList> getPatientListByEncounterType(EncounterType encounterType); @Override PatientList getPatientListByUuid(String uuid); @Override List<PatientList> getPatientListByName(String name); @Override List<PatientList> getAllPatientList(boolean includeRetired); @Override PatientList updatePatientList(PatientList patientList); }
HibernatePatientListDAO implements PatientListDAO { @Override public PatientList savePatientList(PatientList patientList) throws DAOException { sessionFactory.getCurrentSession().saveOrUpdate(patientList); return patientList; }  void setSessionFactory(SessionFactory sessionFactory); @Override PatientList savePatientList(PatientList patientList); @Override void deletePatientList(PatientList patientList); @Override PatientList getPatientList(Integer patientListId); @Override List<PatientList> getPatientListByEncounterType(EncounterType encounterType); @Override PatientList getPatientListByUuid(String uuid); @Override List<PatientList> getPatientListByName(String name); @Override List<PatientList> getAllPatientList(boolean includeRetired); @Override PatientList updatePatientList(PatientList patientList);  }