public void saveMergeRequest(MergeRequestVo mergeRequest) throws DomainInterfaceException, StaleObjectException { if(!mergeRequest.isValidated()) throw new DomainRuntimeException("MergeRequestVo not validated"); DomainFactory factory = getDomainFactory(); if(!validateMergeRequest(mergeRequest)) throw new DomainInterfaceException("A pending Merge Request involving a selected patient exists"); MergeRequest doMergeRequest = MergeRequestVoAssembler.extractMergeRequest(factory, mergeRequest); factory.save(doMergeRequest); }
/** * Save a merge request */ public void saveMergeRequest(ims.core.vo.MergeRequestVo mergeRequest) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException { if(mergeRequest == null) throw new RuntimeException("Cannot save null value for MergeRequest"); if(!mergeRequest.isValidated()) throw new DomainRuntimeException("MergeRequest not validated before save"); if(!validateMergeRequest(mergeRequest)) throw new DomainInterfaceException("A pending Merge Request involving a selected patient exists"); getDomainFactory().save(MergeRequestVoAssembler.extractMergeRequest(getDomainFactory(), mergeRequest)); }
public MergeRequestVoCollection listPatientsToBeMerged() { DomainFactory factory = getDomainFactory(); IMSCriteria imsc=new IMSCriteria(MergeRequest.class, factory); imsc.equal(MergeRequest.FieldNames.Status, new Boolean(false)); List merges=imsc.find(); return MergeRequestVoAssembler.createMergeRequestVoCollectionFromMergeRequest(merges); }