@Test public void testMissingGlobalDialect() throws Exception { MultipleFilterDialect dialect = new MultipleFilterDialect( Collections.EMPTY_LIST, Collections.EMPTY_LIST ); MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<>(); queryParams.add( "filter[author.books.title][in]", "foo,bar,baz" ); queryParams.add( "filter[author.name][infix]", "Hemingway" ); assertThrows(ParseException.class, () -> dialect.parseGlobalExpression("/author", queryParams)); }
@Override public FilterExpression parseGlobalExpression(String path, MultivaluedMap<String, String> queryParams) throws ParseException { if (joinDialects.isEmpty()) { throw new ParseException("Heterogeneous type filtering not supported"); } return parseExpression(joinDialects, (dialect) -> dialect.parseGlobalExpression(path, queryParams)); }
MultipleFilterDialect implements JoinFilterDialect, SubqueryFilterDialect { @Override public FilterExpression parseGlobalExpression(String path, MultivaluedMap<String, String> queryParams) throws ParseException { if (joinDialects.isEmpty()) { throw new ParseException("Heterogeneous type filtering not supported"); } return parseExpression(joinDialects, (dialect) -> dialect.parseGlobalExpression(path, queryParams)); } }
MultipleFilterDialect implements JoinFilterDialect, SubqueryFilterDialect { @Override public FilterExpression parseGlobalExpression(String path, MultivaluedMap<String, String> queryParams) throws ParseException { if (joinDialects.isEmpty()) { throw new ParseException("Heterogeneous type filtering not supported"); } return parseExpression(joinDialects, (dialect) -> dialect.parseGlobalExpression(path, queryParams)); } MultipleFilterDialect(EntityDictionary dictionary); }
MultipleFilterDialect implements JoinFilterDialect, SubqueryFilterDialect { @Override public FilterExpression parseGlobalExpression(String path, MultivaluedMap<String, String> queryParams) throws ParseException { if (joinDialects.isEmpty()) { throw new ParseException("Heterogeneous type filtering not supported"); } return parseExpression(joinDialects, (dialect) -> dialect.parseGlobalExpression(path, queryParams)); } MultipleFilterDialect(EntityDictionary dictionary); @Override FilterExpression parseGlobalExpression(String path,
                                                  MultivaluedMap<String, String> queryParams); @Override Map<String, FilterExpression> parseTypedExpression(String path,
                                                              MultivaluedMap<String, String> queryParams); }
MultipleFilterDialect implements JoinFilterDialect, SubqueryFilterDialect { @Override public FilterExpression parseGlobalExpression(String path, MultivaluedMap<String, String> queryParams) throws ParseException { if (joinDialects.isEmpty()) { throw new ParseException("Heterogeneous type filtering not supported"); } return parseExpression(joinDialects, (dialect) -> dialect.parseGlobalExpression(path, queryParams)); } MultipleFilterDialect(EntityDictionary dictionary); @Override FilterExpression parseGlobalExpression(String path,
                                                  MultivaluedMap<String, String> queryParams); @Override Map<String, FilterExpression> parseTypedExpression(String path,
                                                              MultivaluedMap<String, String> queryParams);  }