    public Response loadData(int action, int startIndex, Map filteredColumns, ArrayList currentSortedColumns, ArrayList currentSortedVersusColumns, Class valueObjectType, Map otherGridParams) {
        ReportesGridFrame frame = (ReportesGridFrame) gridFrame;
        Session s = null;
        try {
            filteredColumns.put(
                    "mostarEnListado",
                    new FilterWhereClause[]{
                        new FilterWhereClause("mostarEnListado", "=", true),
                        null
                    });
            String sql = "FROM " + claseModeloFullPath + " C ";
            boolean sw = false;
            if (frame.getCategoria() != null) {
                sql += " WHERE C.categoria='" + frame.getCategoria() + "' ";
                sw = true;
            }
            if (frame.getTipo() != -1) {
                if (sw) {
                    sql += " AND ";
                } else {
                    sql += " WHERE ";
                }
                sql += " C.tipo=" + frame.getTipo() + " ";
            }
            SessionFactory sf = HibernateUtil.getSessionFactory();
            s = sf.openSession();
            Response res = HibernateUtils.getAllFromQuery(
                    filteredColumns,
                    currentSortedColumns,
                    currentSortedVersusColumns,
                    valueObjectType,
                    sql,
                    new Object[0],
                    new Type[0],
                    "C",
                    sf,
                    s);
            return res;
        } catch (Exception ex) {
            LoggerUtil.error(this.getClass(), "loadData", ex);
            return new ErrorResponse(ex.getMessage());
        } finally {
            if (s != null) {
                s.close();
            }
        }
    }

    public Response loadData(int action, int startIndex, Map filteredColumns, ArrayList currentSortedColumns, ArrayList currentSortedVersusColumns, Class valueObjectType, Map otherGridParams) {
        ReportesGridFrame frame = (ReportesGridFrame) gridFrame;
        Session s = null;
        try {
            String sql = "FROM " + claseModeloFullPath + " C ";
            boolean sw = false;
            if (frame.getCategoria() != null) {
                sql += " WHERE C.categoria='" + frame.getCategoria() + "' ";
                sw = true;
            }
            if (frame.getTipo() != -1) {
                if (sw) {
                    sql += " AND ";
                } else {
                    sql += " WHERE ";
                }
                sql += " C.tipo=" + frame.getTipo() + " ";
            }
            SessionFactory sf = HibernateUtil.getSessionFactory();
            s = sf.openSession();
            Response res = HibernateUtils.getAllFromQuery(
                    filteredColumns,
                    currentSortedColumns,
                    currentSortedVersusColumns,
                    valueObjectType,
                    sql,
                    new Object[0],
                    new Type[0],
                    "C",
                    sf,
                    s);
            return res;
        } catch (Exception ex) {
            LoggerUtil.error(this.getClass(), "loadData", ex);
            return new ErrorResponse(ex.getMessage());
        } finally {
            if (s != null) {
                s.close();
            }
        }
    }
