T - result typeQ - concrete subtypepublic abstract class AbstractSearchQuery<T,Q extends AbstractSearchQuery<T,Q>> extends Object implements SimpleQuery<Q>, Fetchable<T>
| Constructor and Description |
|---|
AbstractSearchQuery(org.hibernate.search.FullTextSession session,
EntityPath<T> path) |
AbstractSearchQuery(org.hibernate.Session session,
EntityPath<T> path) |
| Modifier and Type | Method and Description |
|---|---|
Q |
distinct()
Set the Query to return distinct results
|
List<T> |
fetch()
Get the projection as a typed List
|
long |
fetchCount()
Get the count of matched elements
|
T |
fetchFirst()
Get the first result of Get the projection or null if no result is found
|
T |
fetchOne()
Get the projection as a unique result or null if no result is found
|
QueryResults<T> |
fetchResults()
Get the projection in
QueryResults form |
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
|
Q |
offset(long offset)
Set the offset for the query results
|
Q |
orderBy(OrderSpecifier<?>... o)
Add order expressions
|
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
|
Q |
where(Predicate... e)
Adds the given filter conditions
|
public AbstractSearchQuery(org.hibernate.search.FullTextSession session,
EntityPath<T> path)
public AbstractSearchQuery(org.hibernate.Session session,
EntityPath<T> path)
public long fetchCount()
FetchablefetchCount in interface Fetchable<T>public Q distinct()
SimpleQuerydistinct in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>public com.mysema.commons.lang.CloseableIterator<T> iterate()
Fetchablepublic Q limit(long limit)
SimpleQuerylimit in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>limit - max rowspublic List<T> fetch()
Fetchablepublic QueryResults<T> fetchResults()
FetchableQueryResults formfetchResults in interface Fetchable<T>public Q offset(long offset)
SimpleQueryoffset in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>offset - row offsetpublic Q orderBy(OrderSpecifier<?>... o)
SimpleQueryorderBy in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>o - orderpublic Q restrict(QueryModifiers modifiers)
SimpleQueryrestrict in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>modifiers - query modifierspublic <P> Q set(ParamExpression<P> param, P value)
SimpleQueryset in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>param - paramvalue - bindingpublic T fetchFirst()
FetchablefetchFirst in interface Fetchable<T>public T fetchOne()
Fetchablepublic Q where(Predicate... e)
FilteredClauseSkips null arguments
where in interface FilteredClause<Q extends AbstractSearchQuery<T,Q>>e - filter conditions to be addedCopyright © 2007–2015 Mysema Ltd. All rights reserved.