@Test public void testGetPatientListByUuid() { String uuid = "68547121-1b70-465e-99ee-c9dfd95e7d30"; String result = dao.getPatientListByUuid(uuid).getName(); assertEquals("TestList2", result); }
@Override public PatientList getPatientListByUuid(String uuid) throws DAOException { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(PatientList.class); criteria.add(Restrictions.eq("uuid", uuid)); return (PatientList) criteria.uniqueResult(); }
HibernatePatientListDAO implements PatientListDAO { @Override public PatientList getPatientListByUuid(String uuid) throws DAOException { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(PatientList.class); criteria.add(Restrictions.eq("uuid", uuid)); return (PatientList) criteria.uniqueResult(); } }
HibernatePatientListDAO implements PatientListDAO { @Override public PatientList getPatientListByUuid(String uuid) throws DAOException { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(PatientList.class); criteria.add(Restrictions.eq("uuid", uuid)); return (PatientList) criteria.uniqueResult(); }  }
HibernatePatientListDAO implements PatientListDAO { @Override public PatientList getPatientListByUuid(String uuid) throws DAOException { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(PatientList.class); criteria.add(Restrictions.eq("uuid", uuid)); return (PatientList) criteria.uniqueResult(); }  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 getPatientListByUuid(String uuid) throws DAOException { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(PatientList.class); criteria.add(Restrictions.eq("uuid", uuid)); return (PatientList) criteria.uniqueResult(); }  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);  }