public PhlebotomyRoundShortVoCollection listClosedRounds(Date date, SpecimenCollectionTime round, LocationRefVo ward) { if (date == null || round == null || ward == null) return null; DomainFactory factory = getDomainFactory(); String hql = "select pRound from PhlebotomyRound" + " as pRound left join pRound.wards as ward where pRound.date = :date and pRound.roundToCollect = :round and ward.id = :wardId"; List items = factory.find(hql, new String[]{"date", "round", "wardId"}, new Object[]{date.getDate(), getDomLookup(round), ward.getID_Location()}); if (items != null && items.size() > 0) return PhlebotomyRoundShortVoAssembler.createPhlebotomyRoundShortVoCollectionFromPhlebotomyRound(items); return null; }
/** * listRoundsByDate */ public ims.ocrr.vo.PhlebotomyRoundShortVoCollection listRoundsByDate(ims.framework.utils.Date date) { if(date == null) throw new CodingRuntimeException("Coding Error = date is null (listRoundsByDate) "); List list = getDomainFactory().find("from PhlebotomyRound as p1_1 where (p1_1.date = :DATE)", new String[] {"DATE"}, new Object[] {date.getDate()}); return PhlebotomyRoundShortVoAssembler.createPhlebotomyRoundShortVoCollectionFromPhlebotomyRound(list); }