public static class QueryBuilderTools.Aggregator
extends java.lang.Object
This class encapsulates all the available Aggregation Functions in a more object oriented way.
Constructor and Description |
---|
Aggregator() |
Modifier and Type | Method and Description |
---|---|
static AggregationColumn |
aggregation(java.lang.String field,
AggregationFunction function)
Creates an
AggregationColumn instance |
static AggregationColumn |
aggregation(java.lang.String field,
java.lang.String alias,
boolean visible,
AggregationFunction function)
Creates an
AggregationColumn instance. |
static AggregationColumn |
avg(Column c)
Apply a "average" aggregation function to the given
Column |
static AggregationColumn |
avg(ColumnAlias alias)
Apply a "average" aggregation function to the given
ColumnAlias |
static AggregationColumn |
avg(ColumnAlias alias,
boolean visibility)
Apply a "average" aggregation function to the given
ColumnAlias . |
static AggregationColumn |
avg(java.lang.String c,
java.lang.String alias)
Apply a "average" aggregation function to the given field name.
|
static AggregationColumn |
avg(java.lang.String c,
java.lang.String alias,
boolean visibility)
Apply a "average" aggregation function to the given field name.
|
static AggregationColumn |
count(Column c)
Apply a "count" aggregation function to the given
Column |
static AggregationColumn |
count(ColumnAlias alias)
Apply a "count" aggregation function to the given
ColumnAlias |
static AggregationColumn |
count(ColumnAlias alias,
boolean visibility)
Apply a "count" aggregation function to the given
ColumnAlias . |
static AggregationColumn |
count(java.lang.String c,
java.lang.String alias)
Apply a "count" aggregation function to the given field name.
|
static AggregationColumn |
count(java.lang.String c,
java.lang.String alias,
boolean visibility)
Apply a "count" aggregation function to the given field name.
|
static AggregationColumn |
group(Column c)
Creates a grouping projection for the given
Column |
static AggregationColumn |
group(ColumnAlias ca)
Creates a grouping projection for the given
ColumnAlias
This projection can be referred to by the given alias. |
static AggregationColumn |
group(java.lang.String field)
Creates a grouping projection for the given field name
|
static AggregationColumn |
group(java.lang.String field,
boolean visible)
Creates a visible or hidden grouping projection for the given field name
|
static AggregationColumn |
group(java.lang.String field,
java.lang.String alias)
Creates a grouping projection for the given field name.
|
static AggregationColumn |
group(java.lang.String field,
java.lang.String alias,
boolean visible)
Creates a visible or hidden grouping projection for the given field name.
|
static AggregationColumn |
group(java.lang.String field,
java.lang.String alias,
com.appiancorp.common.query.GroupingFunction groupingFunction,
boolean visible) |
static AggregationColumn |
max(Column c)
Apply a "maximum" aggregation function to the given
Column |
static AggregationColumn |
max(ColumnAlias alias)
Apply a "maximum" aggregation function to the given
ColumnAlias |
static AggregationColumn |
max(ColumnAlias alias,
boolean visibility)
Apply a "maximum" aggregation function to the given
ColumnAlias . |
static AggregationColumn |
max(java.lang.String c,
java.lang.String alias)
Apply a "maximum" aggregation function to the given field name.
|
static AggregationColumn |
max(java.lang.String c,
java.lang.String alias,
boolean visibility)
Apply a "maximum" aggregation function to the given field name.
|
static AggregationColumn |
min(Column c)
Apply a "minimum" aggregation function to the given
Column |
static AggregationColumn |
min(ColumnAlias alias)
Apply a "minimum" aggregation function to the given
ColumnAlias |
static AggregationColumn |
min(ColumnAlias alias,
boolean visibility)
Apply a "minimum" aggregation function to the given
ColumnAlias . |
static AggregationColumn |
min(java.lang.String c,
java.lang.String alias)
Apply a "minimum" aggregation function to the given field name.
|
static AggregationColumn |
min(java.lang.String c,
java.lang.String alias,
boolean visibility)
Apply a "minimum" aggregation function to the given field name.
|
static AggregationColumn |
sum(Column c)
Apply a "summation" aggregation function to the given
Column |
static AggregationColumn |
sum(ColumnAlias alias)
Apply a "summation" aggregation function to the given
ColumnAlias |
static AggregationColumn |
sum(ColumnAlias alias,
boolean visibility)
Apply a "summation" aggregation function to the given
ColumnAlias . |
static AggregationColumn |
sum(java.lang.String c,
java.lang.String alias)
Apply a "summation" aggregation function to the given field name.
|
static AggregationColumn |
sum(java.lang.String c,
java.lang.String alias,
boolean visibility)
Apply a "summation" aggregation function to the given field name.
|
public static AggregationColumn group(java.lang.String field)
field
- a field nameAggregationColumn
representing a grouping projectionpublic static AggregationColumn group(java.lang.String field, java.lang.String alias)
field
- a field namealias
- an alias name to assign to the projectionAggregationColumn
representing a grouping projectionpublic static AggregationColumn group(java.lang.String field, boolean visible)
field
- a field namevisible
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
representing a grouping projectionpublic static AggregationColumn group(ColumnAlias ca)
ColumnAlias
This projection can be referred to by the given alias.ca
- a ColumnAlias
to assign to the projectionAggregationColumn
representing a grouping projectionpublic static AggregationColumn group(java.lang.String field, java.lang.String alias, boolean visible)
field
- a field namealias
- an alias name to assign to the projectionvisible
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
representing a grouping projectionpublic static AggregationColumn group(Column c)
Column
c
- a Column
AggregationColumn
representing a grouping projectionpublic static AggregationColumn group(java.lang.String field, java.lang.String alias, com.appiancorp.common.query.GroupingFunction groupingFunction, boolean visible)
public static AggregationColumn aggregation(java.lang.String field, AggregationFunction function)
AggregationColumn
instancefield
- a field namefunction
- an aggregation function define by the AggregationFunction
enumAggregationColumn
instancepublic static AggregationColumn aggregation(java.lang.String field, java.lang.String alias, boolean visible, AggregationFunction function)
AggregationColumn
instance.
This projection can be referred to by the given alias.field
- a field namealias
- an alias name to assign to the projectionvisible
- if true
the projection will be visible; otherwise it will be hiddenfunction
- an aggregation function define by the AggregationFunction
enumAggregationColumn
instancepublic static AggregationColumn sum(ColumnAlias alias)
ColumnAlias
alias
- a ColumnAlias
to assign to the projectionAggregationColumn
where "summation" is applied.public static AggregationColumn avg(ColumnAlias alias)
ColumnAlias
alias
- a ColumnAlias
to assign to the projectionAggregationColumn
where "average" is applied.public static AggregationColumn count(ColumnAlias alias)
ColumnAlias
alias
- a ColumnAlias
to assign to the projectionAggregationColumn
where "count" is applied.public static AggregationColumn min(ColumnAlias alias)
ColumnAlias
alias
- a ColumnAlias
to assign to the projectionAggregationColumn
where "minimum" is applied.public static AggregationColumn max(ColumnAlias alias)
ColumnAlias
alias
- a ColumnAlias
to assign to the projectionAggregationColumn
where "maximum" is applied.public static AggregationColumn sum(java.lang.String c, java.lang.String alias)
c
- field namealias
- an alias name to assign to the projectionAggregationColumn
where "summation" is applied.public static AggregationColumn avg(java.lang.String c, java.lang.String alias)
c
- field namealias
- an alias name to assign to the projectionAggregationColumn
where "average" is applied.public static AggregationColumn count(java.lang.String c, java.lang.String alias)
c
- field namealias
- an alias name to assign to the projectionAggregationColumn
where "count" is applied.public static AggregationColumn min(java.lang.String c, java.lang.String alias)
c
- field namealias
- an alias name to assign to the projectionAggregationColumn
where "minimum" is applied.public static AggregationColumn max(java.lang.String c, java.lang.String alias)
c
- field namealias
- an alias name to assign to the projectionAggregationColumn
where "maximum" is applied.public static AggregationColumn sum(java.lang.String c, java.lang.String alias, boolean visibility)
c
- field namealias
- an alias name to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "summation" is applied.public static AggregationColumn avg(java.lang.String c, java.lang.String alias, boolean visibility)
c
- field namealias
- an alias name to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "average" is applied.public static AggregationColumn count(java.lang.String c, java.lang.String alias, boolean visibility)
c
- field namealias
- an alias name to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "count" is applied.public static AggregationColumn min(java.lang.String c, java.lang.String alias, boolean visibility)
c
- field namealias
- an alias name to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "minimum" is applied.public static AggregationColumn max(java.lang.String c, java.lang.String alias, boolean visibility)
c
- field namealias
- an alias name to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "maximum" is applied.public static AggregationColumn sum(ColumnAlias alias, boolean visibility)
ColumnAlias
.
This projection can be referred to by the given alias.alias
- a ColumnAlias
to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "summation" is applied.public static AggregationColumn avg(ColumnAlias alias, boolean visibility)
ColumnAlias
.
This projection can be referred to by the given alias.alias
- a ColumnAlias
to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "average" is applied.public static AggregationColumn count(ColumnAlias alias, boolean visibility)
ColumnAlias
.
This projection can be referred to by the given alias.alias
- a ColumnAlias
to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "count" is applied.public static AggregationColumn min(ColumnAlias alias, boolean visibility)
ColumnAlias
.
This projection can be referred to by the given alias.alias
- a ColumnAlias
to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "minimum" is applied.public static AggregationColumn max(ColumnAlias alias, boolean visibility)
ColumnAlias
.
This projection can be referred to by the given alias.alias
- a ColumnAlias
to assign to the projectionvisibility
- if true
the projection will be visible; otherwise it will be hiddenAggregationColumn
where "maximum" is applied.public static AggregationColumn sum(Column c)
Column
c
- a Column
AggregationColumn
where "summation" is applied.public static AggregationColumn avg(Column c)
Column
c
- a Column
AggregationColumn
where "average" is applied.public static AggregationColumn count(Column c)
Column
c
- a Column
AggregationColumn
where "count" is applied.public static AggregationColumn min(Column c)
Column
c
- a Column
AggregationColumn
where "minimum" is applied.public static AggregationColumn max(Column c)
Column
c
- a Column
AggregationColumn
where "maximum" is applied.Copyright © 2003-2024 Appian Corporation. All Rights Reserved.