public static ims.ocrr.orderingresults.domain.objects.OrderChangeResponseQueue extractOrderChangeResponseQueue( ims.domain.ILightweightDomainFactory domainFactory, ims.ocs_if.vo.OrderChangeResponseVo valueObject, HashMap domMap) { if (null == valueObject) { return null; } Integer id = valueObject.getID_OrderChangeResponseQueue(); ims.ocrr.orderingresults.domain.objects.OrderChangeResponseQueue domainObject = null; if (null == id) { if (domMap.get(valueObject) != null) { return (ims.ocrr.orderingresults.domain.objects.OrderChangeResponseQueue) domMap.get(valueObject); } // ims.ocs_if.vo.OrderChangeResponseVo ID_OrderChangeResponseQueue field is unknown domainObject = new ims.ocrr.orderingresults.domain.objects.OrderChangeResponseQueue(); domMap.put(valueObject, domainObject); } else { String key = (valueObject.getClass().getName() + "__" + valueObject.getID_OrderChangeResponseQueue()); if (domMap.get(key) != null) { return (ims.ocrr.orderingresults.domain.objects.OrderChangeResponseQueue) domMap.get(key); } domainObject = (ims.ocrr.orderingresults.domain.objects.OrderChangeResponseQueue) domainFactory.getDomainObject( ims.ocrr.orderingresults.domain.objects.OrderChangeResponseQueue.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_OrderChangeResponseQueue()); domainObject.setProviderSystem( ims.ocrr.vo.domain.ProviderSystemVoAssembler.extractProviderSystem( domainFactory, valueObject.getProviderSystem(), domMap)); domainObject.setWasProcessed(valueObject.getWasProcessed()); domainObject.setWasDiscarded(valueObject.getWasDiscarded()); // This is to overcome a bug in both Sybase and Oracle which prevents them from storing an empty // string correctly // Sybase stores it as a single space, Oracle stores it as NULL. This fix will make them // consistent at least. if (valueObject.getMsgText() != null && valueObject.getMsgText().equals("")) { valueObject.setMsgText(null); } domainObject.setMsgText(valueObject.getMsgText()); // This is to overcome a bug in both Sybase and Oracle which prevents them from storing an empty // string correctly // Sybase stores it as a single space, Oracle stores it as NULL. This fix will make them // consistent at least. if (valueObject.getAckText() != null && valueObject.getAckText().equals("")) { valueObject.setAckText(null); } domainObject.setAckText(valueObject.getAckText()); // This is to overcome a bug in both Sybase and Oracle which prevents them from storing an empty // string correctly // Sybase stores it as a single space, Oracle stores it as NULL. This fix will make them // consistent at least. if (valueObject.getFailureMsg() != null && valueObject.getFailureMsg().equals("")) { valueObject.setFailureMsg(null); } domainObject.setFailureMsg(valueObject.getFailureMsg()); // create LookupInstance from vo LookupType ims.domain.lookups.LookupInstance value7 = null; if (null != valueObject.getMessageStatus()) { value7 = domainFactory.getLookupInstance(valueObject.getMessageStatus().getID()); } domainObject.setMessageStatus(value7); // create LookupInstance from vo LookupType ims.domain.lookups.LookupInstance value8 = null; if (null != valueObject.getMsgType()) { value8 = domainFactory.getLookupInstance(valueObject.getMsgType().getID()); } domainObject.setMsgType(value8); // create LookupInstance from vo LookupType ims.domain.lookups.LookupInstance value9 = null; if (null != valueObject.getQueueType()) { value9 = domainFactory.getLookupInstance(valueObject.getQueueType().getID()); } domainObject.setQueueType(value9); ims.ocrr.orderingresults.domain.objects.OrderInvestigation value10 = null; if (null != valueObject.getInvestigation()) { if (valueObject.getInvestigation().getBoId() == null) { if (domMap.get(valueObject.getInvestigation()) != null) { value10 = (ims.ocrr.orderingresults.domain.objects.OrderInvestigation) domMap.get(valueObject.getInvestigation()); } } else if (valueObject.getBoVersion() == -1) // RefVo was not modified since obtained from the Assembler, no need to update the // BO field { value10 = domainObject.getInvestigation(); } else { value10 = (ims.ocrr.orderingresults.domain.objects.OrderInvestigation) domainFactory.getDomainObject( ims.ocrr.orderingresults.domain.objects.OrderInvestigation.class, valueObject.getInvestigation().getBoId()); } } domainObject.setInvestigation(value10); // This is to overcome a bug in both Sybase and Oracle which prevents them from storing an empty // string correctly // Sybase stores it as a single space, Oracle stores it as NULL. This fix will make them // consistent at least. if (valueObject.getStatusReason() != null && valueObject.getStatusReason().equals("")) { valueObject.setStatusReason(null); } domainObject.setStatusReason(valueObject.getStatusReason()); // create LookupInstance from vo LookupType ims.domain.lookups.LookupInstance value12 = null; if (null != valueObject.getCausingStatus()) { value12 = domainFactory.getLookupInstance(valueObject.getCausingStatus().getID()); } domainObject.setCausingStatus(value12); return domainObject; }