@Test public void filterWithPositionalParameterAndFunction() { Query query = mock(Query.class); when(query.getLanguage()).thenReturn(Query.HQL); when(query.getStatement()).thenReturn("select a from b where ref like LOWER(?)"); Map<Integer, Object> positionalParameters = new LinkedHashMap<>(); positionalParameters.put(0, new DefaultQueryParameter(query).literal("wiki:space1.space\\.2.space!3.WebHome")); when(query.getPositionalParameters()).thenReturn(positionalParameters); Query filteredQuery = this.filter.filterQuery(query); assertEquals("SELECT a FROM b WHERE ref LIKE LOWER(?) ESCAPE '!'", filteredQuery.getStatement()); assertEquals("wiki:space1.space\\.2.space!!3.WebHome", filteredQuery.getPositionalParameters().get(0)); }
@Override public Query filterQuery(Query query) { return new EscapeLikeParametersQuery(query); }
EscapeLikeParametersFilter implements QueryFilter { @Override public Query filterQuery(Query query) { return new EscapeLikeParametersQuery(query); } }
EscapeLikeParametersFilter implements QueryFilter { @Override public Query filterQuery(Query query) { return new EscapeLikeParametersQuery(query); }  }
EscapeLikeParametersFilter implements QueryFilter { @Override public Query filterQuery(Query query) { return new EscapeLikeParametersQuery(query); }  @Override Query filterQuery(Query query); @Override String filterStatement(String statement, String language); @Override List filterResults(List results); }
EscapeLikeParametersFilter implements QueryFilter { @Override public Query filterQuery(Query query) { return new EscapeLikeParametersQuery(query); }  @Override Query filterQuery(Query query); @Override String filterStatement(String statement, String language); @Override List filterResults(List results);  }