@Test public void filterStatementWithNoFilterableColumns() { String statement = "select age as unfilterable_age from Users"; assertEquals(statement, this.filter.filterStatement(statement, Query.HQL)); }
@Override public String filterStatement(String statement, String language) { String constraint = getFilterableColumns(statement).stream() .map(column -> "lower(str(" + column + ")) like lower(:text)").collect(Collectors.joining(" or ")); if (constraint.isEmpty()) { return statement; } else { return insertWhereClause('(' + constraint + ')', statement, language); } }
TextQueryFilter extends AbstractWhereQueryFilter { @Override public String filterStatement(String statement, String language) { String constraint = getFilterableColumns(statement).stream() .map(column -> "lower(str(" + column + ")) like lower(:text)").collect(Collectors.joining(" or ")); if (constraint.isEmpty()) { return statement; } else { return insertWhereClause('(' + constraint + ')', statement, language); } } }
TextQueryFilter extends AbstractWhereQueryFilter { @Override public String filterStatement(String statement, String language) { String constraint = getFilterableColumns(statement).stream() .map(column -> "lower(str(" + column + ")) like lower(:text)").collect(Collectors.joining(" or ")); if (constraint.isEmpty()) { return statement; } else { return insertWhereClause('(' + constraint + ')', statement, language); } }  }
TextQueryFilter extends AbstractWhereQueryFilter { @Override public String filterStatement(String statement, String language) { String constraint = getFilterableColumns(statement).stream() .map(column -> "lower(str(" + column + ")) like lower(:text)").collect(Collectors.joining(" or ")); if (constraint.isEmpty()) { return statement; } else { return insertWhereClause('(' + constraint + ')', statement, language); } }  @Override String filterStatement(String statement, String language); @Override List filterResults(List results); }
TextQueryFilter extends AbstractWhereQueryFilter { @Override public String filterStatement(String statement, String language) { String constraint = getFilterableColumns(statement).stream() .map(column -> "lower(str(" + column + ")) like lower(:text)").collect(Collectors.joining(" or ")); if (constraint.isEmpty()) { return statement; } else { return insertWhereClause('(' + constraint + ')', statement, language); } }  @Override String filterStatement(String statement, String language); @Override List filterResults(List results);  }