code: @MustBeLocked (ELockType.WRITE)
    protected final void markAsChanged ()
    {
      // Just remember that something changed
      internalSetPendingChanges (true);
      if (internalIsAutoSaveEnabled ())
      {
        // Auto save
        if (_writeToFile ().isSuccess ())
          internalSetPendingChanges (false);
        else
        {
          if (LOGGER.isErrorEnabled ())
            LOGGER.error ("The DAO of class " +
                          getClass ().getName () +
                          " still has pending changes after markAsChanged!");
        }
      }
    }
docs: This method must be called every time something changed in the DAO. It
  triggers the writing to a file if auto-save is active. This method must be
  called within a write-lock as it is not locked!