@Test public void testToRESTQuery() { String value = resolver.toRESTQuery("A;B C;\"\""); Assert.assertEquals("\"A\" OR \"B C\" OR \"\"", value); }
@Override public String toRESTQuery(String value) { LinkedList<String> list = new LinkedList<String>(); for(String item: Arrays.asList(value.split(";"))) { if(NO_VALUE.equals(item)) { list.add(NO_VALUE); } else { list.add("\"" + item + "\""); } } return StringUtils.join(list, " OR "); }
MultipleItemsResolver implements FilterResolver { @Override public String toRESTQuery(String value) { LinkedList<String> list = new LinkedList<String>(); for(String item: Arrays.asList(value.split(";"))) { if(NO_VALUE.equals(item)) { list.add(NO_VALUE); } else { list.add("\"" + item + "\""); } } return StringUtils.join(list, " OR "); } }
MultipleItemsResolver implements FilterResolver { @Override public String toRESTQuery(String value) { LinkedList<String> list = new LinkedList<String>(); for(String item: Arrays.asList(value.split(";"))) { if(NO_VALUE.equals(item)) { list.add(NO_VALUE); } else { list.add("\"" + item + "\""); } } return StringUtils.join(list, " OR "); }  }
MultipleItemsResolver implements FilterResolver { @Override public String toRESTQuery(String value) { LinkedList<String> list = new LinkedList<String>(); for(String item: Arrays.asList(value.split(";"))) { if(NO_VALUE.equals(item)) { list.add(NO_VALUE); } else { list.add("\"" + item + "\""); } } return StringUtils.join(list, " OR "); }  @Override String resolveDisplayValue(String value, final ValueCallback onValue); @Override String toRESTQuery(String value); }
MultipleItemsResolver implements FilterResolver { @Override public String toRESTQuery(String value) { LinkedList<String> list = new LinkedList<String>(); for(String item: Arrays.asList(value.split(";"))) { if(NO_VALUE.equals(item)) { list.add(NO_VALUE); } else { list.add("\"" + item + "\""); } } return StringUtils.join(list, " OR "); }  @Override String resolveDisplayValue(String value, final ValueCallback onValue); @Override String toRESTQuery(String value); static final String NO_VALUE; static final String NO_VALUE_DESC; }