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 tolimit
hits.abstract R
fetchAll()
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 tolimit
hits.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, wait
Methods inherited from interface org.hibernate.search.engine.search.query.SearchFetchable
fetchHits, fetchTotalHitCount, scroll
Methods inherited from interface org.hibernate.search.engine.search.query.SearchQuery
extension, queryString
Methods inherited from interface org.hibernate.search.engine.search.query.spi.SearchQueryImplementor
failAfter
-
Constructor Details
-
AbstractSearchQuery
public AbstractSearchQuery()
-
-
Method Details
-
toString
-
fetchAll
Description copied from interface:SearchFetchable
Execute 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:
fetchAll
in interfaceSearchFetchable<H>
- Returns:
- The
SearchResult
.
-
fetch
Description copied from interface:SearchFetchable
Execute the query and return theSearchResult
, limiting tolimit
hits.- Specified by:
fetch
in interfaceSearchFetchable<H>
- Parameters:
limit
- The maximum number of hits to be included in theSearchResult
.null
means no limit.- Returns:
- The
SearchResult
.
-
fetch
Description copied from interface:SearchFetchable
- Specified by:
fetch
in interfaceSearchFetchable<H>
- Parameters:
offset
- The number of hits to skip before adding the hits to theSearchResult
.null
means no offset.limit
- The maximum number of hits to be included in theSearchResult
.null
means no limit.- Returns:
- The
SearchResult
.
-
fetchAllHits
Description copied from interface:SearchFetchable
Execute 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:
fetchAllHits
in interfaceSearchFetchable<H>
- Returns:
- The query hits.
-
fetchHits
Description copied from interface:SearchFetchable
Execute the query and return the hits as aList
, limiting tolimit
hits.- Specified by:
fetchHits
in interfaceSearchFetchable<H>
- Parameters:
limit
- The maximum number of hits to be returned by this method.null
means no limit.- Returns:
- The query hits.
-
fetchSingleHit
Description copied from interface:SearchFetchable
Execute the query and return the hits as a single, optional element.- Specified by:
fetchSingleHit
in interfaceSearchFetchable<H>
- Returns:
- The single, optional query hit.
-