public void updateRecordSoft(int id) throws IOException {
  if (!database.isOpen())   throw new IllegalStateException("don't access the table before opening the database");
  if (hardWriteMode)   throw new IllegalStateException("soft write attempted during hard write mode");
  if (id > lastTransactionInsertId)   throw new IllegalStateException("attempt to update a row past the last inserted row");
  if (id >= committedNextRowId)   return;
  if (softModeSavedRows.get(id,false))   return;
  softModeSavedRows.put(id,true);
synchronized (this) {
    getRecord(tempRecordData,id);
  }
  Util.writeInt(rollBackOut,id);
  rollBackOut.write(tempRecordData);
}

public void updateRecordSoft ( int id ) throws IOException { if ( ! database . isOpen ( ) ) throw new IllegalStateException ( "don't access the table before opening the database" ) ; if ( hardWriteMode ) throw new IllegalStateException ( "soft write attempted during hard write mode" ) ; if ( id > lastTransactionInsertId ) throw new IllegalStateException ( "attempt to update a row past the last inserted row" ) ; if ( id >= committedNextRowId ) return ; if ( softModeSavedRows . get ( id , false ) ) return ; softModeSavedRows . put ( id , true ) ; synchronized ( this ) { getRecord ( tempRecordData , id ) ; } Util . writeInt ( rollBackOut , id ) ; rollBackOut . write ( tempRecordData ) ; }
both a soft write and a hard write must be done in order to update a record . all soft writes for a transaction must be done , then a soft commit and finally hard writes are performed . hard writes must write to the same rows that the soft writes did .
