public static ims.clinical.configuration.domain.objects.ProblemHotlistItem extractProblemHotlistItem( ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.ProblemHotlistItemVo valueObject, HashMap domMap) { if (null == valueObject) { return null; } Integer id = valueObject.getID_ProblemHotlistItem(); ims.clinical.configuration.domain.objects.ProblemHotlistItem domainObject = null; if (null == id) { if (domMap.get(valueObject) != null) { return (ims.clinical.configuration.domain.objects.ProblemHotlistItem) domMap.get(valueObject); } // ims.clinicaladmin.vo.ProblemHotlistItemVo ID_ProblemHotlistItem field is unknown domainObject = new ims.clinical.configuration.domain.objects.ProblemHotlistItem(); domMap.put(valueObject, domainObject); } else { String key = (valueObject.getClass().getName() + "__" + valueObject.getID_ProblemHotlistItem()); if (domMap.get(key) != null) { return (ims.clinical.configuration.domain.objects.ProblemHotlistItem) domMap.get(key); } domainObject = (ims.clinical.configuration.domain.objects.ProblemHotlistItem) domainFactory.getDomainObject( ims.clinical.configuration.domain.objects.ProblemHotlistItem.class, id); // TODO: Not sure how this should be handled. Effectively it must be a staleobject exception, // but maybe should be handled as that further up. if (domainObject == null) return null; domMap.put(key, domainObject); } domainObject.setVersion(valueObject.getVersion_ProblemHotlistItem()); domainObject.setProblem( ims.clinical.vo.domain.ClinicalProblemShortVoAssembler.extractClinicalProblem( domainFactory, valueObject.getProblem(), domMap)); return domainObject; }
/** * Copy one ValueObject to another * * @param valueObjectDest to be updated * @param valueObjectSrc to copy values from */ public static ims.clinicaladmin.vo.ProblemHotlistItemVo copy( ims.clinicaladmin.vo.ProblemHotlistItemVo valueObjectDest, ims.clinicaladmin.vo.ProblemHotlistItemVo valueObjectSrc) { if (null == valueObjectSrc) { return valueObjectSrc; } valueObjectDest.setID_ProblemHotlistItem(valueObjectSrc.getID_ProblemHotlistItem()); valueObjectDest.setIsRIE(valueObjectSrc.getIsRIE()); // Problem valueObjectDest.setProblem(valueObjectSrc.getProblem()); return valueObjectDest; }