SelectBuilder extends AbstractQueryBuilder<SelectBuilder> implements DatasetClause<SelectBuilder>,
		WhereClause<SelectBuilder>, SolutionModifierClause<SelectBuilder>, SelectClause<SelectBuilder> { public SelectBuilder setDistinct(boolean state) { getSelectHandler().setDistinct(state); return this; } SelectBuilder(); @Override DatasetHandler getDatasetHandler(); @Override HandlerBlock getHandlerBlock(); @Override SelectBuilder clone(); SelectBuilder setDistinct(boolean state); SelectBuilder setReduced(boolean state); @Override SelectBuilder addVar(Object var); @Override SelectBuilder addVar(String expression, Object var); @Override SelectBuilder addVar(Expr expr, Object var); @Override List<Var> getVars(); @Override SelectBuilder fromNamed(String graphName); @Override SelectBuilder fromNamed(Collection<String> graphNames); @Override SelectBuilder from(String graphName); @Override SelectBuilder from(Collection<String> graphName); @Override SelectBuilder addOrderBy(Expr orderBy); @Override SelectBuilder addOrderBy(Object orderBy); @Override SelectBuilder addOrderBy(SortCondition orderBy); @Override SelectBuilder addOrderBy(Expr orderBy, Order order); @Override SelectBuilder addOrderBy(Object orderBy, Order order); @Override SelectBuilder addGroupBy(Object groupBy); @Override SelectBuilder addGroupBy(Expr groupBy); @Override SelectBuilder addGroupBy(Object var, Expr expr); @Override SelectBuilder addGroupBy(Object var, String expr); @Override SolutionModifierHandler getSolutionModifierHandler(); @Override SelectBuilder addHaving(String having); @Override SelectBuilder addHaving(Expr expression); @Override SelectBuilder addHaving(Object var); @Override SelectBuilder setLimit(int limit); @Override SelectBuilder setOffset(int offset); static String makeString(Object o); @Override SelectBuilder addWhere(TriplePath t ); @Override SelectBuilder addWhere(Triple t); @Override SelectBuilder addWhere(FrontsTriple t); @Override SelectBuilder addWhere(Object s, Object p, Object o); @Override SelectBuilder addWhereValueVar(Object var); @Override SelectBuilder addWhereValueVar(Object var, Object... values); @Override SelectBuilder addWhereValueVars(Map<?,K> dataTable); @Override SelectBuilder addWhereValueRow(Object... values); @Override SelectBuilder addWhereValueRow(Collection<?> values); @Override List<Var> getWhereValuesVars(); @Override Map<Var, List<Node>> getWhereValuesMap(); @Override SelectBuilder clearWhereValues(); @Override SelectBuilder addOptional(TriplePath t); @Override SelectBuilder addOptional(Triple t); @Override SelectBuilder addOptional(FrontsTriple t); @Override SelectBuilder addOptional(Object s, Object p, Object o); @Override SelectBuilder addOptional(AbstractQueryBuilder<?> t); @Override SelectBuilder addFilter(Expr expr); @Override SelectBuilder addFilter(String s); @Override SelectBuilder addSubQuery(AbstractQueryBuilder<?> subQuery); @Override SelectBuilder addUnion(AbstractQueryBuilder<?> subQuery); @Override SelectBuilder addGraph(Object graph, AbstractQueryBuilder<?> subQuery); @Override SelectBuilder addGraph(Object graph, FrontsTriple triple); @Override SelectBuilder addGraph(Object graph, Object subject, Object predicate, Object object); @Override SelectBuilder addGraph(Object graph, Triple triple); @Override SelectBuilder addGraph(Object graph, TriplePath triplePath); @Override SelectBuilder addBind(Expr expression, Object var); @Override SelectBuilder addBind(String expression, Object var); @Override SelectHandler getSelectHandler(); @Override Node list(Object... objs); @Override SelectBuilder addMinus( AbstractQueryBuilder<?> t );  }
@Test public void setDistinctTest() throws Exception { Query query = builder.query; assertFalse(query.isDistinct()); assertFalse(query.isReduced()); query = builder.setDistinct(true).query; assertTrue(query.isDistinct()); assertFalse(query.isReduced()); query = builder.setReduced(false).query; assertTrue(query.isDistinct()); assertFalse(query.isReduced()); query = builder.setReduced(true).query; assertFalse(query.isDistinct()); assertTrue(query.isReduced()); query = builder.setDistinct(true).query; assertTrue(query.isDistinct()); assertFalse(query.isReduced()); query = builder.setDistinct(false).query; assertFalse(query.isDistinct()); assertFalse(query.isReduced()); }