@Test public void shouldReturnSearchPatterns() { assertEquals(".*something.*", QueryUtil.asMatchesPattern("something")); assertEquals(".* .*", QueryUtil.asMatchesPattern(" ")); assertEquals("", QueryUtil.asMatchesPattern("")); assertNull(QueryUtil.asMatchesPattern(null)); }
public static String asMatchesPattern(String string) { return StringUtils.isNotEmpty(string) ? String.format(".*%s.*", string) : string; }
QueryUtil { public static String asMatchesPattern(String string) { return StringUtils.isNotEmpty(string) ? String.format(".*%s.*", string) : string; } }
QueryUtil { public static String asMatchesPattern(String string) { return StringUtils.isNotEmpty(string) ? String.format(".*%s.*", string) : string; } private  QueryUtil(); }
QueryUtil { public static String asMatchesPattern(String string) { return StringUtils.isNotEmpty(string) ? String.format(".*%s.*", string) : string; } private  QueryUtil(); static void setQueryParams(Query query, QueryParams queryParams); static void useFilters(Query query, Filters filters); static void useFilter(Query query, String[] properties, Object[] values, Map<String, String> fieldTypeMap); static void useFilter(Query query, String[] properties, Object[] values, Map<String, String> fieldTypeMap,
                                 InstanceSecurityRestriction restriction); static void useFilter(Query query, List<Property> properties); static void useFilter(Query query, List<Property> properties,
                                 InstanceSecurityRestriction restriction); static void useFilterFromPattern(Query query, String pattern, List<Property> properties); static String asMatchesPattern(String string); static String asEqualsPattern(String string); static void setCountResult(Query query); }
QueryUtil { public static String asMatchesPattern(String string) { return StringUtils.isNotEmpty(string) ? String.format(".*%s.*", string) : string; } private  QueryUtil(); static void setQueryParams(Query query, QueryParams queryParams); static void useFilters(Query query, Filters filters); static void useFilter(Query query, String[] properties, Object[] values, Map<String, String> fieldTypeMap); static void useFilter(Query query, String[] properties, Object[] values, Map<String, String> fieldTypeMap,
                                 InstanceSecurityRestriction restriction); static void useFilter(Query query, List<Property> properties); static void useFilter(Query query, List<Property> properties,
                                 InstanceSecurityRestriction restriction); static void useFilterFromPattern(Query query, String pattern, List<Property> properties); static String asMatchesPattern(String string); static String asEqualsPattern(String string); static void setCountResult(Query query);  }