@Test public void testBuildPredicate_SingleProperty() { assertThat(QueryUtils.buildPredicate("foo"), is("foo = ?")); }
public static String buildPredicate(String... properties) { checkArgument(properties.length > 0, "At least one property is required"); StringBuilder builder = new StringBuilder(128); for (String property : properties) { if (builder.length() > 0) { builder.append(" AND "); } builder.append(property).append(" = ?"); } return builder.toString(); }
QueryUtils { public static String buildPredicate(String... properties) { checkArgument(properties.length > 0, "At least one property is required"); StringBuilder builder = new StringBuilder(128); for (String property : properties) { if (builder.length() > 0) { builder.append(" AND "); } builder.append(property).append(" = ?"); } return builder.toString(); } }
QueryUtils { public static String buildPredicate(String... properties) { checkArgument(properties.length > 0, "At least one property is required"); StringBuilder builder = new StringBuilder(128); for (String property : properties) { if (builder.length() > 0) { builder.append(" AND "); } builder.append(property).append(" = ?"); } return builder.toString(); } private  QueryUtils(); }
QueryUtils { public static String buildPredicate(String... properties) { checkArgument(properties.length > 0, "At least one property is required"); StringBuilder builder = new StringBuilder(128); for (String property : properties) { if (builder.length() > 0) { builder.append(" AND "); } builder.append(property).append(" = ?"); } return builder.toString(); } private  QueryUtils(); static String buildPredicate(String... properties); static String buildIn(final Set<?> values); }
QueryUtils { public static String buildPredicate(String... properties) { checkArgument(properties.length > 0, "At least one property is required"); StringBuilder builder = new StringBuilder(128); for (String property : properties) { if (builder.length() > 0) { builder.append(" AND "); } builder.append(property).append(" = ?"); } return builder.toString(); } private  QueryUtils(); static String buildPredicate(String... properties); static String buildIn(final Set<?> values);  }