public class DefaultQueryMetadata extends Object implements QueryMetadata, Cloneable
DefaultQueryMetadata is the default implementation of the QueryMetadata interface.
DefaultQueryMetadata is mutable, but clone() can be used to
created deep copies to refine the state without modifying the initial instance.
| Constructor and Description |
|---|
DefaultQueryMetadata()
Create an empty DefaultQueryMetadata instance
|
| 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 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 |
addWhere(Predicate e)
Add the given where expressions
|
void |
clearOrderBy()
Clear the order expressions
|
void |
clearWhere()
Clear the where expressions
|
QueryMetadata |
clone()
Clone this QueryMetadata instance
|
boolean |
equals(Object o) |
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
|
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)
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
|
void |
setValidatingVisitor(ValidatingVisitor visitor) |
public DefaultQueryMetadata()
public DefaultQueryMetadata noValidate()
public void addFlag(QueryFlag flag)
QueryMetadataaddFlag in interface QueryMetadataflag - query flagpublic void addJoinFlag(JoinFlag flag)
QueryMetadataaddJoinFlag in interface QueryMetadataflag - join flagpublic void addGroupBy(Expression<?> o)
QueryMetadataaddGroupBy in interface QueryMetadatao - group by expressionspublic void addHaving(Predicate e)
QueryMetadataaddHaving in interface QueryMetadatae - having conditionspublic void addJoin(JoinType joinType, Expression<?> expr)
QueryMetadataaddJoin in interface QueryMetadatajoinType - type of joinexpr - join targetpublic void addJoinCondition(Predicate o)
QueryMetadataaddJoinCondition in interface QueryMetadatao - join conditionpublic void addOrderBy(OrderSpecifier<?> o)
QueryMetadataaddOrderBy in interface QueryMetadatao - orderpublic void setProjection(Expression<?> o)
QueryMetadatasetProjection in interface QueryMetadatao - projectionpublic void addWhere(Predicate e)
QueryMetadataaddWhere in interface QueryMetadatae - where conditionpublic void clearOrderBy()
QueryMetadataclearOrderBy in interface QueryMetadatapublic void clearWhere()
QueryMetadataclearWhere in interface QueryMetadatapublic QueryMetadata clone()
QueryMetadataclone in interface QueryMetadataclone in class Objectpublic List<Expression<?>> getGroupBy()
QueryMetadatagetGroupBy in interface QueryMetadatapublic Predicate getHaving()
QueryMetadatagetHaving in interface QueryMetadatapublic List<JoinExpression> getJoins()
QueryMetadatagetJoins in interface QueryMetadatapublic QueryModifiers getModifiers()
QueryMetadatagetModifiers in interface QueryMetadatapublic Map<ParamExpression<?>,Object> getParams()
QueryMetadatagetParams in interface QueryMetadatapublic List<OrderSpecifier<?>> getOrderBy()
QueryMetadatagetOrderBy in interface QueryMetadatapublic Expression<?> getProjection()
QueryMetadatagetProjection in interface QueryMetadatapublic Predicate getWhere()
QueryMetadatagetWhere in interface QueryMetadatapublic boolean isDistinct()
QueryMetadataisDistinct in interface QueryMetadatapublic boolean isUnique()
QueryMetadataisUnique in interface QueryMetadatapublic void reset()
QueryMetadatareset in interface QueryMetadatapublic void setDistinct(boolean distinct)
QueryMetadatasetDistinct in interface QueryMetadatadistinct - distinctpublic void setLimit(Long limit)
QueryMetadatasetLimit in interface QueryMetadatalimit - limitpublic void setModifiers(QueryModifiers restriction)
QueryMetadatasetModifiers in interface QueryMetadatarestriction - restrictionpublic void setOffset(Long offset)
QueryMetadatasetOffset in interface QueryMetadataoffset - offsetpublic void setUnique(boolean unique)
QueryMetadatasetUnique in interface QueryMetadataunique - uniquepublic <T> void setParam(ParamExpression<T> param, T value)
QueryMetadatasetParam in interface QueryMetadataT - binding typeparam - parametervalue - bindingpublic Set<QueryFlag> getFlags()
QueryMetadatagetFlags in interface QueryMetadatapublic boolean hasFlag(QueryFlag flag)
QueryMetadatahasFlag in interface QueryMetadataflag - query flagpublic void removeFlag(QueryFlag flag)
QueryMetadataremoveFlag in interface QueryMetadataflag - query flagpublic void setValidate(boolean v)
QueryMetadatasetValidate in interface QueryMetadatav - validatepublic void setValidatingVisitor(ValidatingVisitor visitor)
Copyright © 2007–2019 Querydsl. All rights reserved.