@Test public void testGetAllDrugPurchaseOrders() { List<DrugPurchaseOrder> allDrugPurchaseOrders = dao.getAllDrugPurchaseOrders(); assertEquals(allDrugPurchaseOrders.size(), 2); }
public List<DrugPurchaseOrder> getAllDrugPurchaseOrders() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(DrugPurchaseOrder.class); return criteria.list(); }
HibernateDrugPurchaseOrderDAO implements DrugPurchaseOrderDAO { public List<DrugPurchaseOrder> getAllDrugPurchaseOrders() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(DrugPurchaseOrder.class); return criteria.list(); } }
HibernateDrugPurchaseOrderDAO implements DrugPurchaseOrderDAO { public List<DrugPurchaseOrder> getAllDrugPurchaseOrders() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(DrugPurchaseOrder.class); return criteria.list(); }  }
HibernateDrugPurchaseOrderDAO implements DrugPurchaseOrderDAO { public List<DrugPurchaseOrder> getAllDrugPurchaseOrders() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(DrugPurchaseOrder.class); return criteria.list(); }  void setSessionFactory(SessionFactory sessionFactory); DrugPurchaseOrder saveDrugPurchaseOrder(DrugPurchaseOrder drugPurchaseOrder); DrugPurchaseOrder getDrugPurchaseOrderByUuid(String uuid); List<DrugPurchaseOrder> getAllDrugPurchaseOrders(); List<DrugPurchaseOrder> getAllDrugPurchaseOrdersNotReceived(); DrugPurchaseOrder updateDrugPurchaseOrder(DrugPurchaseOrder drugPurchaseOrder); void deleteDrugPurchaseOrder(DrugPurchaseOrder drugPurchaseOrder); List<DrugPurchaseOrder> getDrugPurchaseOrderByProvider(Integer providerId); @Override List<DrugPurchaseOrder> getDrugPurchaseOrderByDispenseLocation(Integer dispenseLocation); @Override List<DrugPurchaseOrder> getDrugPurchaseOrderByStockLocation(Integer stockLocation); }
HibernateDrugPurchaseOrderDAO implements DrugPurchaseOrderDAO { public List<DrugPurchaseOrder> getAllDrugPurchaseOrders() { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(DrugPurchaseOrder.class); return criteria.list(); }  void setSessionFactory(SessionFactory sessionFactory); DrugPurchaseOrder saveDrugPurchaseOrder(DrugPurchaseOrder drugPurchaseOrder); DrugPurchaseOrder getDrugPurchaseOrderByUuid(String uuid); List<DrugPurchaseOrder> getAllDrugPurchaseOrders(); List<DrugPurchaseOrder> getAllDrugPurchaseOrdersNotReceived(); DrugPurchaseOrder updateDrugPurchaseOrder(DrugPurchaseOrder drugPurchaseOrder); void deleteDrugPurchaseOrder(DrugPurchaseOrder drugPurchaseOrder); List<DrugPurchaseOrder> getDrugPurchaseOrderByProvider(Integer providerId); @Override List<DrugPurchaseOrder> getDrugPurchaseOrderByDispenseLocation(Integer dispenseLocation); @Override List<DrugPurchaseOrder> getDrugPurchaseOrderByStockLocation(Integer stockLocation);  }