@Override public String getall() throws Exception { if (this.checkpermission("getall")) { ArrayList<FilterBeanHelper> alFilter = ParameterCook.prepareFilter(oRequest); HashMap<String, String> hmOrder = ParameterCook.prepareOrder(oRequest); String data = null; Connection oConnection = null; ConnectionInterface oDataConnectionSource = null; try { oDataConnectionSource = getSourceConnection(); oConnection = oDataConnectionSource.newConnection(); EstadoDao oEstadoDao = new EstadoDao(oConnection); ArrayList<EstadoBean> arrBeans = oEstadoDao.getAll(alFilter, hmOrder, 1); data = JsonMessage.getJson("200", AppConfigurationHelper.getGson().toJson(arrBeans)); } catch (Exception ex) { ExceptionBooster.boost( new Exception(this.getClass().getName() + ":getAll ERROR: " + ex.getMessage())); } finally { if (oConnection != null) { oConnection.close(); } if (oDataConnectionSource != null) { oDataConnectionSource.disposeConnection(); } } return data; } else { return JsonMessage.getJsonMsg("401", "Unauthorized"); } }