code: public boolean checkRead(TransactionImpl tx, Object obj)
      {
          if (hasReadLock(tx, obj))
          {
              return true;
          }
          LockEntry writer = getWriter(obj);
          if (writer.isOwnedBy(tx))
          {
              return true;
          }
          return false;
      }
docs: checks whether the specified Object obj is read-locked by Transaction tx.
  @param tx the transaction
  @param obj the Object to be checked
  @return true if lock exists, else false