Class AbstractSearchQuery<H,R extends SearchResult<H>>
java.lang.Object
org.hibernate.search.engine.search.query.spi.AbstractSearchQuery<H,R>
- Type Parameters:
H- The type of query hits.R- The result type (extendingSearchResult).
- All Implemented Interfaces:
SearchFetchable<H>,SearchQuery<H>,SearchQueryImplementor<H>
public abstract class AbstractSearchQuery<H,R extends SearchResult<H>>
extends Object
implements SearchQueryImplementor<H>
An abstract base for implementations of
SearchQuery.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecute the query and return theSearchResult, limiting tolimithits.abstract RfetchAll()Execute the query and return theSearchResult, including all hits, without any sort of limit.Execute the query and return all hits as aList, without any sort of limit.Execute the query and return the hits as aList, limiting tolimithits.Execute the query and return the hits as a single, optional element.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.search.query.SearchFetchable
fetchHits, fetchTotalHitCount, scrollMethods inherited from interface org.hibernate.search.engine.search.query.SearchQuery
extension, queryStringMethods inherited from interface org.hibernate.search.engine.search.query.spi.SearchQueryImplementor
failAfter, failAfter
-
Constructor Details
-
AbstractSearchQuery
public AbstractSearchQuery()
-
-
Method Details
-
toString
-
fetchAll
Description copied from interface:SearchFetchableExecute the query and return theSearchResult, including all hits, without any sort of limit.SearchFetchable.fetch(Integer)orSearchFetchable.fetch(Integer, Integer)should generally be preferred, for performance reasons.- Specified by:
fetchAllin interfaceSearchFetchable<H>- Returns:
- The
SearchResult.
-
fetch
Description copied from interface:SearchFetchableExecute the query and return theSearchResult, limiting tolimithits.- Specified by:
fetchin interfaceSearchFetchable<H>- Parameters:
limit- The maximum number of hits to be included in theSearchResult.nullmeans no limit.- Returns:
- The
SearchResult.
-
fetch
Description copied from interface:SearchFetchable- Specified by:
fetchin interfaceSearchFetchable<H>- Parameters:
offset- The number of hits to skip before adding the hits to theSearchResult.nullmeans no offset.limit- The maximum number of hits to be included in theSearchResult.nullmeans no limit.- Returns:
- The
SearchResult.
-
fetchAllHits
Description copied from interface:SearchFetchableExecute the query and return all hits as aList, without any sort of limit.SearchFetchable.fetchHits(Integer)orSearchFetchable.fetchHits(Integer, Integer)should generally be preferred, for performance reasons.- Specified by:
fetchAllHitsin interfaceSearchFetchable<H>- Returns:
- The query hits.
-
fetchHits
Description copied from interface:SearchFetchableExecute the query and return the hits as aList, limiting tolimithits.- Specified by:
fetchHitsin interfaceSearchFetchable<H>- Parameters:
limit- The maximum number of hits to be returned by this method.nullmeans no limit.- Returns:
- The query hits.
-
fetchSingleHit
Description copied from interface:SearchFetchableExecute the query and return the hits as a single, optional element.- Specified by:
fetchSingleHitin interfaceSearchFetchable<H>- Returns:
- The single, optional query hit.
-