Package com.appiancorp.common.query
Class AggregationColumn
java.lang.Object
com.appiancorp.common.query.ColumnAlias
com.appiancorp.common.query.Column
com.appiancorp.common.query.AggregationColumn
Immutable bean representing the column dot notation, alias, visibility (if it's should be shown to the client or not). Along with this it indicates if this function should be grouped by or which aggregation function is applied to this column instead.
This column can either be grouped or aggregated but not both, since they are mutually exclusive.
An instance can only be obtain by using the helper class QueryBuilder.Selecting
or
in a more object oriented way by using the helper class QueryBuilder.Aggregating
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionCopy constructorprotected
AggregationColumn
(String field, String alias, boolean visible) Constructs a newAggregationColumn
which groups by the given field name with the given alias name.protected
AggregationColumn
(String field, String alias, boolean visible, boolean isGrouping, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) protected
AggregationColumn
(String field, String alias, boolean visible, AggregationFunction function) Constructs a newAggregationColumn
which groups by the given field name with the given alias name.protected
AggregationColumn
(String field, String alias, boolean visible, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) Constructs a newAggregationColumn
which groups by the given field name with the given alias name. -
Method Summary
Methods inherited from class com.appiancorp.common.query.Column
appendForToString, getAliasToFieldPathMap, isVisible
Methods inherited from class com.appiancorp.common.query.ColumnAlias
appendForToString, getAlias, getField
-
Field Details
-
LOCAL_PART
- See Also:
-
QNAME
-
-
Constructor Details
-
AggregationColumn
Constructs a newAggregationColumn
which groups by the given field name with the given alias name.- Parameters:
field
- a field namealias
- an alias namevisible
- determines if this column will be visible or not.
-
AggregationColumn
protected AggregationColumn(String field, String alias, boolean visible, AggregationFunction function) Constructs a newAggregationColumn
which groups by the given field name with the given alias name.- Parameters:
field
- a field namealias
- an alias namevisible
- determines if this column will be visible or not.function
- theAggregationFunction
which will be apply for this column
-
AggregationColumn
protected AggregationColumn(String field, String alias, boolean visible, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) Constructs a newAggregationColumn
which groups by the given field name with the given alias name.- Parameters:
field
- a field namealias
- an alias namevisible
- determines if this column will be visible or not.aggregationFunction
- theAggregationFunction
which will be applied for this columngroupingFunction
- theGroupingFunction
which will be applied for this column
-
AggregationColumn
protected AggregationColumn(String field, String alias, boolean visible, boolean isGrouping, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) -
AggregationColumn
Copy constructor- Parameters:
ac
- anAggregationColumn
-
-
Method Details
-
isGrouping
public boolean isGrouping() -
getFunction
-
getGroupingFunction
public com.appiancorp.common.query.GroupingFunction getGroupingFunction() -
hashCode
public int hashCode() -
equals
-
canEquals
Description copied from class:ColumnAlias
Checks if this instance can compare against the given object. -
toString
-