T - projection typeQ - concrete subtype of querypublic abstract class AbstractLuceneQuery<T,Q extends AbstractLuceneQuery<T,Q>> extends Object implements SimpleQuery<Q>, SimpleProjectable<T>
| Constructor and Description | 
|---|
| AbstractLuceneQuery(org.apache.lucene.search.IndexSearcher searcher,
                   com.google.common.base.Function<org.apache.lucene.document.Document,T> transformer) | 
| AbstractLuceneQuery(LuceneSerializer serializer,
                   org.apache.lucene.search.IndexSearcher searcher,
                   com.google.common.base.Function<org.apache.lucene.document.Document,T> transformer) | 
| Modifier and Type | Method and Description | 
|---|---|
| org.apache.lucene.search.Filter | asFilter()Create a filter for constraints defined in this query | 
| long | count()Get the count of matched elements | 
| protected org.apache.lucene.search.Query | createQuery() | 
| Q | distinct()Set the Query to return distinct results | 
| Q | distinct(Path<?> property)Add a DuplicateFilter for the field of the given property path | 
| boolean | exists() | 
| Q | filter(org.apache.lucene.search.Filter filter)Apply the given Lucene filter to the search results | 
| com.mysema.commons.lang.CloseableIterator<T> | iterate()Get the projection as a typed closeable Iterator | 
| Q | limit(long limit)Set the limit / max results for the query results | 
| List<T> | list()Get the projection as a typed List | 
| SearchResults<T> | listResults()Get the projection in  SearchResultsform | 
| Q | load(FieldSelector fieldSelector)Set the given FieldSelector to the query | 
| Q | load(Path<?>... paths)Load only the fields of the given paths | 
| boolean | notExists() | 
| Q | offset(long offset)Set the offset for the query results | 
| Q | orderBy(OrderSpecifier<?>... o)Add order expressions | 
| Q | orderBy(OrderSpecifier<?> o) | 
| Q | restrict(QueryModifiers modifiers)Set both limit and offset of the query results | 
| <P> Q | set(ParamExpression<P> param,
   P value)Set the given parameter to the given value | 
| T | singleResult()Get the projection as a single result or null if no result is found | 
| Q | sort(org.apache.lucene.search.Sort sort) | 
| String | toString() | 
| T | uniqueResult()Get the projection as a unique result or null if no result is found | 
| Q | where(Predicate... e)Adds the given filter conditions | 
| Q | where(Predicate e) | 
public AbstractLuceneQuery(LuceneSerializer serializer, org.apache.lucene.search.IndexSearcher searcher, com.google.common.base.Function<org.apache.lucene.document.Document,T> transformer)
public AbstractLuceneQuery(org.apache.lucene.search.IndexSearcher searcher,
                           com.google.common.base.Function<org.apache.lucene.document.Document,T> transformer)
public boolean exists()
exists in interface SimpleProjectable<T>public boolean notExists()
notExists in interface SimpleProjectable<T>public long count()
SimpleProjectablecount in interface SimpleProjectable<T>protected org.apache.lucene.search.Query createQuery()
public org.apache.lucene.search.Filter asFilter()
public Q distinct()
SimpleQuerydistinct in interface SimpleQuery<Q extends AbstractLuceneQuery<T,Q>>public Q distinct(Path<?> property)
property - public Q filter(org.apache.lucene.search.Filter filter)
filter - public Q limit(long limit)
SimpleQuerylimit in interface SimpleQuery<Q extends AbstractLuceneQuery<T,Q>>public com.mysema.commons.lang.CloseableIterator<T> iterate()
SimpleProjectableiterate in interface SimpleProjectable<T>public List<T> list()
SimpleProjectablelist in interface SimpleProjectable<T>public Q load(FieldSelector fieldSelector)
fieldSelector - public Q load(Path<?>... paths)
paths - public SearchResults<T> listResults()
SimpleProjectableSearchResults formlistResults in interface SimpleProjectable<T>public Q offset(long offset)
SimpleQueryoffset in interface SimpleQuery<Q extends AbstractLuceneQuery<T,Q>>public Q orderBy(OrderSpecifier<?> o)
public Q orderBy(OrderSpecifier<?>... o)
SimpleQueryorderBy in interface SimpleQuery<Q extends AbstractLuceneQuery<T,Q>>public Q restrict(QueryModifiers modifiers)
SimpleQueryrestrict in interface SimpleQuery<Q extends AbstractLuceneQuery<T,Q>>public <P> Q set(ParamExpression<P> param, P value)
SimpleQueryset in interface SimpleQuery<Q extends AbstractLuceneQuery<T,Q>>public Q sort(org.apache.lucene.search.Sort sort)
public T singleResult()
SimpleProjectablefor multiple results only the first one is returned
singleResult in interface SimpleProjectable<T>public T uniqueResult()
SimpleProjectableuniqueResult in interface SimpleProjectable<T>public Q where(Predicate... e)
FilteredClauseSkips null arguments
where in interface FilteredClause<Q extends AbstractLuceneQuery<T,Q>>e - filter conditions to be addedCopyright © 2007–2015 Querydsl. All rights reserved.