H - The type of query hits.public interface SearchFetchable<H>
| Modifier and Type | Method and Description |
|---|---|
SearchResult<H> |
fetch(Integer limit)
Execute the query and return the
SearchResult,
limiting to limit hits. |
SearchResult<H> |
fetch(Integer offset,
Integer limit)
|
SearchResult<H> |
fetchAll()
Execute the query and return the
SearchResult,
including all hits, without any sort of limit. |
List<H> |
fetchAllHits()
Execute the query and return all hits as a
List,
without any sort of limit. |
List<H> |
fetchHits(Integer limit)
Execute the query and return the hits as a
List,
limiting to limit hits. |
List<H> |
fetchHits(Integer offset,
Integer limit)
|
Optional<H> |
fetchSingleHit()
Execute the query and return the hits as a single, optional element.
|
long |
fetchTotalHitCount()
Execute the query and return the total hit count.
|
SearchResult<H> fetch(Integer limit)
SearchResult,
limiting to limit hits.limit - The maximum number of hits to be included in the SearchResult. null means no limit.SearchResult.SearchException - If something goes wrong while executing the query.SearchTimeoutException - If a
failure timeout was set
and was reached while executing the query.RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper,
e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.SearchResult<H> fetch(Integer offset, Integer limit)
offset - The number of hits to skip before adding the hits to the SearchResult. null means no offset.limit - The maximum number of hits to be included in the SearchResult. null means no limit.SearchResult.SearchException - If something goes wrong while executing the query.SearchTimeoutException - If a
failure timeout was set
and was reached while executing the query.RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper,
e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.List<H> fetchHits(Integer limit)
List,
limiting to limit hits.limit - The maximum number of hits to be returned by this method. null means no limit.SearchException - If something goes wrong while executing the query.SearchTimeoutException - If a
failure timeout was set
and was reached while executing the query.RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper,
e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.List<H> fetchHits(Integer offset, Integer limit)
offset - The number of hits to skip. null means no offset.limit - The maximum number of hits to be returned by this method. null means no limit.SearchException - If something goes wrong while executing the query.SearchTimeoutException - If a
failure timeout was set
and was reached while executing the query.RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper,
e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.Optional<H> fetchSingleHit()
SearchException - If something goes wrong while executing the query,
or the number of hits is more than one.SearchTimeoutException - If a
failure timeout was set
and was reached while executing the query.RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper,
e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.long fetchTotalHitCount()
SearchException - If something goes wrong while executing the query.SearchTimeoutException - If a
failure timeout was set
and was reached while executing the query.SearchResult<H> fetchAll()
SearchResult,
including all hits, without any sort of limit.
fetch(Integer) or fetch(Integer, Integer) should generally be preferred, for performance reasons.
SearchResult.SearchException - If something goes wrong while executing the query.SearchTimeoutException - If a
failure timeout was set
and was reached while executing the query.RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper,
e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.List<H> fetchAllHits()
List,
without any sort of limit.
fetchHits(Integer) or fetchHits(Integer, Integer) should generally be preferred,
for performance reasons.
SearchException - If something goes wrong while executing the query.SearchTimeoutException - If a
failure timeout was set
and was reached while executing the query.RuntimeException - If something goes wrong while loading entities. The exact type depends on the mapper,
e.g. HibernateException/PersistenceException for the Hibernate ORM mapper.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.