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 List<AnalysisExpression> getAnalysisExpressionItems() { if (analysisExpressionItems == null) { getPagingInfo(); analysisExpressionItems = jpaController.findAnalysisExpressionEntities( pagingInfo.getBatchSize(), pagingInfo.getFirstItem()); } return analysisExpressionItems; }
public String create() { try { jpaController.create(analysisExpression); JsfUtil.addSuccessMessage("AnalysisExpression was successfully created."); } catch (Exception e) { JsfUtil.ensureAddErrorMessage(e, "A persistence error occurred."); return null; } return listSetup(); }
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(); }
public SelectItem[] getAnalysisExpressionItemsAvailableSelectOne() { return JsfUtil.getSelectItems(jpaController.findAnalysisExpressionEntities(), true); }
public PagingInfo getPagingInfo() { if (pagingInfo.getItemCount() == -1) { pagingInfo.setItemCount(jpaController.getAnalysisExpressionCount()); } return pagingInfo; }