docs: public boolean lockOnDBTrxType(Record record, int iTrxType, boolean bModeLock)
      {
          if (record == null)
              record = this.getRecord();
  
          boolean bCallLock = false;
          if (record != null)
          {
              if (bModeLock)
              {   // If I'm locking
                  if ((record.getOpenMode() & DBConstants.OPEN_LOCK_ON_EDIT_STRATEGY) != 0)
                      bCallLock = true;  // Usually lock record
                  if (iTrxType == DBConstants.LOCK_TYPE)
                  {
                      if ((record.getOpenMode() & DBConstants.OPEN_WAIT_FOR_LOCK_STRATEGY) == DBConstants.OPEN_WAIT_FOR_LOCK_STRATEGY)
                          bCallLock = true;
                      else
                          bCallLock = false;   // I don't lock otherwise
                  }
              }
              else
              {   // If I'm unlocking
                  if ((record.getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) == DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE)
                      bCallLock = false;   // I don't unlock if this is set
                  else
                  {
                      if ((record.getOpenMode() & DBConstants.OPEN_LOCK_ON_EDIT_STRATEGY) != 0)
                          bCallLock = true;  // Usually unlock record
                      if (iTrxType == DBConstants.UPDATE_TYPE)
                      {
                          if ((record.getOpenMode() & DBConstants.OPEN_MERGE_ON_LOCK_STRATEGY) == DBConstants.OPEN_MERGE_ON_LOCK_STRATEGY)
                              bCallLock = true;
                          else
                              bCallLock = false;   // I don't lock otherwise
                      }
                  }
              }
          }
          return bCallLock;    // By default, I do lock on this type
      }