QueryBuilder { public QueryBuilder<Q> limit(int limit) { this.limit = limit; return this; } protected  QueryBuilder(); static QueryBuilder<Query<LinkedHashMap<String, Value>>> builder(); static QueryBuilder<KeywordBean> keywordQueryBuilder(IsoLanguagesMapper mapper, List<String> languages); static QueryBuilder<KeywordBean> keywordQueryBuilder(IsoLanguagesMapper mapper, Collection<String> languages, boolean requireBoundedBy); static QueryBuilder<KeywordBean> keywordQueryBuilder(IsoLanguagesMapper mapper, String... languages); static QueryBuilder<String> languagesQueryBuilder(final IsoLanguagesMapper mapper); @SuppressWarnings("unchecked") Query<Q> build(); QueryBuilder<Q> select(Selector selector, boolean require); QueryBuilder<Q> selectId(); QueryBuilder<Q> limit(int limit); QueryBuilder<Q> distinct(boolean distinct); QueryBuilder<Q> offset(int offset); @SuppressWarnings("unchecked") QueryBuilder<N> interpreter(ResultInterpreter<N> newInterpreter); QueryBuilder<Q> where(String clause); QueryBuilder<Q> where(Where where); @Override String toString();  }
@Test public void limit() throws IOException, MalformedQueryException, QueryEvaluationException, AccessDeniedException { QueryResultsTable results = builder().selectId().limit(2).build().rawExecute(thesaurus); assertEquals(1, results.getColumnCount()); assertEquals(2, results.getRowCount()); }