Class Aggregation

All Implemented Interfaces:
Serializable

public class Aggregation extends AbstractPivotObject
Constructor for an object which will aggregate results per cell (see documentation).
See Also:
  • Constructor Details

    • Aggregation

      public Aggregation()
  • Method Details

    • getId

      public String getId()
      Returns:
      Id for the unique identification of this Aggregation
    • getMode

      public AggregationMode getMode()
      Returns:
      one of predefined aggregation modes
    • setMode

      public Aggregation setMode(AggregationMode mode)
      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

      public String getCaption()
      Returns:
      a caption of aggregation
    • setCaption

      public Aggregation setCaption(String caption)
      When Aggregation is set as PivotTableModel.aggregation, then caption will be converted to aggregatorName - the name of the aggregator, used for display purposes in some renderers.

      When Aggregation is added as one of Aggregations.aggregations, then caption will 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

      public Boolean getCustom()
      Returns:
      true if a function defined in function field must be used as the aggregation, false otherwise
    • setCustom

      public Aggregation setCustom(Boolean custom)
      Sets whatever a function defined in function field must be used as the aggregation.
      Parameters:
      custom - true if a function defined in function field must be used as the aggregation, false otherwise
      Returns:
      a reference to this object
      See Also:
    • getFunction

      public JsFunction getFunction()
      Returns:
      a function which will aggregate results per cell
    • setFunction

      public Aggregation setFunction(JsFunction function)
      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

      public List<String> getProperties()
      Returns:
      a collection of property names to pass as parameters to selected aggregation
    • setProperties

      public Aggregation setProperties(List<String> properties)
      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

      public Aggregation addProperties(String... properties)