public HandRangeOfMovementVo saveHandRangeOfMovement(HandRangeOfMovementVo voHandRangeOfMovement) throws StaleObjectException { if(!voHandRangeOfMovement.isValidated()) throw new DomainRuntimeException("This Hand Range Of Movement has not been validated"); DomainFactory factory = getDomainFactory(); HandRangeOfMovement domHandRangeOfMovement = HandRangeOfMovementVoAssembler.extractHandRangeOfMovement(factory, voHandRangeOfMovement); factory.save(domHandRangeOfMovement); return HandRangeOfMovementVoAssembler.create(domHandRangeOfMovement); }
public HandRangeOfMovementVo getHandRangeOfMovementByClinicalContact(ClinicalContactRefVo voRefClinicalContact) { DomainFactory factory = getDomainFactory(); String hql; hql = " from HandRangeOfMovement m where m.clinicalContact.id = " + voRefClinicalContact.getID_ClinicalContact(); HandRangeOfMovementVoCollection voCollHandRangeOfMovements = HandRangeOfMovementVoAssembler.createHandRangeOfMovementVoCollectionFromHandRangeOfMovement(factory.find(hql)); if (voCollHandRangeOfMovements.size() == 1) return voCollHandRangeOfMovements.get(0); else return null; }
public ims.therapies.vo.HandRangeOfMovementVoCollection listHandRangeOfMovementsForCareContext(ims.core.admin.vo.CareContextRefVo voRefCareContact) { DomainFactory factory = getDomainFactory(); String hql = " from HandRangeOfMovement h where h.clinicalContact.careContext.id = " + voRefCareContact.getID_CareContext(); return HandRangeOfMovementVoAssembler.createHandRangeOfMovementVoCollectionFromHandRangeOfMovement(factory.find(hql)); }