/** * lists PathSpecimenContainers */ public ims.ocrr.vo.PathSpecimenContainerVoCollection listPathSpecimenContainers(PathSpecimenContainerVo filter) { DomainFactory factory = getDomainFactory(); IMSCriteria imsc= new IMSCriteria (PathSpecimenContainer.class,factory); imsc.addOrder("pathSpecimenOrder", ORDERMODE.ASC); if (filter!=null) { if (filter.getNameIsNotNull()) { imsc.like("name", "%"+filter.getName()+"%"); } if (filter.getManufacturerIsNotNull()) imsc.equal("manufacturer.id", getDomLookup(filter.getManufacturer()).getId()); if (filter.getIsActiveIsNotNull()) imsc.equal("isActive", filter.getIsActive()); } List<?> containers=imsc.find(); return PathSpecimenContainerVoAssembler.createPathSpecimenContainerVoCollectionFromPathSpecimenContainer(containers); }
public void savePathSpecimenContainers(PathSpecimenContainerVoCollection specimens) throws StaleObjectException { DomainFactory factory = getDomainFactory(); for (int i=0;i<specimens.size();i++) { factory.save(PathSpecimenContainerVoAssembler.extractPathSpecimenContainer(factory, specimens.get(i))); } }
public ims.ocrr.vo.PathSpecimenContainerVo savePathSpecimenContainer(ims.ocrr.vo.PathSpecimenContainerVo pathSpecimenContainer) throws ims.domain.exceptions.StaleObjectException { if ( !pathSpecimenContainer.isValidated() ) throw new DomainRuntimeException("Path Specimen Container has not been validated"); DomainFactory factory = getDomainFactory(); PathSpecimenContainer doPathSpecimenContainer = PathSpecimenContainerVoAssembler.extractPathSpecimenContainer(factory, pathSpecimenContainer); doPathSpecimenContainer.getTaxonomyMap().clear(); List lst = TaxonomyMapAssembler.extractTaxonomyMapList(factory, pathSpecimenContainer.getTaxonomyMap()); doPathSpecimenContainer.setTaxonomyMap(lst); factory.save(doPathSpecimenContainer); return PathSpecimenContainerVoAssembler.create(doPathSpecimenContainer); }