@Test(expected = IllegalStateException.class) public void testFieldsUnset() { new CompatSqlModelBuilder().build(); }
public SqlQueryModel build() { if (mQueryType == SqlQueryModel.QUERY_TYPE_RAW) { return new RawQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_MANAGED) { return new SelectQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_UNINITIALISED) { throw new IllegalStateException("You need to set some query parameters before calling build()!"); } else { throw new IllegalStateException("Unknown query type: " + mQueryType); } }
CompatSqlModelBuilder implements SqlRawQueryBuilder, SqlSelectBuilder, QueryModelInfo { public SqlQueryModel build() { if (mQueryType == SqlQueryModel.QUERY_TYPE_RAW) { return new RawQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_MANAGED) { return new SelectQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_UNINITIALISED) { throw new IllegalStateException("You need to set some query parameters before calling build()!"); } else { throw new IllegalStateException("Unknown query type: " + mQueryType); } } }
CompatSqlModelBuilder implements SqlRawQueryBuilder, SqlSelectBuilder, QueryModelInfo { public SqlQueryModel build() { if (mQueryType == SqlQueryModel.QUERY_TYPE_RAW) { return new RawQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_MANAGED) { return new SelectQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_UNINITIALISED) { throw new IllegalStateException("You need to set some query parameters before calling build()!"); } else { throw new IllegalStateException("Unknown query type: " + mQueryType); } }  }
CompatSqlModelBuilder implements SqlRawQueryBuilder, SqlSelectBuilder, QueryModelInfo { public SqlQueryModel build() { if (mQueryType == SqlQueryModel.QUERY_TYPE_RAW) { return new RawQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_MANAGED) { return new SelectQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_UNINITIALISED) { throw new IllegalStateException("You need to set some query parameters before calling build()!"); } else { throw new IllegalStateException("Unknown query type: " + mQueryType); } }  SqlQueryModel build(); String getGroupBy(); String getHaving(); String getLimit(); @Override String getModelComment(); void setModelComment(final String comment); @Override String getModelTag(); void setModelTag(final String tag); @Override int getModelVersion(); void setModelVersion(final int modelVersion); String[] getProjectionIn(); String getRawSql(); String getSelection(); String[] getSelectionArgs(); String getSortOrder(); String getTables(); void setTables(final String inTables); boolean isDistinct(); void setDistinct(final boolean distinct); boolean isStrict(); void setStrict(final boolean value); void setQueryParams(final String rawSql, final String[] selectionArgs); void setQueryParams(final String[] projectionIn, final String selection, final String[] selectionArgs, final String sortOrder); void setQueryParams(final String[] projectionIn, final String selection, final String[] selectionArgs, final String groupBy, final String having, final String sortOrder); void setQueryParams(final String[] projectionIn, final String selection, final String[] selectionArgs, final String groupBy, final String having, final String sortOrder, final String limit); }
CompatSqlModelBuilder implements SqlRawQueryBuilder, SqlSelectBuilder, QueryModelInfo { public SqlQueryModel build() { if (mQueryType == SqlQueryModel.QUERY_TYPE_RAW) { return new RawQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_MANAGED) { return new SelectQueryModel(this); } else if (mQueryType == SqlQueryModel.QUERY_TYPE_UNINITIALISED) { throw new IllegalStateException("You need to set some query parameters before calling build()!"); } else { throw new IllegalStateException("Unknown query type: " + mQueryType); } }  SqlQueryModel build(); String getGroupBy(); String getHaving(); String getLimit(); @Override String getModelComment(); void setModelComment(final String comment); @Override String getModelTag(); void setModelTag(final String tag); @Override int getModelVersion(); void setModelVersion(final int modelVersion); String[] getProjectionIn(); String getRawSql(); String getSelection(); String[] getSelectionArgs(); String getSortOrder(); String getTables(); void setTables(final String inTables); boolean isDistinct(); void setDistinct(final boolean distinct); boolean isStrict(); void setStrict(final boolean value); void setQueryParams(final String rawSql, final String[] selectionArgs); void setQueryParams(final String[] projectionIn, final String selection, final String[] selectionArgs, final String sortOrder); void setQueryParams(final String[] projectionIn, final String selection, final String[] selectionArgs, final String groupBy, final String having, final String sortOrder); void setQueryParams(final String[] projectionIn, final String selection, final String[] selectionArgs, final String groupBy, final String having, final String sortOrder, final String limit);  }