public String remove() {
   String idAsString = JsfUtil.getRequestParameter("jsfcrud.currentOfertas");
   Integer id = new Integer(idAsString);
   try {
     utx.begin();
   } catch (Exception ex) {
   }
   try {
     Exception transactionException = null;
     getJpaController().remove(getJpaController().find(id));
     try {
       utx.commit();
     } catch (javax.transaction.RollbackException ex) {
       transactionException = ex;
     } catch (Exception ex) {
     }
     if (transactionException == null) {
       JsfUtil.addSuccessMessage("Ofertas was successfully deleted.");
     } else {
       JsfUtil.ensureAddErrorMessage(transactionException, "A persistence error occurred.");
     }
   } catch (Exception e) {
     try {
       utx.rollback();
     } catch (Exception ex) {
     }
     JsfUtil.ensureAddErrorMessage(e, "A persistence error occurred.");
     return null;
   }
   return relatedOrListOutcome();
 }
 public String create() {
   try {
     utx.begin();
   } catch (Exception ex) {
   }
   try {
     Exception transactionException = null;
     getJpaController().create(ofertas);
     try {
       utx.commit();
     } catch (javax.transaction.RollbackException ex) {
       transactionException = ex;
     } catch (Exception ex) {
     }
     if (transactionException == null) {
       JsfUtil.addSuccessMessage("Ofertas was successfully created.");
     } else {
       JsfUtil.ensureAddErrorMessage(transactionException, "A persistence error occurred.");
     }
   } catch (Exception e) {
     try {
       utx.rollback();
     } catch (Exception ex) {
     }
     JsfUtil.ensureAddErrorMessage(e, "A persistence error occurred.");
     return null;
   }
   return listSetup();
 }
 public String edit() {
   String ofertasString = converter.getAsString(FacesContext.getCurrentInstance(), null, ofertas);
   String currentOfertasString = JsfUtil.getRequestParameter("jsfcrud.currentOfertas");
   if (ofertasString == null
       || ofertasString.length() == 0
       || !ofertasString.equals(currentOfertasString)) {
     String outcome = editSetup();
     if ("ofertas_edit".equals(outcome)) {
       JsfUtil.addErrorMessage("Could not edit ofertas. Try again.");
     }
     return outcome;
   }
   try {
     utx.begin();
   } catch (Exception ex) {
   }
   try {
     Exception transactionException = null;
     getJpaController().edit(ofertas);
     try {
       utx.commit();
     } catch (javax.transaction.RollbackException ex) {
       transactionException = ex;
     } catch (Exception ex) {
     }
     if (transactionException == null) {
       JsfUtil.addSuccessMessage("Ofertas was successfully updated.");
     } else {
       JsfUtil.ensureAddErrorMessage(transactionException, "A persistence error occurred.");
     }
   } catch (Exception e) {
     try {
       utx.rollback();
     } catch (Exception ex) {
     }
     JsfUtil.ensureAddErrorMessage(e, "A persistence error occurred.");
     return null;
   }
   return detailSetup();
 }