H - The type of query hits.R - The result type (extending SearchResult).public abstract class AbstractSearchQuery<H,R extends SearchResult<H>> extends Object implements SearchQuery<H>
SearchQuery.| Constructor and Description |
|---|
AbstractSearchQuery() |
| Modifier and Type | Method and Description |
|---|---|
R |
fetch()
Execute the query and return the
SearchResult. |
R |
fetch(Integer limit)
Execute the query and return the
SearchResult. |
abstract R |
fetch(Integer limit,
Integer offset)
Execute the query and return the
SearchResult. |
List<H> |
fetchHits()
Execute the query and return the hits as a
List. |
List<H> |
fetchHits(Integer limit)
Execute the query and return the hits as a
List. |
List<H> |
fetchHits(Integer limit,
Integer offset)
Execute the query and return the hits as a
List. |
Optional<H> |
fetchSingleHit()
Execute the query and return the hits as a single, optional element.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitextension, getQueryStringfetchTotalHitCountpublic R fetch()
SearchFetchableSearchResult.fetch in interface SearchFetchable<H>SearchResult.public R fetch(Integer limit)
SearchFetchableSearchResult.fetch in interface SearchFetchable<H>limit - The maximum number of hits to be included in the SearchResult. null means no limit.SearchResult.public abstract R fetch(Integer limit, Integer offset)
SearchFetchableSearchResult.fetch in interface SearchFetchable<H>limit - The maximum number of hits to be included in the SearchResult. null means no limit.offset - The number of hits to skip before adding the hits to the SearchResult. null means no offset.SearchResult.public List<H> fetchHits()
SearchFetchableList.fetchHits in interface SearchFetchable<H>public List<H> fetchHits(Integer limit)
SearchFetchableList.fetchHits in interface SearchFetchable<H>limit - The maximum number of hits to be returned by this method. null means no limit.public List<H> fetchHits(Integer limit, Integer offset)
SearchFetchableList.fetchHits in interface SearchFetchable<H>limit - The maximum number of hits to be returned by this method. null means no limit.offset - The number of hits to skip. null means no offset.public Optional<H> fetchSingleHit()
SearchFetchablefetchSingleHit in interface SearchFetchable<H>Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.