Package io.jmix.flowui.component
Class AggregationInfo
java.lang.Object
io.jmix.flowui.component.AggregationInfo
- All Implemented Interfaces:
SupportsFormatter<Object>
POJO to store all information needed to create aggregation in
DataGrid.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the type of aggregation to be performed. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected MetaPropertyPathprotected AggregationStrategy<?,?> protected AggregationInfo.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the title of the cell, if available.Returns theMetaPropertyPathused for aggregation.AggregationStrategy<?,?> Returns the current aggregation strategy in use.getType()Returns the type of aggregation.voidsetCellTitle(String cellTitle) Sets the title of the cell.voidsetFormatter(Formatter<? super Object> formatter) Sets a formatter that is used to produce the strings representation of the value.voidsetPropertyPath(MetaPropertyPath propertyPath) Sets theMetaPropertyPathused for aggregation.voidsetStrategy(AggregationStrategy<?, ?> strategy) Sets the aggregation strategy to be used.voidsetType(AggregationInfo.Type type) Sets the type of aggregation.
-
Field Details
-
propertyPath
-
type
-
formatter
-
strategy
-
cellTitle
-
-
Constructor Details
-
AggregationInfo
public AggregationInfo()
-
-
Method Details
-
getPropertyPath
Returns theMetaPropertyPathused for aggregation.- Returns:
- the
MetaPropertyPath, ornullif not set
-
setPropertyPath
Sets theMetaPropertyPathused for aggregation.- Parameters:
propertyPath- theMetaPropertyPathrepresenting the path to the property, ornullif no property path is set
-
getType
Returns the type of aggregation.- Returns:
- the type of aggregation, or
nullif it is not set.
-
setType
Sets the type of aggregation.- Parameters:
type- the type to set
-
getFormatter
- Specified by:
getFormatterin interfaceSupportsFormatter<Object>- Returns:
- a formatter or
nullif not set
-
setFormatter
Description copied from interface:SupportsFormatterSets a formatter that is used to produce the strings representation of the value.- Specified by:
setFormatterin interfaceSupportsFormatter<Object>- Parameters:
formatter- a formatter to set ornullto remove
-
getStrategy
Returns the current aggregation strategy in use.- Returns:
- the aggregation strategy if present, or
nullif no strategy is set
-
setStrategy
Sets the aggregation strategy to be used. If a non-null strategy is provided, the type is set to CUSTOM. This method allows customization of aggregation logic.- Parameters:
strategy- the aggregation strategy to set; can benullto indicate no strategy
-
getCellTitle
Returns the title of the cell, if available.- Returns:
- the cell title, or
nullif no title is set
-
setCellTitle
Sets the title of the cell.- Parameters:
cellTitle- the title to set for the cell
-