|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.query.impl.CacheQueryImpl
public class CacheQueryImpl
Implementation class of the CacheQuery interface.
| Field Summary | |
|---|---|
Log |
log
|
| Constructor Summary | |
|---|---|
CacheQueryImpl(org.apache.lucene.search.Query luceneQuery,
org.hibernate.search.engine.SearchFactoryImplementor searchFactory,
Cache cache,
Class... classes)
|
|
| Method Summary | |
|---|---|
void |
disableFullTextFilter(String name)
Disable a given filter by its name. |
org.hibernate.search.FullTextFilter |
enableFullTextFilter(String name)
Enable a given filter by its name. |
int |
getResultSize()
Gets the integer number of results. |
QueryIterator |
iterator()
Returns the results of a search as a QueryIterator. |
QueryIterator |
iterator(int fetchSize)
Returns the results of a search as a QueryIterator with a given integer parameter - the fetchSize. |
QueryIterator |
lazyIterator()
Calls the CacheQuery.lazyIterator(int fetchSize) method but passes in a default 1 as a parameter. |
QueryIterator |
lazyIterator(int fetchSize)
Lazily loads the results from the Query as a QueryIterator with a given integer parameter - the
fetchSize. |
List<Object> |
list()
Returns the results of a search as a list. |
void |
setFilter(org.apache.lucene.search.Filter f)
Takes in a lucene filter and sets it to the filter field in the class. |
void |
setFirstResult(int firstResult)
Sets the the result of the given integer value to the first result. |
void |
setMaxResults(int maxResults)
Sets the maximum number of results to the number passed in as a parameter. |
void |
setSort(org.apache.lucene.search.Sort s)
Allows lucene to sort the results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Log log
| Constructor Detail |
|---|
public CacheQueryImpl(org.apache.lucene.search.Query luceneQuery,
org.hibernate.search.engine.SearchFactoryImplementor searchFactory,
Cache cache,
Class... classes)
| Method Detail |
|---|
public void setFilter(org.apache.lucene.search.Filter f)
setFilter in interface CacheQueryf - - lucene filterpublic int getResultSize()
CacheQuery
getResultSize in interface CacheQuerypublic void setSort(org.apache.lucene.search.Sort s)
CacheQuery
setSort in interface CacheQuerys - - lucene sort objectpublic org.hibernate.search.FullTextFilter enableFullTextFilter(String name)
enableFullTextFilter in interface CacheQueryname - of filter.
public void disableFullTextFilter(String name)
disableFullTextFilter in interface CacheQueryname - of filter.public void setFirstResult(int firstResult)
setFirstResult in interface CacheQueryfirstResult - index to be set.
IllegalArgumentException - if the index given is less than zero.
public QueryIterator iterator()
throws org.hibernate.search.SearchException
CacheQueryQueryIterator. This calls CacheQuery.iterator(int fetchSize)
but uses a default fetchSize of 1.
iterator in interface Iterableiterator in interface CacheQueryorg.hibernate.search.SearchException
public QueryIterator iterator(int fetchSize)
throws org.hibernate.search.SearchException
CacheQueryQueryIterator with a given integer parameter - the fetchSize.
iterator in interface CacheQueryfetchSize - integer to be given to the implementation constructor.
org.hibernate.search.SearchExceptionpublic QueryIterator lazyIterator()
CacheQueryCacheQuery.lazyIterator(int fetchSize) method but passes in a default 1 as a parameter.
lazyIterator in interface CacheQuerypublic QueryIterator lazyIterator(int fetchSize)
CacheQueryQueryIterator with a given integer parameter - the
fetchSize.
lazyIterator in interface CacheQueryfetchSize - integer to be passed into the lazy implementation of QueryIterator
public List<Object> list()
throws org.hibernate.search.SearchException
CacheQuery
list in interface CacheQueryorg.hibernate.search.SearchExceptionpublic void setMaxResults(int maxResults)
CacheQuery
setMaxResults in interface CacheQuerymaxResults - that are to be set to the maxResults.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||