Q
- concrete subtypepublic abstract class QueryBase<Q extends QueryBase<Q>> extends Object
QueryBase
provides a stub for Query implementationsModifier and Type | Field and Description |
---|---|
static String |
MDC_PARAMETERS |
static String |
MDC_QUERY |
protected QueryMixin<Q> |
queryMixin |
Constructor and Description |
---|
QueryBase(QueryMixin<Q> queryMixin) |
Modifier and Type | Method and Description |
---|---|
Q |
distinct()
Set the Query to return distinct results
|
boolean |
equals(Object o) |
Q |
groupBy(Expression<?>... o)
Add grouping/aggregation expressions
|
Q |
groupBy(Expression<?> e)
Add a single grouping expression
|
int |
hashCode() |
Q |
having(Predicate... o)
Add filters for aggregation
|
Q |
having(Predicate e)
Add a single filter for aggregation
|
Q |
limit(long limit)
Defines the limit / max results for the query results
|
Q |
offset(long offset)
Defines the offset for the query results
|
Q |
orderBy(OrderSpecifier<?>... o)
Add order expressions
|
Q |
orderBy(OrderSpecifier<?> o)
Add a single order expression
|
Q |
restrict(QueryModifiers modifiers)
Defines both limit and offset of the query results,
use
QueryModifiers.EMPTY to apply no paging. |
<P> Q |
set(ParamExpression<P> param,
P value)
Set the given parameter to the given value
|
String |
toString() |
Q |
where(Predicate... o)
Add the given filter conditions
|
Q |
where(Predicate o)
Add the given filter condition
|
public static final String MDC_QUERY
public static final String MDC_PARAMETERS
protected final QueryMixin<Q extends QueryBase<Q>> queryMixin
public QueryBase(QueryMixin<Q> queryMixin)
public Q distinct()
public Q groupBy(Expression<?> e)
e
- group by expressionpublic Q groupBy(Expression<?>... o)
o
- group by expressionspublic Q having(Predicate e)
e
- having conditionpublic Q having(Predicate... o)
o
- having conditionspublic Q orderBy(OrderSpecifier<?> o)
o
- orderpublic Q orderBy(OrderSpecifier<?>... o)
o
- orderpublic Q where(Predicate o)
Skips null arguments
o
- filter conditions to be addedpublic Q where(Predicate... o)
Skips null arguments
o
- filter conditions to be addedpublic Q limit(@Nonnegative long limit)
limit
- max rowspublic Q offset(long offset)
offset
- row offsetpublic Q restrict(QueryModifiers modifiers)
QueryModifiers.EMPTY
to apply no paging.modifiers
- query modifierspublic <P> Q set(ParamExpression<P> param, P value)
P
- param
- paramvalue
- bindingCopyright © 2007–2015 Mysema Ltd. All rights reserved.