public class ClusteredCacheQueryImpl extends CacheQueryImpl
cache, hSearchQuery, keyTransformationHandler| Constructor and Description |
|---|
ClusteredCacheQueryImpl(org.apache.lucene.search.Query luceneQuery,
org.hibernate.search.spi.SearchFactoryIntegrator searchFactory,
ExecutorService asyncExecutor,
AdvancedCache<?,?> cache,
KeyTransformationHandler keyTransformationHandler,
Class<?>... classes) |
| Modifier and Type | Method and Description |
|---|---|
CacheQuery |
firstResult(int firstResult)
Sets the the result of the given integer value to the first result.
|
int |
getResultSize()
Gets the total number of results matching the query, ignoring pagination (firstResult, maxResult).
|
ResultIterator |
iterator(FetchOptions fetchOptions)
Returns the results of a search as a
ResultIterator. |
List<Object> |
list()
Returns the results of a search as a list.
|
CacheQuery |
maxResults(int maxResults)
Sets the maximum number of results to the number passed in as a parameter.
|
CacheQuery |
sort(org.apache.lucene.search.Sort sort)
Allows lucene to sort the results.
|
CacheQuery |
timeout(long timeout,
TimeUnit timeUnit)
Set the timeout for this query.
|
disableFullTextFilter, enableFullTextFilter, explain, filter, getFacetManager, iterator, projectionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ClusteredCacheQueryImpl(org.apache.lucene.search.Query luceneQuery,
org.hibernate.search.spi.SearchFactoryIntegrator searchFactory,
ExecutorService asyncExecutor,
AdvancedCache<?,?> cache,
KeyTransformationHandler keyTransformationHandler,
Class<?>... classes)
public CacheQuery maxResults(int maxResults)
CacheQuerymaxResults in interface CacheQuerymaxResults in class CacheQueryImplmaxResults - that are to be set to the maxResults.public CacheQuery firstResult(int firstResult)
CacheQueryImplfirstResult in interface CacheQueryfirstResult in class CacheQueryImplfirstResult - index to be set.public CacheQuery sort(org.apache.lucene.search.Sort sort)
CacheQuerysort in interface CacheQuerysort in class CacheQueryImplsort - - lucene sort objectpublic int getResultSize()
CacheQuerygetResultSize in interface CacheQuerygetResultSize in class CacheQueryImplpublic ResultIterator iterator(FetchOptions fetchOptions) throws org.hibernate.search.SearchException
CacheQueryResultIterator.
Warning: the return type is an extension of Iterator which introduces a ResultIterator.close()
method. This close method needs to be invoked when the iteration is complete to avoid resource leakage.iterator in interface CacheQueryiterator in class CacheQueryImplfetchOptions - how to fetch results (see @link FetchOptions)org.hibernate.search.SearchExceptionpublic List<Object> list() throws org.hibernate.search.SearchException
CacheQuerylist in interface CacheQuerylist in class CacheQueryImplorg.hibernate.search.SearchExceptionpublic CacheQuery timeout(long timeout, TimeUnit timeUnit)
CacheQuerytimeout in interface CacheQuerytimeout in class CacheQueryImpltimeout - the timeout durationtimeUnit - the time unit of the timeout parameterCopyright © 2014 JBoss, a division of Red Hat. All rights reserved.