public class DefaultQueryMetadata extends Object implements QueryMetadata, Cloneable
QueryMetadata
interfaceConstructor and Description |
---|
DefaultQueryMetadata()
Create an empty DefaultQueryMetadata instance
|
Modifier and Type | Method and Description |
---|---|
void |
addFlag(QueryFlag flag) |
void |
addGroupBy(Expression<?> o)
Add the given group by expressions
|
void |
addHaving(Predicate e)
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 |
addProjection(Expression<?> o)
Add the given projections
|
void |
addWhere(Predicate e)
Add the given where expressions
|
void |
clearOrderBy()
Clear the order expressions
|
void |
clearProjection()
Clear the projection
|
void |
clearWhere()
Clear the where expressions
|
QueryMetadata |
clone()
Clone this QueryMetadata instance
|
boolean |
equals(Object o) |
Set<QueryFlag> |
getFlags() |
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 parameters
|
List<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) |
int |
hashCode() |
boolean |
isDistinct()
Get whether the projection is distinct
|
boolean |
isUnique()
Get whether the projection is unique
|
DefaultQueryMetadata |
noValidate()
Disable validation
|
void |
removeFlag(QueryFlag flag) |
void |
reset()
Reset the projection
|
void |
setDistinct(boolean distinct) |
void |
setLimit(Long limit) |
void |
setModifiers(QueryModifiers restriction) |
void |
setOffset(Long offset) |
<T> void |
setParam(ParamExpression<T> param,
T value) |
void |
setUnique(boolean unique) |
void |
setValidate(boolean v) |
void |
setValidatingVisitor(ValidatingVisitor visitor) |
public DefaultQueryMetadata()
public DefaultQueryMetadata noValidate()
public void addFlag(QueryFlag flag)
addFlag
in interface QueryMetadata
public void addJoinFlag(JoinFlag flag)
QueryMetadata
addJoinFlag
in interface QueryMetadata
public void addGroupBy(Expression<?> o)
QueryMetadata
addGroupBy
in interface QueryMetadata
public void addHaving(Predicate e)
QueryMetadata
addHaving
in interface QueryMetadata
public void addJoin(JoinType joinType, Expression<?> expr)
QueryMetadata
addJoin
in interface QueryMetadata
public void addJoinCondition(Predicate o)
QueryMetadata
addJoinCondition
in interface QueryMetadata
public void addOrderBy(OrderSpecifier<?> o)
QueryMetadata
addOrderBy
in interface QueryMetadata
public void addProjection(Expression<?> o)
QueryMetadata
addProjection
in interface QueryMetadata
public void addWhere(Predicate e)
QueryMetadata
addWhere
in interface QueryMetadata
public void clearOrderBy()
QueryMetadata
clearOrderBy
in interface QueryMetadata
public void clearProjection()
QueryMetadata
clearProjection
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
@Nullable public QueryModifiers getModifiers()
QueryMetadata
getModifiers
in interface QueryMetadata
public Map<ParamExpression<?>,Object> getParams()
QueryMetadata
getParams
in interface QueryMetadata
public List<OrderSpecifier<?>> getOrderBy()
QueryMetadata
getOrderBy
in interface QueryMetadata
public List<Expression<?>> getProjection()
QueryMetadata
getProjection
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)
setDistinct
in interface QueryMetadata
public void setLimit(Long limit)
setLimit
in interface QueryMetadata
public void setModifiers(@Nullable QueryModifiers restriction)
setModifiers
in interface QueryMetadata
public void setOffset(Long offset)
setOffset
in interface QueryMetadata
public void setUnique(boolean unique)
setUnique
in interface QueryMetadata
public <T> void setParam(ParamExpression<T> param, T value)
setParam
in interface QueryMetadata
public Set<QueryFlag> getFlags()
getFlags
in interface QueryMetadata
public boolean hasFlag(QueryFlag flag)
hasFlag
in interface QueryMetadata
public void removeFlag(QueryFlag flag)
removeFlag
in interface QueryMetadata
public void setValidate(boolean v)
setValidate
in interface QueryMetadata
public void setValidatingVisitor(ValidatingVisitor visitor)
Copyright © 2007–2015 Mysema Ltd. All rights reserved.