/** * Add the parameter. * Convert the parameter to a string and write it. * Convert rows to XML strings. */ public void appendParameter(Call call, Writer writer, Object parameter) { if (parameter instanceof Vector) { Vector records = (Vector)parameter; // May be a collection of record. for (int index = 0; index < records.size(); index++) { appendParameter(call, writer, (records).elementAt(index)); } } else if (parameter instanceof org.eclipse.persistence.oxm.record.DOMRecord) { String xml = ((org.eclipse.persistence.oxm.record.DOMRecord)parameter).transformToXML(); // For some reason the transform always prints the XML header, so trim it off. int start = xml.indexOf('>'); xml = xml.substring(start + 1, xml.length()); try { writer.write(xml); } catch (IOException exception) { throw ValidationException.fileError(exception); } } else { super.appendParameter(call, writer, parameter); } }
/** * Add the parameter. * Convert the parameter to a string and write it. * Convert rows to XML strings. */ public void appendParameter(Call call, Writer writer, Object parameter) { if (parameter instanceof Vector) { Vector records = (Vector)parameter; // May be a collection of record. for (int index = 0; index < records.size(); index++) { appendParameter(call, writer, (records).elementAt(index)); } } else if (parameter instanceof org.eclipse.persistence.oxm.record.DOMRecord) { String xml = ((org.eclipse.persistence.oxm.record.DOMRecord)parameter).transformToXML(); // For some reason the transform always prints the XML header, so trim it off. int start = xml.indexOf('>'); xml = xml.substring(start + 1, xml.length()); try { writer.write(xml); } catch (IOException exception) { throw ValidationException.fileError(exception); } } else { super.appendParameter(call, writer, parameter); } }
/** * Add the parameter. * Convert the parameter to a string and write it. * Convert rows to XML strings. */ public void appendParameter(Call call, Writer writer, Object parameter) { if (parameter instanceof Vector) { Vector records = (Vector)parameter; // May be a collection of record. for (int index = 0; index < records.size(); index++) { appendParameter(call, writer, (records).elementAt(index)); } } else if (parameter instanceof org.eclipse.persistence.oxm.record.DOMRecord) { String xml = ((org.eclipse.persistence.oxm.record.DOMRecord)parameter).transformToXML(); // For some reason the transform always prints the XML header, so trim it off. int start = xml.indexOf('>'); xml = xml.substring(start + 1, xml.length()); try { writer.write(xml); } catch (IOException exception) { throw ValidationException.fileError(exception); } } else { super.appendParameter(call, writer, parameter); } }