/** * save WheelchairReferral * @throws UniqueKeyViolationException */ public void save(ims.therapies.vo.WheelchairReferralVo voWheelchairReferral) throws ims.domain.exceptions.StaleObjectException, UniqueKeyViolationException { if (!voWheelchairReferral.isValidated()) throw new DomainRuntimeException("This Wheelchair Referral has not been validated"); DomainFactory factory = getDomainFactory(); WheelchairReferral doWheelchairReferral = WheelchairReferralVoAssembler.extractWheelchairReferral(factory, voWheelchairReferral); factory.save(doWheelchairReferral); }
/** * list */ public WheelchairReferralVoCollection getWheelchairReferralVoByCareContext(CareContextShortVo voCareContext) { if (voCareContext == null) throw new RuntimeException("Cannot get WheelchairReferralVo for null CareContextShortVo"); StringBuffer hql = new StringBuffer(); hql.append("from WheelchairReferral as w1_1 where w1_1.careContext.id = :CCID"); java.util.List list = getDomainFactory().find(hql.toString(), "CCID", voCareContext.getID_CareContext()); if (list == null || list.size() == 0) return null; return WheelchairReferralVoAssembler.createWheelchairReferralVoCollectionFromWheelchairReferral(list); }