Package io.jmix.pivottable.model
Class Aggregation
java.lang.Object
io.jmix.pivottable.model.AbstractPivotObject
io.jmix.pivottable.model.Aggregation
- All Implemented Interfaces:
Serializable
Constructor for an object which will aggregate results per cell
(see documentation).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProperties(String... properties) getId()getMode()setCaption(String caption) WhenAggregationis set asPivotTableModel.aggregation, thencaptionwill be converted toaggregatorName- the name of the aggregator, used for display purposes in some renderers.Sets whatever a function defined infunctionfield must be used as the aggregation.setFunction(JsFunction function) Sets a function which will aggregate results per cell (see documentation).setMode(AggregationMode mode) Sets one of predefined aggregation modes.setProperties(List<String> properties) Sets a collection of property names to pass as parameters to selected aggregation.
-
Constructor Details
-
Aggregation
public Aggregation()
-
-
Method Details
-
getId
- Returns:
- Id for the unique identification of this Aggregation
-
getMode
- Returns:
- one of predefined aggregation modes
-
setMode
Sets one of predefined aggregation modes.Applies only when
custom=false.- Parameters:
mode- one of predefined aggregation modes- Returns:
- a reference to this object
- See Also:
-
getCaption
- Returns:
- a caption of aggregation
-
setCaption
WhenAggregationis set asPivotTableModel.aggregation, thencaptionwill be converted toaggregatorName- the name of the aggregator, used for display purposes in some renderers.When
Aggregationis added as one ofAggregations.aggregations, thencaptionwill be converted to a key in dictionary of generators for aggregation functions in dropdown menu.- Parameters:
caption- a caption of aggregation- Returns:
- a reference to this object
-
getCustom
- Returns:
trueif a function defined infunctionfield must be used as the aggregation,falseotherwise
-
setCustom
Sets whatever a function defined infunctionfield must be used as the aggregation.- Parameters:
custom-trueif a function defined infunctionfield must be used as the aggregation,falseotherwise- Returns:
- a reference to this object
- See Also:
-
getFunction
- Returns:
- a function which will aggregate results per cell
-
setFunction
Sets a function which will aggregate results per cell (see documentation).Applies only when
custom=true.- Parameters:
function- a function which will aggregate results per cell- Returns:
- a reference to this object
- See Also:
-
getProperties
- Returns:
- a collection of property names to pass as parameters to selected aggregation
-
setProperties
Sets a collection of property names to pass as parameters to selected aggregation.Applies only when
custom=false.- Parameters:
properties- a collection of property names to pass as parameters to selected aggregation- Returns:
- a reference to this object
- See Also:
-
addProperties
-