|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.query.impl.CacheQueryImpl
public class CacheQueryImpl
Implementation class of the CacheQuery interface.
Field Summary | |
---|---|
protected AdvancedCache<?,?> |
cache
|
protected org.hibernate.search.query.engine.spi.HSQuery |
hSearchQuery
|
protected KeyTransformationHandler |
keyTransformationHandler
|
Constructor Summary | |
---|---|
CacheQueryImpl(org.apache.lucene.search.Query luceneQuery,
org.hibernate.search.spi.SearchFactoryIntegrator searchFactory,
AdvancedCache<?,?> cache,
KeyTransformationHandler keyTransformationHandler,
Class<?>... classes)
|
Method Summary | |
---|---|
CacheQuery |
disableFullTextFilter(String name)
Disable a given filter by its name. |
org.hibernate.search.FullTextFilter |
enableFullTextFilter(String name)
Enable a given filter by its name. |
org.apache.lucene.search.Explanation |
explain(int documentId)
Return the Lucene Explanation
object describing the score computation for the matching object/document
in the current query |
CacheQuery |
filter(org.apache.lucene.search.Filter filter)
Takes in a lucene filter and sets it to the filter field in the class. |
CacheQuery |
firstResult(int firstResult)
Sets the the result of the given integer value to the first result. |
org.hibernate.search.query.engine.spi.FacetManager |
getFacetManager()
|
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. |
CacheQuery |
maxResults(int maxResults)
Sets the maximum number of results to the number passed in as a parameter. |
CacheQuery |
projection(String... fields)
Defines the Lucene field names projected and returned in a query result Each field is converted back to it's object representation, an Object[] being returned for each "row" A projectable field must be stored in the Lucene index and use a org.hibernate.search.bridge.TwoWayFieldBridge
Unless notified in their JavaDoc, all built-in bridges are two-way. |
CacheQuery |
sort(org.apache.lucene.search.Sort sort)
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 |
---|
protected final AdvancedCache<?,?> cache
protected final KeyTransformationHandler keyTransformationHandler
protected org.hibernate.search.query.engine.spi.HSQuery hSearchQuery
Constructor Detail |
---|
public CacheQueryImpl(org.apache.lucene.search.Query luceneQuery, org.hibernate.search.spi.SearchFactoryIntegrator searchFactory, AdvancedCache<?,?> cache, KeyTransformationHandler keyTransformationHandler, Class<?>... classes)
Method Detail |
---|
public CacheQuery filter(org.apache.lucene.search.Filter filter)
filter
in interface CacheQuery
filter
- - lucene filterpublic int getResultSize()
CacheQuery
getResultSize
in interface CacheQuery
public CacheQuery sort(org.apache.lucene.search.Sort sort)
CacheQuery
sort
in interface CacheQuery
sort
- - lucene sort objectpublic org.hibernate.search.FullTextFilter enableFullTextFilter(String name)
enableFullTextFilter
in interface CacheQuery
name
- of filter.
public CacheQuery disableFullTextFilter(String name)
disableFullTextFilter
in interface CacheQuery
name
- of filter.public CacheQuery firstResult(int firstResult)
firstResult
in interface CacheQuery
firstResult
- index to be set.
IllegalArgumentException
- if the index given is less than zero.public CacheQuery maxResults(int maxResults)
CacheQuery
maxResults
in interface CacheQuery
maxResults
- that are to be set to the maxResults.public QueryIterator iterator() throws org.hibernate.search.SearchException
CacheQuery
QueryIterator
. This calls CacheQuery.iterator(int fetchSize)
but uses a default fetchSize of 1.
iterator
in interface Iterable<Object>
iterator
in interface CacheQuery
org.hibernate.search.SearchException
public QueryIterator iterator(int fetchSize) throws org.hibernate.search.SearchException
CacheQuery
QueryIterator
with a given integer parameter - the fetchSize.
iterator
in interface CacheQuery
fetchSize
- integer to be given to the implementation constructor.
org.hibernate.search.SearchException
public QueryIterator lazyIterator()
CacheQuery
CacheQuery.lazyIterator(int fetchSize)
method but passes in a default 1 as a parameter.
lazyIterator
in interface CacheQuery
public QueryIterator lazyIterator(int fetchSize)
CacheQuery
QueryIterator
with a given integer parameter - the
fetchSize.
lazyIterator
in interface CacheQuery
fetchSize
- integer to be passed into the lazy implementation of QueryIterator
public List<Object> list() throws org.hibernate.search.SearchException
CacheQuery
list
in interface CacheQuery
org.hibernate.search.SearchException
public org.hibernate.search.query.engine.spi.FacetManager getFacetManager()
getFacetManager
in interface CacheQuery
public org.apache.lucene.search.Explanation explain(int documentId)
CacheQuery
Explanation
object describing the score computation for the matching object/document
in the current query
explain
in interface CacheQuery
documentId
- Lucene Document id to be explain. This is NOT the object key
public CacheQuery projection(String... fields)
CacheQuery
org.hibernate.search.bridge.TwoWayFieldBridge
Unless notified in their JavaDoc, all built-in bridges are two-way. All @DocumentId fields are projectable by design.
If the projected field is not a projectable field, null is returned in the object[]
projection
in interface CacheQuery
fields
- the projected field names
this
to allow for method chaining
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |