code: public Rec setDataIndex(int iNodeIndex, Rec record)
      {
          if (record != null)
          {
              if (RESET_INDEX == iNodeIndex)
              {
                  m_recTargetFieldList = record;
                  if ((this.getNodeType() == MessageRecordDesc.NON_UNIQUE_NODE)
                      && (!this.isSingleDetail(record)))
                          record = this.createSubDataRecord(record);
              }
              else if (END_OF_NODES == iNodeIndex)
              {
                  if (!this.isCurrentDataRecord(record))
                  {
                      record = this.updateRecord(record, false);
                      record.free();
                  }
                  m_recTargetFieldList = null;
              }
              else
              {
                  if (!this.isCurrentDataRecord(record))
                  {
                      record = this.updateRecord(record, false);
                      if (record != null)
                      {
                          try
                          {
                              if (record.getTable().hasNext())
                              {
                                  record = (Rec)record.getTable().next();
                                  if (record != null)
                                      if (m_recTargetFieldList != null)
                                          if (record.getTableNames(false).equalsIgnoreCase(m_recTargetFieldList.getTableNames(false)))
                                              if (record.getTable().getHandle(0).equals(m_recTargetFieldList.getTable().getHandle(0)))
                                                  if (m_recTargetFieldList.isModified())
                                              {   // I just read the same record as the target, make sure I have the current copy
                                                  super.setDataIndex(iNodeIndex, record); // Set the node index before returning
                                                  return m_recTargetFieldList;
                                              }
                              }
                              else
                                  record = null;  // EOF
                          } catch (DBException ex) {
                              ex.printStackTrace();
                              record = null;
                          }
                      }
                  }
              }
          }
  
          return super.setDataIndex(iNodeIndex, record);
      }
docs: Position to this node in the tree.
  @param iNodeIndex The node to position to.
  @param record The record I am moving data to. If this is null, don't position/setup the data.
  @return An error code.