Result result = rootDomainObject.readResultByOID(resultId);
final Result result = rootDomainObject.readResultByOID(resultId);  if(result==null){ final String resultClassName = request.getAttribute("resultClassName").toString(); if (!(resultClassName == null || resultClassName.equals(""))) { if(resultClassName.compareTo(ResultPatent.class.getCanonicalName())==0){ return mapping.findForward("listPatents"); } else { return mapping.findForward("ListPublications"); } } }
    public ActionForward backToResult(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws Exception {                final Integer resultId = Integer.valueOf(request.getParameter("resultId"));        Result result = rootDomainObject.readResultByOID(resultId);                if (result instanceof ResultPatent){            request.setAttribute("patentId", resultId);            return mapping.findForward("editPatent");            }        else if (result instanceof ResultPublication){            request.setAttribute("publicationId", resultId);            return mapping.findForward("viewEditPublication");        }        return null;    }