@Test public void testSimpleQuery() { SqlBuilder builder = new SqlBuilder("table"); Assert.assertEquals("wrong query", "select * from table", builder.getSqlString()); }
public String getSqlString() { return command + (command.equals(DELETE) ? "" : selection) + FROM + tableName + getWhereClauseString() + getQuerySuffixString(); }
SqlBuilder { public String getSqlString() { return command + (command.equals(DELETE) ? "" : selection) + FROM + tableName + getWhereClauseString() + getQuerySuffixString(); } }
SqlBuilder { public String getSqlString() { return command + (command.equals(DELETE) ? "" : selection) + FROM + tableName + getWhereClauseString() + getQuerySuffixString(); } SqlBuilder(String tableName);  SqlBuilder(String tableName, String command); }
SqlBuilder { public String getSqlString() { return command + (command.equals(DELETE) ? "" : selection) + FROM + tableName + getWhereClauseString() + getQuerySuffixString(); } SqlBuilder(String tableName);  SqlBuilder(String tableName, String command); static String getSortOrderString(SqlQueryOrder.SortOrder sortOrder); SqlBuilder addCaseInsensitiveLikeCondition(String fieldName, String fieldValue); SqlBuilder addInCondition(String fieldName, Collection<String> values); SqlBuilder addMultipleOrConditionOfKeyValuePairs(
            String keyColumnName,
            String valueColumnName,
            Map<String, String> keyValuePairs); SqlBuilder addCondition(String condition); SqlBuilder addQueryParam(Object param); SqlBuilder addQueryParams(Collection<Object> params); String getSqlString(); SqlBuilder setSelection(String selection); SqlBuilder addQuerySuffix(String querySuffix); SqlBuilder addQuerySuffixWithParam(String suffix, Object param); @NoJavadoc // TODO add JavaDoc SqlBuilder addOrderByClause(SqlQueryOrder sqlQueryOrder); List<Object> getQueryParams(); @Override String toString(); String build(); }
SqlBuilder { public String getSqlString() { return command + (command.equals(DELETE) ? "" : selection) + FROM + tableName + getWhereClauseString() + getQuerySuffixString(); } SqlBuilder(String tableName);  SqlBuilder(String tableName, String command); static String getSortOrderString(SqlQueryOrder.SortOrder sortOrder); SqlBuilder addCaseInsensitiveLikeCondition(String fieldName, String fieldValue); SqlBuilder addInCondition(String fieldName, Collection<String> values); SqlBuilder addMultipleOrConditionOfKeyValuePairs(
            String keyColumnName,
            String valueColumnName,
            Map<String, String> keyValuePairs); SqlBuilder addCondition(String condition); SqlBuilder addQueryParam(Object param); SqlBuilder addQueryParams(Collection<Object> params); String getSqlString(); SqlBuilder setSelection(String selection); SqlBuilder addQuerySuffix(String querySuffix); SqlBuilder addQuerySuffixWithParam(String suffix, Object param); @NoJavadoc // TODO add JavaDoc SqlBuilder addOrderByClause(SqlQueryOrder sqlQueryOrder); List<Object> getQueryParams(); @Override String toString(); String build(); static final int MAX_ITEMS_FOR_IN_CLAUSE; static final String SELECT; static final String DELETE; }