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()
Fetchable
fetchCount
in interface Fetchable<T>
public Q distinct()
SimpleQuery
distinct
in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>
public com.mysema.commons.lang.CloseableIterator<T> iterate()
Fetchable
public Q limit(long limit)
SimpleQuery
limit
in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>
limit
- max rowspublic List<T> fetch()
Fetchable
public QueryResults<T> fetchResults()
Fetchable
QueryResults
formfetchResults
in interface Fetchable<T>
public Q offset(long offset)
SimpleQuery
offset
in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>
offset
- row offsetpublic Q orderBy(OrderSpecifier<?>... o)
SimpleQuery
orderBy
in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>
o
- orderpublic Q restrict(QueryModifiers modifiers)
SimpleQuery
restrict
in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>
modifiers
- query modifierspublic <P> Q set(ParamExpression<P> param, P value)
SimpleQuery
set
in interface SimpleQuery<Q extends AbstractSearchQuery<T,Q>>
param
- paramvalue
- bindingpublic T fetchFirst()
Fetchable
fetchFirst
in interface Fetchable<T>
public T fetchOne()
Fetchable
public Q where(Predicate... e)
FilteredClause
Skips null arguments
where
in interface FilteredClause<Q extends AbstractSearchQuery<T,Q>>
e
- filter conditions to be addedCopyright © 2007–2016 Querydsl. All rights reserved.