docs: public Object writeAndRefresh(boolean bRefreshDataIfNoMods) throws DBException
      {
          if (!this.isModified())
          {
              if ((this.getEditMode() == DBConstants.EDIT_IN_PROGRESS)
                      || (this.getEditMode() == DBConstants.EDIT_CURRENT))
              {
                  boolean bLocked = (this.getEditMode() == DBConstants.EDIT_IN_PROGRESS);
                  Object bookmark = this.getHandle(DBConstants.BOOKMARK_HANDLE);
                  if (bRefreshDataIfNoMods)
                  {
                      this.setHandle(bookmark, DBConstants.BOOKMARK_HANDLE);
                      if (bLocked)
                          this.edit();
                  }
                  return bookmark;
              }
              else
                  return null;
          }
          Object bookmark = null;
          if ((this.getEditMode() == DBConstants.EDIT_IN_PROGRESS)
              || (this.getEditMode() == DBConstants.EDIT_CURRENT))
          {
              if (this.getEditMode() == DBConstants.EDIT_CURRENT)
              {    // HACK - It should have been locked already... especially if there were any changes
                  BaseBuffer buffer = null;
                  if (this.isModified())
                  {
                      buffer = new VectorBuffer(null, BaseBuffer.ALL_FIELDS | BaseBuffer.MODIFIED_ONLY);
                      buffer.fieldsToBuffer(this);
                  }
                  this.edit();
                  if (buffer != null)
                  {
                      boolean[] rgListeners = this.setEnableListeners(false);
                      Object[] rgFieldListeners = this.setEnableFieldListeners(false);
                      buffer.bufferToFields(this, DBConstants.DONT_DISPLAY, DBConstants.READ_MOVE);
                      buffer.free();
                      this.setEnableFieldListeners(rgFieldListeners);
                      this.setEnableListeners(rgListeners);
                  }
              }
              bookmark = this.getHandle(DBConstants.BOOKMARK_HANDLE);
              int iOldOpenMode = this.getOpenMode();
              this.setOpenMode(iOldOpenMode | DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE);    // Don't relinquish my lock
              this.set();
              this.setHandle(bookmark, DBConstants.BOOKMARK_HANDLE);
              this.setOpenMode(iOldOpenMode);
              this.edit();
          }
          else if (this.getEditMode() == DBConstants.EDIT_ADD)
          {
              this.add();
              bookmark = this.getLastModified(DBConstants.BOOKMARK_HANDLE);
              this.setHandle(bookmark, DBConstants.BOOKMARK_HANDLE);
              this.edit();
          }
          return bookmark;
      }