@Test public void testDeleteDrugInfo() { DrugInfo drugInfo = new DrugInfo(); drugInfo.setId(2); Drug drug = new Drug(); drug.setId(5); drug.setDrugId(5); drugInfo.setDrugId(5); drugInfo.setDrug(drug); drugInfo.setName("TestDrugInfo2"); drugInfo.setDescription("Second Test DrugInfo"); drugInfo.setCreator(Context.getUserContext().getAuthenticatedUser()); drugInfo.setDateCreated(new java.util.Date()); drugInfo.setUuid("68547121-1b70-465e-99ee-c9dfd95e7d30"); drugInfo.setRetired(Boolean.FALSE); dao.deleteDrugInfo(drugInfo); DrugInfo result = dao.getDrugInfo(2); assertEquals(null, result); }
@Override public void deleteDrugInfo(DrugInfo drugInfo) throws DAOException { sessionFactory.getCurrentSession().delete(drugInfo); }
HibernateDrugInfoDAO implements DrugInfoDAO { @Override public void deleteDrugInfo(DrugInfo drugInfo) throws DAOException { sessionFactory.getCurrentSession().delete(drugInfo); } }
HibernateDrugInfoDAO implements DrugInfoDAO { @Override public void deleteDrugInfo(DrugInfo drugInfo) throws DAOException { sessionFactory.getCurrentSession().delete(drugInfo); }  }
HibernateDrugInfoDAO implements DrugInfoDAO { @Override public void deleteDrugInfo(DrugInfo drugInfo) throws DAOException { sessionFactory.getCurrentSession().delete(drugInfo); }  void setSessionFactory(SessionFactory sessionFactory); @Override DrugInfo saveDrugInfo(DrugInfo drugInfo); @Override void deleteDrugInfo(DrugInfo drugInfo); @Override DrugInfo getDrugInfo(Integer drugInfoId); @Override DrugInfo getDrugInfoByUuid(String uuid); @Override List<DrugInfo> getDrugInfoByName(String name); @Override DrugInfo getDrugInfoByDrug(Integer id); @Override List<DrugInfo> getAllDrugInfo(boolean includeRetired); @Override DrugInfo updateDrugInfo(DrugInfo drugInfo); }
HibernateDrugInfoDAO implements DrugInfoDAO { @Override public void deleteDrugInfo(DrugInfo drugInfo) throws DAOException { sessionFactory.getCurrentSession().delete(drugInfo); }  void setSessionFactory(SessionFactory sessionFactory); @Override DrugInfo saveDrugInfo(DrugInfo drugInfo); @Override void deleteDrugInfo(DrugInfo drugInfo); @Override DrugInfo getDrugInfo(Integer drugInfoId); @Override DrugInfo getDrugInfoByUuid(String uuid); @Override List<DrugInfo> getDrugInfoByName(String name); @Override DrugInfo getDrugInfoByDrug(Integer id); @Override List<DrugInfo> getAllDrugInfo(boolean includeRetired); @Override DrugInfo updateDrugInfo(DrugInfo drugInfo);  }