コード例 #1
0
 /**
  * Create a DOM input record for this interaction. Convert the database row or arguments into an
  * XML DOM tree.
  */
 public Record createInputRecord(EISAccessor accessor) {
   Record record = accessor.getEISPlatform().createDOMRecord(getInputRecordName(), accessor);
   Element dom = createInputDOM(accessor);
   accessor.getEISPlatform().setDOMInRecord(dom, record, this, accessor);
   if (record instanceof XMLRecord) {
     ((XMLRecord) record).setSession(this.getQuery().getSession());
   }
   return record;
 }
コード例 #2
0
 /** 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;
 }
コード例 #3
0
 /** 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;
 }