@Test public void testSelect_null() { QueryBuilder<Object> builder = new QueryBuilder<Object>(); thrown.expect(NullPointerException.class); thrown.expectMessage(Matchers.equalTo("SELECT clause cannot be null")); builder.select(null); }
@Override public QueryBuilder<V> select(String columns) { Preconditions.checkNotNull(columns, "SELECT clause cannot be null"); columns = removeKeyword(columns, SELECT); this.select = columns; return this; }
QueryBuilder implements QueryBuilderInterface<V> { @Override public QueryBuilder<V> select(String columns) { Preconditions.checkNotNull(columns, "SELECT clause cannot be null"); columns = removeKeyword(columns, SELECT); this.select = columns; return this; } }
QueryBuilder implements QueryBuilderInterface<V> { @Override public QueryBuilder<V> select(String columns) { Preconditions.checkNotNull(columns, "SELECT clause cannot be null"); columns = removeKeyword(columns, SELECT); this.select = columns; return this; } QueryBuilder(); }
QueryBuilder implements QueryBuilderInterface<V> { @Override public QueryBuilder<V> select(String columns) { Preconditions.checkNotNull(columns, "SELECT clause cannot be null"); columns = removeKeyword(columns, SELECT); this.select = columns; return this; } QueryBuilder(); @Override QueryBuilder<V> select(String columns); @Override QueryBuilder<V> from(String table); @Override QueryBuilder<V> where(String conditions); @Override QueryBuilder<V> limit(Integer count); @Override QueryBuilder<V> offset(Integer count); @Override QueryBuilder<V> increaseOffsetBy(Integer amount); @Override Integer getOffset(); @Override QueryBuilder<V> removeLimitAndOffset(); @Override QueryBuilder<V> orderBy(String orderBy); @Override QueryBuilder<V> withBindVariableValue(String key, V value); QueryBuilder<V> withBindVariableValues(Map<String, V> values); @Override Map<String, V> getBindVariableMap(); @Override String buildQuery(); }
QueryBuilder implements QueryBuilderInterface<V> { @Override public QueryBuilder<V> select(String columns) { Preconditions.checkNotNull(columns, "SELECT clause cannot be null"); columns = removeKeyword(columns, SELECT); this.select = columns; return this; } QueryBuilder(); @Override QueryBuilder<V> select(String columns); @Override QueryBuilder<V> from(String table); @Override QueryBuilder<V> where(String conditions); @Override QueryBuilder<V> limit(Integer count); @Override QueryBuilder<V> offset(Integer count); @Override QueryBuilder<V> increaseOffsetBy(Integer amount); @Override Integer getOffset(); @Override QueryBuilder<V> removeLimitAndOffset(); @Override QueryBuilder<V> orderBy(String orderBy); @Override QueryBuilder<V> withBindVariableValue(String key, V value); QueryBuilder<V> withBindVariableValues(Map<String, V> values); @Override Map<String, V> getBindVariableMap(); @Override String buildQuery();  }