Package com.appiancorp.common.query
Class QueryBuilderTools.Aggregator
java.lang.Object
com.appiancorp.common.query.QueryBuilderTools.Aggregator
- Direct Known Subclasses:
GenericQuery.GenericBuilder.Aggregator,TypedValueQuery.TypedValueBuilder.Aggregator
- Enclosing interface:
- QueryBuilderTools
This class encapsulates all the available Aggregation Functions in a more object oriented way.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AggregationColumnaggregation(String field, AggregationFunction function) Creates anAggregationColumninstancestatic AggregationColumnaggregation(String field, String alias, boolean visible, AggregationFunction function) Creates anAggregationColumninstance.static AggregationColumnApply a "average" aggregation function to the givenColumnstatic AggregationColumnavg(ColumnAlias alias) Apply a "average" aggregation function to the givenColumnAliasstatic AggregationColumnavg(ColumnAlias alias, boolean visibility) Apply a "average" aggregation function to the givenColumnAlias.static AggregationColumnApply a "average" aggregation function to the given field name.static AggregationColumnApply a "average" aggregation function to the given field name.static AggregationColumnApply a "count" aggregation function to the givenColumnstatic AggregationColumncount(ColumnAlias alias) Apply a "count" aggregation function to the givenColumnAliasstatic AggregationColumncount(ColumnAlias alias, boolean visibility) Apply a "count" aggregation function to the givenColumnAlias.static AggregationColumnApply a "count" aggregation function to the given field name.static AggregationColumnApply a "count" aggregation function to the given field name.static AggregationColumnCreates a grouping projection for the givenColumnstatic AggregationColumngroup(ColumnAlias ca) Creates a grouping projection for the givenColumnAliasThis projection can be referred to by the given alias.static AggregationColumnCreates a grouping projection for the given field namestatic AggregationColumnCreates a visible or hidden grouping projection for the given field namestatic AggregationColumnCreates a grouping projection for the given field name.static AggregationColumnCreates a visible or hidden grouping projection for the given field name.static AggregationColumngroup(String field, String alias, com.appiancorp.common.query.GroupingFunction groupingFunction, boolean visible) static AggregationColumnApply a "maximum" aggregation function to the givenColumnstatic AggregationColumnmax(ColumnAlias alias) Apply a "maximum" aggregation function to the givenColumnAliasstatic AggregationColumnmax(ColumnAlias alias, boolean visibility) Apply a "maximum" aggregation function to the givenColumnAlias.static AggregationColumnApply a "maximum" aggregation function to the given field name.static AggregationColumnApply a "maximum" aggregation function to the given field name.static AggregationColumnApply a "minimum" aggregation function to the givenColumnstatic AggregationColumnmin(ColumnAlias alias) Apply a "minimum" aggregation function to the givenColumnAliasstatic AggregationColumnmin(ColumnAlias alias, boolean visibility) Apply a "minimum" aggregation function to the givenColumnAlias.static AggregationColumnApply a "minimum" aggregation function to the given field name.static AggregationColumnApply a "minimum" aggregation function to the given field name.static AggregationColumnApply a "summation" aggregation function to the givenColumnstatic AggregationColumnsum(ColumnAlias alias) Apply a "summation" aggregation function to the givenColumnAliasstatic AggregationColumnsum(ColumnAlias alias, boolean visibility) Apply a "summation" aggregation function to the givenColumnAlias.static AggregationColumnApply a "summation" aggregation function to the given field name.static AggregationColumnApply a "summation" aggregation function to the given field name.
-
Constructor Details
-
Aggregator
public Aggregator()
-
-
Method Details
-
group
Creates a grouping projection for the given field name- Parameters:
field- a field name- Returns:
- an
AggregationColumnrepresenting a grouping projection
-
group
Creates a grouping projection for the given field name. This projection can be referred to by the given alias.- Parameters:
field- a field namealias- an alias name to assign to the projection- Returns:
- an
AggregationColumnrepresenting a grouping projection
-
group
Creates a visible or hidden grouping projection for the given field name- Parameters:
field- a field namevisible- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnrepresenting a grouping projection
-
group
Creates a grouping projection for the givenColumnAliasThis projection can be referred to by the given alias.- Parameters:
ca- aColumnAliasto assign to the projection- Returns:
- an
AggregationColumnrepresenting a grouping projection
-
group
Creates a visible or hidden grouping projection for the given field name. This projection can be referred to by the given alias.- Parameters:
field- a field namealias- an alias name to assign to the projectionvisible- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnrepresenting a grouping projection
-
group
Creates a grouping projection for the givenColumn- Parameters:
c- aColumn- Returns:
- an
AggregationColumnrepresenting a grouping projection
-
group
public static AggregationColumn group(String field, String alias, com.appiancorp.common.query.GroupingFunction groupingFunction, boolean visible) -
aggregation
Creates anAggregationColumninstance- Parameters:
field- a field namefunction- an aggregation function define by theAggregationFunctionenum- Returns:
- an
AggregationColumninstance
-
aggregation
public static AggregationColumn aggregation(String field, String alias, boolean visible, AggregationFunction function) Creates anAggregationColumninstance. This projection can be referred to by the given alias.- Parameters:
field- a field namealias- an alias name to assign to the projectionvisible- iftruethe projection will be visible; otherwise it will be hiddenfunction- an aggregation function define by theAggregationFunctionenum- Returns:
- an
AggregationColumninstance
-
sum
Apply a "summation" aggregation function to the givenColumnAlias- Parameters:
alias- aColumnAliasto assign to the projection- Returns:
- an
AggregationColumnwhere "summation" is applied.
-
avg
Apply a "average" aggregation function to the givenColumnAlias- Parameters:
alias- aColumnAliasto assign to the projection- Returns:
- an
AggregationColumnwhere "average" is applied.
-
count
Apply a "count" aggregation function to the givenColumnAlias- Parameters:
alias- aColumnAliasto assign to the projection- Returns:
- an
AggregationColumnwhere "count" is applied.
-
min
Apply a "minimum" aggregation function to the givenColumnAlias- Parameters:
alias- aColumnAliasto assign to the projection- Returns:
- an
AggregationColumnwhere "minimum" is applied.
-
max
Apply a "maximum" aggregation function to the givenColumnAlias- Parameters:
alias- aColumnAliasto assign to the projection- Returns:
- an
AggregationColumnwhere "maximum" is applied.
-
sum
Apply a "summation" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projection- Returns:
- an
AggregationColumnwhere "summation" is applied.
-
avg
Apply a "average" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projection- Returns:
- an
AggregationColumnwhere "average" is applied.
-
count
Apply a "count" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projection- Returns:
- an
AggregationColumnwhere "count" is applied.
-
min
Apply a "minimum" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projection- Returns:
- an
AggregationColumnwhere "minimum" is applied.
-
max
Apply a "maximum" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projection- Returns:
- an
AggregationColumnwhere "maximum" is applied.
-
sum
Apply a "summation" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "summation" is applied.
-
avg
Apply a "average" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "average" is applied.
-
count
Apply a "count" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "count" is applied.
-
min
Apply a "minimum" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "minimum" is applied.
-
max
Apply a "maximum" aggregation function to the given field name. This projection can be referred to by the given alias.- Parameters:
c- field namealias- an alias name to assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "maximum" is applied.
-
sum
Apply a "summation" aggregation function to the givenColumnAlias. This projection can be referred to by the given alias.- Parameters:
alias- aColumnAliasto assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "summation" is applied.
-
avg
Apply a "average" aggregation function to the givenColumnAlias. This projection can be referred to by the given alias.- Parameters:
alias- aColumnAliasto assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "average" is applied.
-
count
Apply a "count" aggregation function to the givenColumnAlias. This projection can be referred to by the given alias.- Parameters:
alias- aColumnAliasto assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "count" is applied.
-
min
Apply a "minimum" aggregation function to the givenColumnAlias. This projection can be referred to by the given alias.- Parameters:
alias- aColumnAliasto assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "minimum" is applied.
-
max
Apply a "maximum" aggregation function to the givenColumnAlias. This projection can be referred to by the given alias.- Parameters:
alias- aColumnAliasto assign to the projectionvisibility- iftruethe projection will be visible; otherwise it will be hidden- Returns:
- an
AggregationColumnwhere "maximum" is applied.
-
sum
Apply a "summation" aggregation function to the givenColumn- Parameters:
c- aColumn- Returns:
- an
AggregationColumnwhere "summation" is applied.
-
avg
Apply a "average" aggregation function to the givenColumn- Parameters:
c- aColumn- Returns:
- an
AggregationColumnwhere "average" is applied.
-
count
Apply a "count" aggregation function to the givenColumn- Parameters:
c- aColumn- Returns:
- an
AggregationColumnwhere "count" is applied.
-
min
Apply a "minimum" aggregation function to the givenColumn- Parameters:
c- aColumn- Returns:
- an
AggregationColumnwhere "minimum" is applied.
-
max
Apply a "maximum" aggregation function to the givenColumn- Parameters:
c- aColumn- Returns:
- an
AggregationColumnwhere "maximum" is applied.
-