docs: private void primUpdate(IEntityLock lock, Date newExpiration, Integer newType, Connection conn)
              throws SQLException, LockingException {
          Integer typeID =
                  EntityTypesLocator.getEntityTypes().getEntityIDFromType(lock.getEntityType());
          String key = lock.getEntityKey();
          int oldLockType = lock.getLockType();
          int newLockType = (newType == null) ? oldLockType : newType.intValue();
          java.sql.Timestamp oldTs = new java.sql.Timestamp(lock.getExpirationTime().getTime());
          java.sql.Timestamp newTs = new java.sql.Timestamp(newExpiration.getTime());
          String owner = lock.getLockOwner();
  
          try {
              PreparedStatement ps = conn.prepareStatement(getUpdateSql());
              try {
                  ps.setTimestamp(1, newTs); // new expiration
                  ps.setInt(2, newLockType); // new lock type
                  ps.setInt(3, typeID.intValue()); // entity type
                  ps.setString(4, key); // entity key
                  ps.setString(5, owner); // lock owner
                  ps.setTimestamp(6, oldTs); // old expiration
                  ps.setInt(7, oldLockType); // old lock type;
  
                  if (log.isDebugEnabled()) log.debug("RDBMEntityLockStore.primUpdate(): " + ps);
  
                  int rc = ps.executeUpdate();
                  if (rc != 1) {
                      String errString = "Problem updating " + lock;
                      log.error(errString);
                      throw new LockingException(errString);
                  }
              } finally {
                  if (ps != null) ps.close();
              }
          } catch (java.sql.SQLException sqle) {
              log.error(sqle, sqle);
              throw sqle;
          }
      }