public static void fillFieldsfromXML( org.dom4j.Element el, ims.domain.DomainFactory factory, ElectiveListConfiguration obj, java.util.HashMap domMap) throws Exception { org.dom4j.Element fldEl; fldEl = el.element("waitingListName"); if (fldEl != null) { obj.setWaitingListName(new String(fldEl.getTextTrim())); } fldEl = el.element("startDate"); if (fldEl != null) { obj.setStartDate( new java.text.SimpleDateFormat("yyyyMMddHHmmssSSS").parse(fldEl.getTextTrim())); } fldEl = el.element("endDate"); if (fldEl != null) { obj.setEndDate( new java.text.SimpleDateFormat("yyyyMMddHHmmssSSS").parse(fldEl.getTextTrim())); } fldEl = el.element("service"); if (fldEl != null) { fldEl = fldEl.element("class"); obj.setService( ims.core.clinical.domain.objects.Service.getServicefromXML(fldEl, factory, domMap)); } fldEl = el.element("hCPs"); if (fldEl != null) { fldEl = fldEl.element("list"); obj.setHCPs( ims.core.configuration.domain.objects.ElectiveListConsultationConfiguration .fromListXMLString(fldEl, factory, obj.getHCPs(), domMap)); } fldEl = el.element("listLocations"); if (fldEl != null) { fldEl = fldEl.element("list"); obj.setListLocations( ims.core.configuration.domain.objects.ElectiveListHospitalConfiguration.fromListXMLString( fldEl, factory, obj.getListLocations(), domMap)); } fldEl = el.element("waitingListCode"); if (fldEl != null) { obj.setWaitingListCode(new String(fldEl.getTextTrim())); } fldEl = el.element("isActive"); if (fldEl != null) { obj.setIsActive(new Boolean(fldEl.getTextTrim())); } }
public String toAuditString() { StringBuffer auditStr = new StringBuffer(); auditStr.append("\r\n*waitingListName* :"); auditStr.append(waitingListName); auditStr.append("; "); auditStr.append("\r\n*startDate* :"); auditStr.append(startDate); auditStr.append("; "); auditStr.append("\r\n*endDate* :"); auditStr.append(endDate); auditStr.append("; "); auditStr.append("\r\n*service* :"); if (service != null) { auditStr.append(toShortClassName(service)); auditStr.append(service.getId()); } auditStr.append("; "); auditStr.append("\r\n*hCPs* :"); if (hCPs != null) { int i5 = 0; for (i5 = 0; i5 < hCPs.size(); i5++) { if (i5 > 0) auditStr.append(","); ims.core.configuration.domain.objects.ElectiveListConsultationConfiguration obj = (ims.core.configuration.domain.objects.ElectiveListConsultationConfiguration) hCPs.get(i5); if (obj != null) { if (i5 == 0) { auditStr.append(toShortClassName(obj)); auditStr.append("["); } auditStr.append(obj.getId()); } } if (i5 > 0) auditStr.append("] " + i5); } auditStr.append("; "); auditStr.append("\r\n*listLocations* :"); if (listLocations != null) { int i6 = 0; for (i6 = 0; i6 < listLocations.size(); i6++) { if (i6 > 0) auditStr.append(","); ims.core.configuration.domain.objects.ElectiveListHospitalConfiguration obj = (ims.core.configuration.domain.objects.ElectiveListHospitalConfiguration) listLocations.get(i6); if (obj != null) { if (i6 == 0) { auditStr.append(toShortClassName(obj)); auditStr.append("["); } auditStr.append(obj.getId()); } } if (i6 > 0) auditStr.append("] " + i6); } auditStr.append("; "); auditStr.append("\r\n*waitingListCode* :"); auditStr.append(waitingListCode); auditStr.append("; "); auditStr.append("\r\n*isActive* :"); auditStr.append(isActive); auditStr.append("; "); return auditStr.toString(); }