public final class EmptyMetadata extends Object implements QueryMetadata
EmptyMetadata
provides an immutable empty QueryMetadata
instance.
Modification methods throw UnsupportedOperationException
.
Modifier and Type | Field and Description |
---|---|
static QueryMetadata |
DEFAULT |
Constructor and Description |
---|
EmptyMetadata() |
Modifier and Type | Method and Description |
---|---|
void |
addFlag(QueryFlag flag)
Add the given query flag
|
void |
addGroupBy(Expression<?> o)
Add the given group by expressions
|
void |
addHaving(Predicate o)
Add the given having expressions
|
void |
addJoin(JoinType joinType,
Expression<?> expr)
Add the given query join
|
void |
addJoinCondition(Predicate o)
Add the given join condition to the last given join
|
void |
addJoinFlag(JoinFlag flag)
Add the given join flag to the last given join
|
void |
addOrderBy(OrderSpecifier<?> o)
Add the given order specifiers
|
void |
addWhere(Predicate o)
Add the given where expressions
|
void |
clearOrderBy()
Clear the order expressions
|
void |
clearWhere()
Clear the where expressions
|
QueryMetadata |
clone()
Clone this QueryMetadata instance
|
Set<QueryFlag> |
getFlags()
Get all query flags
|
List<Expression<?>> |
getGroupBy()
Get the group by expressions
|
Predicate |
getHaving()
Get the having expressions
|
List<JoinExpression> |
getJoins()
Get the query joins
|
QueryModifiers |
getModifiers()
Get the QueryModifiers
|
List<OrderSpecifier<?>> |
getOrderBy()
Get the OrderSpecifiers
|
Map<ParamExpression<?>,Object> |
getParams()
Get the parameter bindings
|
Expression<?> |
getProjection()
Get the projection
|
Predicate |
getWhere()
Get the expressions aggregated into a single boolean expression or null,
if none where defined
|
boolean |
hasFlag(QueryFlag flag)
Return whether the given query flag is applied
|
boolean |
isDistinct()
Get whether the projection is distinct
|
boolean |
isUnique()
Get whether the projection is unique
|
void |
removeFlag(QueryFlag flag)
Remove the given query flag
|
void |
reset()
Reset the projection
|
void |
setDistinct(boolean distinct)
Set the distinct flag
|
void |
setLimit(Long limit)
Set the maximum number of rows
|
void |
setModifiers(QueryModifiers restriction)
Set the query modifiers limit and offset
|
void |
setOffset(Long offset)
Set the number of skipped rows
|
<T> void |
setParam(ParamExpression<T> param,
T value)
Bind the value for the given parameter expression
|
void |
setProjection(Expression<?> o)
Set the projection
|
void |
setUnique(boolean unique)
Set the unique flag
|
void |
setValidate(boolean v)
Set the validate flag
|
public static final QueryMetadata DEFAULT
public void addGroupBy(Expression<?> o)
QueryMetadata
addGroupBy
in interface QueryMetadata
o
- group by expressionspublic void addHaving(Predicate o)
QueryMetadata
addHaving
in interface QueryMetadata
o
- having conditionspublic void addJoin(JoinType joinType, Expression<?> expr)
QueryMetadata
addJoin
in interface QueryMetadata
joinType
- type of joinexpr
- join targetpublic void addJoinCondition(Predicate o)
QueryMetadata
addJoinCondition
in interface QueryMetadata
o
- join conditionpublic void addOrderBy(OrderSpecifier<?> o)
QueryMetadata
addOrderBy
in interface QueryMetadata
o
- orderpublic void setProjection(Expression<?> o)
QueryMetadata
setProjection
in interface QueryMetadata
o
- projectionpublic void addWhere(Predicate o)
QueryMetadata
addWhere
in interface QueryMetadata
o
- where conditionpublic void clearOrderBy()
QueryMetadata
clearOrderBy
in interface QueryMetadata
public void clearWhere()
QueryMetadata
clearWhere
in interface QueryMetadata
public QueryMetadata clone()
QueryMetadata
clone
in interface QueryMetadata
clone
in class Object
public List<Expression<?>> getGroupBy()
QueryMetadata
getGroupBy
in interface QueryMetadata
public Predicate getHaving()
QueryMetadata
getHaving
in interface QueryMetadata
public List<JoinExpression> getJoins()
QueryMetadata
getJoins
in interface QueryMetadata
public QueryModifiers getModifiers()
QueryMetadata
getModifiers
in interface QueryMetadata
public List<OrderSpecifier<?>> getOrderBy()
QueryMetadata
getOrderBy
in interface QueryMetadata
public Expression<?> getProjection()
QueryMetadata
getProjection
in interface QueryMetadata
public Map<ParamExpression<?>,Object> getParams()
QueryMetadata
getParams
in interface QueryMetadata
public Predicate getWhere()
QueryMetadata
getWhere
in interface QueryMetadata
public boolean isDistinct()
QueryMetadata
isDistinct
in interface QueryMetadata
public boolean isUnique()
QueryMetadata
isUnique
in interface QueryMetadata
public void reset()
QueryMetadata
reset
in interface QueryMetadata
public void setDistinct(boolean distinct)
QueryMetadata
setDistinct
in interface QueryMetadata
distinct
- distinctpublic void setLimit(Long limit)
QueryMetadata
setLimit
in interface QueryMetadata
limit
- limitpublic void setModifiers(QueryModifiers restriction)
QueryMetadata
setModifiers
in interface QueryMetadata
restriction
- restrictionpublic void setOffset(Long offset)
QueryMetadata
setOffset
in interface QueryMetadata
offset
- offsetpublic void setUnique(boolean unique)
QueryMetadata
setUnique
in interface QueryMetadata
unique
- uniquepublic <T> void setParam(ParamExpression<T> param, T value)
QueryMetadata
setParam
in interface QueryMetadata
T
- binding typeparam
- parametervalue
- bindingpublic void addFlag(QueryFlag flag)
QueryMetadata
addFlag
in interface QueryMetadata
flag
- query flagpublic boolean hasFlag(QueryFlag flag)
QueryMetadata
hasFlag
in interface QueryMetadata
flag
- query flagpublic Set<QueryFlag> getFlags()
QueryMetadata
getFlags
in interface QueryMetadata
public void setValidate(boolean v)
QueryMetadata
setValidate
in interface QueryMetadata
v
- validatepublic void addJoinFlag(JoinFlag flag)
QueryMetadata
addJoinFlag
in interface QueryMetadata
flag
- join flagpublic void removeFlag(QueryFlag flag)
QueryMetadata
removeFlag
in interface QueryMetadata
flag
- query flagCopyright © 2007–2016 Querydsl. All rights reserved.