local_runtime_shared_jetty9/src/main/java/com/google/apphosting/utils/servlet/DatastoreViewerServlet.java [353:394]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private void doGetEntityDetails(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    String key = req.getParameter(KEY);
    String keyName = null;
    Long keyId = null;
    String kind = null;
    String parentKey = null;
    String parentKind = null;
    if (key != null) {
      Key k = KeyFactory.stringToKey(key);
      if (k.getName() != null) {
        keyName = k.getName();
      } else {
        keyId = k.getId();
      }
      kind = k.getKind();
      if (k.getParent() != null) {
        parentKey = KeyFactory.keyToString(k.getParent());
        parentKind = k.getParent().getKind();
      }
      DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
      Entity e;
      try {
        e = ds.get(KeyFactory.stringToKey(key));
      } catch (EntityNotFoundException e1) {
        throw new RuntimeException("Could not locate entity " + key);
      }
      req.setAttribute("entity", new EntityDetailsView(e));
    } else {
      // TODO Handle creation case
    }
    String url =
        String.format(
            "/_ah/adminConsole?subsection=entityDetails&" +
                "key=%s&keyName=%s&keyId=%d&kind=%s&parentKey=%s&parentKind=%s",
            key, keyName, keyId, kind, parentKey, parentKind);
    try {
      getServletContext().getRequestDispatcher(url).forward(req, resp);
    } catch (ServletException e) {
      throw new RuntimeException("Could not forward request", e);
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



local_runtime_shared_jetty12/src/main/java/com/google/apphosting/utils/servlet/ee10/DatastoreViewerServlet.java [353:394]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private void doGetEntityDetails(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    String key = req.getParameter(KEY);
    String keyName = null;
    Long keyId = null;
    String kind = null;
    String parentKey = null;
    String parentKind = null;
    if (key != null) {
      Key k = KeyFactory.stringToKey(key);
      if (k.getName() != null) {
        keyName = k.getName();
      } else {
        keyId = k.getId();
      }
      kind = k.getKind();
      if (k.getParent() != null) {
        parentKey = KeyFactory.keyToString(k.getParent());
        parentKind = k.getParent().getKind();
      }
      DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
      Entity e;
      try {
        e = ds.get(KeyFactory.stringToKey(key));
      } catch (EntityNotFoundException e1) {
        throw new RuntimeException("Could not locate entity " + key);
      }
      req.setAttribute("entity", new EntityDetailsView(e));
    } else {
      // TODO Handle creation case
    }
    String url =
        String.format(
            "/_ah/adminConsole?subsection=entityDetails&" +
                "key=%s&keyName=%s&keyId=%d&kind=%s&parentKey=%s&parentKind=%s",
            key, keyName, keyId, kind, parentKey, parentKind);
    try {
      getServletContext().getRequestDispatcher(url).forward(req, resp);
    } catch (ServletException e) {
      throw new RuntimeException("Could not forward request", e);
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



local_runtime_shared_jetty12/src/main/java/com/google/apphosting/utils/servlet/DatastoreViewerServlet.java [353:394]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private void doGetEntityDetails(HttpServletRequest req, HttpServletResponse resp)
      throws IOException {
    String key = req.getParameter(KEY);
    String keyName = null;
    Long keyId = null;
    String kind = null;
    String parentKey = null;
    String parentKind = null;
    if (key != null) {
      Key k = KeyFactory.stringToKey(key);
      if (k.getName() != null) {
        keyName = k.getName();
      } else {
        keyId = k.getId();
      }
      kind = k.getKind();
      if (k.getParent() != null) {
        parentKey = KeyFactory.keyToString(k.getParent());
        parentKind = k.getParent().getKind();
      }
      DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
      Entity e;
      try {
        e = ds.get(KeyFactory.stringToKey(key));
      } catch (EntityNotFoundException e1) {
        throw new RuntimeException("Could not locate entity " + key);
      }
      req.setAttribute("entity", new EntityDetailsView(e));
    } else {
      // TODO Handle creation case
    }
    String url =
        String.format(
            "/_ah/adminConsole?subsection=entityDetails&" +
                "key=%s&keyName=%s&keyId=%d&kind=%s&parentKey=%s&parentKind=%s",
            key, keyName, keyId, kind, parentKey, parentKind);
    try {
      getServletContext().getRequestDispatcher(url).forward(req, resp);
    } catch (ServletException e) {
      throw new RuntimeException("Could not forward request", e);
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



