public void populate(ims.vo.ValueObjectBeanMap map, ims.core.vo.beans.LocMostVoBean bean) { this.id = bean.getId(); this.version = bean.getVersion(); this.name = bean.getName(); this.isactive = bean.getIsActive(); this.isvirtual = bean.getIsVirtual(); this.type = bean.getType() == null ? null : ims.core.vo.lookups.LocationType.buildLookup(bean.getType()); this.displayinedtracking = bean.getDisplayInEDTracking(); this.casenotefolderlocation = bean.getCaseNoteFolderLocation(); this.address = bean.getAddress() == null ? null : bean.getAddress().buildVo(map); this.secureaccommodation = bean.getSecureAccommodation(); this.treatinghosp = bean.getTreatingHosp(); this.referringhospital = bean.getReferringHospital(); this.codemappings = ims.core.vo.TaxonomyMapCollection.buildFromBeanCollection(bean.getCodeMappings()); this.locations = ims.core.vo.LocMostVoCollection.buildFromBeanCollection(bean.getLocations()); this.parentlocation = bean.getParentLocation() == null ? null : bean.getParentLocation().buildVo(map); this.printers = ims.admin.vo.PrinterVoCollection.buildFromBeanCollection(bean.getPrinters()); this.defaultprinter = bean.getDefaultPrinter() == null ? null : bean.getDefaultPrinter().buildVo(map); this.designatedprinterfornewresults = bean.getDesignatedPrinterForNewResults() == null ? null : bean.getDesignatedPrinterForNewResults().buildVo(map); this.designatedprinterforocsorder = bean.getDesignatedPrinterForOCSOrder() == null ? null : bean.getDesignatedPrinterForOCSOrder().buildVo(map); }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.core.resource.place.domain.objects.Location */ public static ims.admin.vo.LocationShortVo insert( DomainObjectMap map, ims.admin.vo.LocationShortVo valueObject, ims.core.resource.place.domain.objects.Location domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_Location(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // UpperName valueObject.setUpperName(domainObject.getUpperName()); // Name valueObject.setName(domainObject.getName()); // isActive valueObject.setIsActive(domainObject.isIsActive()); // IsVirtual valueObject.setIsVirtual(domainObject.isIsVirtual()); // Type ims.domain.lookups.LookupInstance instance5 = domainObject.getType(); if (null != instance5) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance5.getImage() != null) { img = new ims.framework.utils.ImagePath( instance5.getImage().getImageId(), instance5.getImage().getImagePath()); } color = instance5.getColor(); if (color != null) color.getValue(); ims.core.vo.lookups.LocationType voLookup5 = new ims.core.vo.lookups.LocationType( instance5.getId(), instance5.getText(), instance5.isActive(), null, img, color); ims.core.vo.lookups.LocationType parentVoLookup5 = voLookup5; ims.domain.lookups.LookupInstance parent5 = instance5.getParent(); while (parent5 != null) { if (parent5.getImage() != null) { img = new ims.framework.utils.ImagePath( parent5.getImage().getImageId(), parent5.getImage().getImagePath()); } else { img = null; } color = parent5.getColor(); if (color != null) color.getValue(); parentVoLookup5.setParent( new ims.core.vo.lookups.LocationType( parent5.getId(), parent5.getText(), parent5.isActive(), null, img, color)); parentVoLookup5 = parentVoLookup5.getParent(); parent5 = parent5.getParent(); } valueObject.setType(voLookup5); } // DisplayInEDTracking valueObject.setDisplayInEDTracking(domainObject.isDisplayInEDTracking()); // CaseNoteFolderLocation valueObject.setCaseNoteFolderLocation(domainObject.isCaseNoteFolderLocation()); return valueObject; }