/** * Build a collection of database rows from the Record returned from the interaction. */ public Vector buildRows(Record record, EISAccessor accessor) { Vector rows = null; if (record == null) { return new Vector(0); } AbstractRecord row = accessor.getEISPlatform().createDatabaseRowFromDOMRecord(record, this, accessor); if (getOutputResultPath().length() > 0) { Vector values = (Vector)row.getValues(getOutputResultPath()); if (values == null) { values = new Vector(0); } rows = values; } else { rows = new Vector(1); rows.add(row); } return rows; }
/** * Build a collection of database rows from the Record returned from the interaction. */ public Vector buildRows(Record record, EISAccessor accessor) { Vector rows = null; if (record == null) { return new Vector(0); } AbstractRecord row = accessor.getEISPlatform().createDatabaseRowFromDOMRecord(record, this, accessor); if (getOutputResultPath().length() > 0) { Vector values = (Vector)row.getValues(getOutputResultPath()); if (values == null) { values = new Vector(0); } rows = values; } else { rows = new Vector(1); rows.add(row); } return rows; }
/** * Build a collection of database rows from the Record returned from the interaction. */ public Vector buildRows(Record record, EISAccessor accessor) { Vector rows = null; if (record == null) { return new Vector(0); } AbstractRecord row = accessor.getEISPlatform().createDatabaseRowFromDOMRecord(record, this, accessor); if (getOutputResultPath().length() > 0) { Vector values = (Vector)row.getValues(getOutputResultPath()); if (values == null) { values = new Vector(0); } rows = values; } else { rows = new Vector(1); rows.add(row); } return rows; }
/** * Build a database row from the record returned from the interaction. */ public AbstractRecord buildRow(Record record, EISAccessor accessor) { if (record == null) { return null; } AbstractRecord row = accessor.getEISPlatform().createDatabaseRowFromDOMRecord(record, this, accessor); if (row == null) { return null; } if (getOutputResultPath().length() > 0) { row = (AbstractRecord)row.get(getOutputResultPath()); // Handle the case were the output row is mapped into a database row of values. } else if (hasOutputArguments()) { row = createXMLRecord(getOutputRootElementName()); for (int index = 0; index < getOutputArgumentNames().size(); index++) { DatabaseField field = (DatabaseField)getOutputArguments().get(index); row.put(field, row.get(getOutputArgumentNames().get(index))); } } return row; }
/** * Build a database row from the record returned from the interaction. */ public AbstractRecord buildRow(Record record, EISAccessor accessor) { if (record == null) { return null; } AbstractRecord row = accessor.getEISPlatform().createDatabaseRowFromDOMRecord(record, this, accessor); if (row == null) { return null; } if (getOutputResultPath().length() > 0) { row = (AbstractRecord)row.get(getOutputResultPath()); // Handle the case were the output row is mapped into a database row of values. } else if (hasOutputArguments()) { row = createXMLRecord(getOutputRootElementName()); for (int index = 0; index < getOutputArgumentNames().size(); index++) { DatabaseField field = (DatabaseField)getOutputArguments().get(index); row.put(field, row.get(getOutputArgumentNames().get(index))); } } return row; }
/** * Build a database row from the record returned from the interaction. */ public AbstractRecord buildRow(Record record, EISAccessor accessor) { if (record == null) { return null; } AbstractRecord row = accessor.getEISPlatform().createDatabaseRowFromDOMRecord(record, this, accessor); if (row == null) { return null; } if (getOutputResultPath().length() > 0) { row = (AbstractRecord)row.get(getOutputResultPath()); // Handle the case were the output row is mapped into a database row of values. } else if (hasOutputArguments()) { row = createXMLRecord(getOutputRootElementName()); for (int index = 0; index < getOutputArgumentNames().size(); index++) { DatabaseField field = (DatabaseField)getOutputArguments().get(index); row.put(field, row.get(getOutputArgumentNames().get(index))); } } return row; }
protected void addXMLInteractionLines(NonreflectiveMethodDefinition method, XMLInteraction interaction, String variableName) { method.addLine("org.eclipse.persistence.eis.XMLInteraction " + variableName + " = new org.eclipse.persistence.eis.XMLInteraction();"); if ((interaction.getFunctionName() != null) && (interaction.getFunctionName().length() != 0)) { method.addLine(variableName + ".setFunctionName(\"" + interaction.getFunctionName() + "\");"); } if ((interaction.getInputRecordName() != null) && (interaction.getInputRecordName().length() != 0)) { method.addLine(variableName + ".setInputRecordName(\"" + interaction.getInputRecordName() + "\");"); } if ((interaction.getInputRootElementName() != null) && (interaction.getInputRootElementName().length() != 0)) { method.addLine(variableName + ".setInputRootElementName(\"" + interaction.getInputRootElementName() + "\");"); } if ((interaction.getInputResultPath() != null) && (interaction.getInputResultPath().length() != 0)) { method.addLine(variableName + ".setInputResultPath(\"" + interaction.getInputResultPath() + "\");"); } if ((interaction.getOutputResultPath() != null) && (interaction.getOutputResultPath().length() != 0)) { method.addLine(variableName + ".setOutputResultPath(\"" + interaction.getOutputResultPath() + "\");"); } for (int index = interaction.getArgumentNames().size(); index < interaction.getArgumentNames().size(); index++) { String argumentName = (String)interaction.getArgumentNames().get(index); String argument = (String)interaction.getArguments().get(index); method.addLine(variableName + ".addArgument(\"" + argumentName + "\", \"" + argument + "\");"); } }
protected void addXMLInteractionLines(NonreflectiveMethodDefinition method, XMLInteraction interaction, String variableName) { method.addLine("org.eclipse.persistence.eis.XMLInteraction " + variableName + " = new org.eclipse.persistence.eis.XMLInteraction();"); if ((interaction.getFunctionName() != null) && (interaction.getFunctionName().length() != 0)) { method.addLine(variableName + ".setFunctionName(\"" + interaction.getFunctionName() + "\");"); } if ((interaction.getInputRecordName() != null) && (interaction.getInputRecordName().length() != 0)) { method.addLine(variableName + ".setInputRecordName(\"" + interaction.getInputRecordName() + "\");"); } if ((interaction.getInputRootElementName() != null) && (interaction.getInputRootElementName().length() != 0)) { method.addLine(variableName + ".setInputRootElementName(\"" + interaction.getInputRootElementName() + "\");"); } if ((interaction.getInputResultPath() != null) && (interaction.getInputResultPath().length() != 0)) { method.addLine(variableName + ".setInputResultPath(\"" + interaction.getInputResultPath() + "\");"); } if ((interaction.getOutputResultPath() != null) && (interaction.getOutputResultPath().length() != 0)) { method.addLine(variableName + ".setOutputResultPath(\"" + interaction.getOutputResultPath() + "\");"); } for (int index = interaction.getArgumentNames().size(); index < interaction.getArgumentNames().size(); index++) { String argumentName = (String)interaction.getArgumentNames().get(index); String argument = (String)interaction.getArguments().get(index); method.addLine(variableName + ".addArgument(\"" + argumentName + "\", \"" + argument + "\");"); } }
protected void addXMLInteractionLines(NonreflectiveMethodDefinition method, XMLInteraction interaction, String variableName) { method.addLine("org.eclipse.persistence.eis.XMLInteraction " + variableName + " = new org.eclipse.persistence.eis.XMLInteraction();"); if ((interaction.getFunctionName() != null) && (interaction.getFunctionName().length() != 0)) { method.addLine(variableName + ".setFunctionName(\"" + interaction.getFunctionName() + "\");"); } if ((interaction.getInputRecordName() != null) && (interaction.getInputRecordName().length() != 0)) { method.addLine(variableName + ".setInputRecordName(\"" + interaction.getInputRecordName() + "\");"); } if ((interaction.getInputRootElementName() != null) && (interaction.getInputRootElementName().length() != 0)) { method.addLine(variableName + ".setInputRootElementName(\"" + interaction.getInputRootElementName() + "\");"); } if ((interaction.getInputResultPath() != null) && (interaction.getInputResultPath().length() != 0)) { method.addLine(variableName + ".setInputResultPath(\"" + interaction.getInputResultPath() + "\");"); } if ((interaction.getOutputResultPath() != null) && (interaction.getOutputResultPath().length() != 0)) { method.addLine(variableName + ".setOutputResultPath(\"" + interaction.getOutputResultPath() + "\");"); } for (int index = interaction.getArgumentNames().size(); index < interaction.getArgumentNames().size(); index++) { String argumentName = (String)interaction.getArgumentNames().get(index); String argument = (String)interaction.getArguments().get(index); method.addLine(variableName + ".addArgument(\"" + argumentName + "\", \"" + argument + "\");"); } }