@Override
  public List<Predicat> createPredicats(Request request, List<Predicat> predicats) throws Exception {
    DataSetApplication dsApplication = (DataSetApplication) getContext().getAttributes().get("DataSetApplication");
    DataSet ds =  dsApplication.getDataSet();

    Form params = request.getResourceRef().getQueryAsForm();
    boolean filterExists = true;
    int i = 0;
    while (filterExists) {
      String index = TEMPLATE_PARAM.replace("#", Integer.toString(i++));
      String formParam = params.getFirstValue(index);
      if (formParam != null) {
        String[] parameters = formParam.split("\\|");
        TYPE_COMPONENT[] types = TYPE_COMPONENT.values();
        Boolean trouve = false;
        for (TYPE_COMPONENT typeCmp : types) {
          if (typeCmp.name().equals(parameters[TYPE])) {
            trouve = true;
          }
        }
        if (trouve) {
          if (checkValues(parameters)) {
            String[] columnsAlias = parameters[COLUMN].split(",");
            ArrayList<Column> columns = new ArrayList<Column>();
            for (String columnAlias : columnsAlias) {
              Column col = ds.findByColumnAlias(columnAlias);
              if (col != null) {
                columns.add(col);
              }
            }
            SitoolsSQLDataSource dsource = SitoolsSQLDataSourceFactory.getDataSource(ds.getDatasource().getId());
            RequestSql requestSql = RequestFactory.getRequest(dsource.getDsModel().getDriverClass());
            
            String longRunColStr = requestSql.convertColumnToString(columns.get(0));
            String shortRunColStr = requestSql.convertColumnToString(columns.get(1));
            String centerColStr = requestSql.convertColumnToString(columns.get(2));
            String anticenterColStr = requestSql.convertColumnToString(columns.get(3));
            
            boolean longRunValue = Boolean.valueOf(SQLUtils.escapeString(values[0]));
            boolean shortRunValue = Boolean.valueOf(SQLUtils.escapeString(values[1]));
            boolean centerValue = Boolean.valueOf(SQLUtils.escapeString(values[2]));
            boolean anticenterValue = Boolean.valueOf(SQLUtils.escapeString(values[3]));

            
            Predicat predicat = new Predicat();
            
            predicat.setStringDefinition(" AND ("+longRunColStr+" = "+longRunValue+" OR "+shortRunColStr+" = "+shortRunValue+")"+" AND ("+centerColStr+ " = "+ centerValue+" OR "+anticenterColStr+" = "+anticenterValue+")");
            predicats.add(predicat);
            
          }
        }
      }else {
        filterExists = false;
      }
    }
   return predicats;
  }