com.mysema.query
Interface QueryMetadata

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultQueryMetadata

public interface QueryMetadata
extends Serializable

QueryMetadata defines query metadata such as query sources, filtering conditions and the projection

Author:
tiwe

Method Summary
 void addFlag(QueryFlag flag)
           
 void addGroupBy(Expr<?>... o)
          Add the given group by expressions
 void addHaving(EBoolean... o)
          Add the given having expressions
 void addJoin(JoinType joinType, Expr<?> expr)
          Add the given query join
 void addJoinCondition(EBoolean o)
          Add the given join condition to the last given join
 void addOrderBy(OrderSpecifier<?>... o)
          Add the given order specifiers
 void addProjection(Expr<?>... o)
          Add the given projections
 void addWhere(EBoolean... o)
          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
 Set<QueryFlag> getFlags()
           
 List<? extends Expr<?>> getGroupBy()
          Get the group by expressions
 EBoolean getHaving()
          Get the having expressions
 List<JoinExpression> getJoins()
          Get the query joins
 QueryModifiers getModifiers()
          Get the QueryModifiers
 List<OrderSpecifier<?>> getOrderBy()
          Get the OrderSpecifiers
 Map<Param<?>,Object> getParams()
          Get the parameters
 List<? extends Expr<?>> getProjection()
          Get the projection
 EBoolean getWhere()
          Get the expressions aggregated into a single boolean expression or null, if none where defined
 boolean hasFlag(QueryFlag flag)
           
 boolean isDistinct()
          Get whether the projection is distinct
 boolean isUnique()
          Get whether the projection is unique
 void reset()
          Reset the projection
 void setDistinct(boolean distinct)
           
 void setLimit(Long limit)
           
 void setModifiers(QueryModifiers restriction)
           
 void setOffset(Long offset)
           
<T> void
setParam(Param<T> param, T value)
           
 void setUnique(boolean unique)
           
 

Method Detail

addGroupBy

void addGroupBy(Expr<?>... o)
Add the given group by expressions

Parameters:
o -

addHaving

void addHaving(EBoolean... o)
Add the given having expressions

Parameters:
o -

addJoin

void addJoin(JoinType joinType,
             Expr<?> expr)
Add the given query join

Parameters:
joinType -
expr -

addJoinCondition

void addJoinCondition(EBoolean o)
Add the given join condition to the last given join

Parameters:
o -

addOrderBy

void addOrderBy(OrderSpecifier<?>... o)
Add the given order specifiers

Parameters:
o -

addProjection

void addProjection(Expr<?>... o)
Add the given projections

Parameters:
o -

addWhere

void addWhere(EBoolean... o)
Add the given where expressions

Parameters:
o -

clearOrderBy

void clearOrderBy()
Clear the order expressions


clearProjection

void clearProjection()
Clear the projection


clearWhere

void clearWhere()
Clear the where expressions


clone

QueryMetadata clone()
Clone this QueryMetadata instance

Returns:

getGroupBy

List<? extends Expr<?>> getGroupBy()
Get the group by expressions

Returns:

getHaving

@Nullable
EBoolean getHaving()
Get the having expressions

Returns:

getJoins

List<JoinExpression> getJoins()
Get the query joins

Returns:

getModifiers

@Nullable
QueryModifiers getModifiers()
Get the QueryModifiers

Returns:

getOrderBy

List<OrderSpecifier<?>> getOrderBy()
Get the OrderSpecifiers

Returns:

getProjection

List<? extends Expr<?>> getProjection()
Get the projection

Returns:

getParams

Map<Param<?>,Object> getParams()
Get the parameters

Returns:

getWhere

@Nullable
EBoolean getWhere()
Get the expressions aggregated into a single boolean expression or null, if none where defined

Returns:

isDistinct

boolean isDistinct()
Get whether the projection is distinct

Returns:

isUnique

boolean isUnique()
Get whether the projection is unique

Returns:

reset

void reset()
Reset the projection


setDistinct

void setDistinct(boolean distinct)
Parameters:
distinct -

setLimit

void setLimit(@Nullable
              Long limit)
Parameters:
limit -

setModifiers

void setModifiers(QueryModifiers restriction)
Parameters:
restriction -

setOffset

void setOffset(@Nullable
               Long offset)
Parameters:
offset -

setUnique

void setUnique(boolean unique)
Parameters:
unique -

setParam

<T> void setParam(Param<T> param,
                  T value)
Type Parameters:
T -
Parameters:
param -
value -

addFlag

void addFlag(QueryFlag flag)
Parameters:
flag -

hasFlag

boolean hasFlag(QueryFlag flag)
Parameters:
flag -
Returns:

getFlags

Set<QueryFlag> getFlags()
Returns:


Copyright © 2007-2010 Mysema Ltd. All Rights Reserved.