docs: public synchronized boolean existsReferencesTo(NodeId targetId) throws ItemStateException {
          if (!initialized) {
              throw new IllegalStateException("not initialized");
          }
  
          ResultSet rs = null;
          try {
              rs = conHelper.exec(nodeReferenceSelectSQL, getKey(targetId), false, 0);
  
              // a reference exists if the result has at least one entry
              return rs.next();
          } catch (Exception e) {
              String msg = "failed to check existence of node references: "
                  + targetId;
              log.error(msg, e);
              throw new ItemStateException(msg, e);
          } finally {
              DbUtility.close(rs);
          }
      }