public String edit() {
   String analysisExpressionString =
       converter.getAsString(FacesContext.getCurrentInstance(), null, analysisExpression);
   String currentAnalysisExpressionString =
       JsfUtil.getRequestParameter("jsfcrud.currentAnalysisExpression");
   if (analysisExpressionString == null
       || analysisExpressionString.length() == 0
       || !analysisExpressionString.equals(currentAnalysisExpressionString)) {
     String outcome = editSetup();
     if ("analysisExpression_edit".equals(outcome)) {
       JsfUtil.addErrorMessage("Could not edit analysisExpression. Try again.");
     }
     return outcome;
   }
   try {
     jpaController.edit(analysisExpression);
     JsfUtil.addSuccessMessage("AnalysisExpression was successfully updated.");
   } catch (NonexistentEntityException ne) {
     JsfUtil.addErrorMessage(ne.getLocalizedMessage());
     return listSetup();
   } catch (Exception e) {
     JsfUtil.ensureAddErrorMessage(e, "A persistence error occurred.");
     return null;
   }
   return detailSetup();
 }
 public String destroy() {
   String idAsString = JsfUtil.getRequestParameter("jsfcrud.currentAnalysisExpression");
   Integer id = new Integer(idAsString);
   try {
     jpaController.destroy(id);
     JsfUtil.addSuccessMessage("AnalysisExpression was successfully deleted.");
   } catch (NonexistentEntityException ne) {
     JsfUtil.addErrorMessage(ne.getLocalizedMessage());
     return relatedOrListOutcome();
   } catch (Exception e) {
     JsfUtil.ensureAddErrorMessage(e, "A persistence error occurred.");
     return null;
   }
   return relatedOrListOutcome();
 }