code: public void addRow(String primaryKeyColumnName, Map<String, Object> map)
     {
        Integer rowNumber = Integer.valueOf(m_rowNumber++);
        map.put("ROW_NUMBER", rowNumber);
        Object primaryKey = null;
        if (primaryKeyColumnName != null)
        {
           primaryKey = map.get(primaryKeyColumnName);
        }
  
        if (primaryKey == null)
        {
           primaryKey = rowNumber;
        }
  
        MapRow newRow = new MapRow(map);
        MapRow oldRow = m_rows.get(primaryKey);
        if (oldRow == null)
        {
           m_rows.put(primaryKey, newRow);
        }
        else
        {
           int oldVersion = oldRow.getInteger("ROW_VERSION").intValue();
           int newVersion = newRow.getInteger("ROW_VERSION").intValue();
           if (newVersion > oldVersion)
           {
              m_rows.put(primaryKey, newRow);
           }
        }
     }
docs: Add a row to the table. We have a limited understanding of the way
  Btrieve handles outdated rows, so we use what we think is a version number
  to try to ensure that we only have the latest rows.
  
  @param primaryKeyColumnName primary key column name
  @param map Map containing row data