public class QueryGroupingBuilder extends Object
GroupingExpression
using a simple "builder" style, for use with
QueryFilterBuilder
.Constructor and Description |
---|
QueryGroupingBuilder(GroupingOperator operator)
Constructs a QueryGroupingBuilder with the given initial operator.
|
QueryGroupingBuilder(GroupingOperator operator,
Object... nestedExprs)
Constructs a QueryGroupingBuilder with the given initial operator and nested expressions.
|
Modifier and Type | Method and Description |
---|---|
QueryGroupingBuilder |
addExpressions(Object... nestedExprs)
Adds some nested expressions to the expression.
|
static QueryGroupingBuilder |
and(Object... nestedExprs)
Returns a new QueryFilterBuilder with a grouping operator of
GroupingOperator.AND , and the given initial
nested expressions (see addExpressions(java.lang.Object...) ). |
static QueryGroupingBuilder |
or(Object... nestedExprs)
Returns a new QueryFilterBuilder with a grouping operator of
GroupingOperator.OR , and the given initial
nested expressions (see addExpressions(java.lang.Object...) ). |
QueryGroupingBuilder |
setOperator(GroupingOperator operator)
Sets the grouping operator for the expression.
|
GroupingExpression |
toExpression()
Returns the current state of this builder as a GroupingExpression.
|
public QueryGroupingBuilder(GroupingOperator operator)
operator
- the initial operatorpublic QueryGroupingBuilder(GroupingOperator operator, Object... nestedExprs)
operator
- the initial operatornestedExprs
- the initial nested expressions, see addExpressions(java.lang.Object...)
public QueryGroupingBuilder setOperator(GroupingOperator operator)
public QueryGroupingBuilder addExpressions(Object... nestedExprs)
QueryFilterBuilder.toExpression(java.lang.Object)
.public GroupingExpression toExpression()
public static QueryGroupingBuilder and(Object... nestedExprs)
GroupingOperator.AND
, and the given initial
nested expressions (see addExpressions(java.lang.Object...)
).public static QueryGroupingBuilder or(Object... nestedExprs)
GroupingOperator.OR
, and the given initial
nested expressions (see addExpressions(java.lang.Object...)
).