Class RollupDefinition.Builder

java.lang.Object
com.illumon.iris.treetable.RollupDefinition.Builder
Enclosing class:
RollupDefinition

public static class RollupDefinition.Builder extends Object
A Builder class to define rollups and attach them to tables as predefined rollups. Instances may be retained to hold references to pre-created rollups.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public RollupDefinition.Builder name(String name)
      Set the name for the rollup.
      Parameters:
      name - the name
      Returns:
      this builder
    • groupingColumns

      public RollupDefinition.Builder groupingColumns(String... columns)
      Set the grouping columns.
      Parameters:
      columns - the grouping columns
      Returns:
      this builder
    • groupingColumns

      public RollupDefinition.Builder groupingColumns(Collection<String> columns)
      Set the grouping columns.
      Parameters:
      columns - the grouping columns
      Returns:
      this builder
    • agg

      public RollupDefinition.Builder agg(AggType type, String... columns)
      Set the columns to include for the specified aggregation.
      Parameters:
      type - the aggregation
      columns - the columns to aggregate
      Returns:
      this builder
    • agg

      public RollupDefinition.Builder agg(AggType type, Collection<String> columns)
      Set the columns to include for the specified aggregation.
      Parameters:
      type - the aggregation
      columns - the columns to aggregate
      Returns:
      this builder
    • includeConstituents

      public RollupDefinition.Builder includeConstituents(boolean include)
      Set if the result table should include constituents. NOTE: This is currently unsupported.
      Parameters:
      include - if constituent rows should be included
      Returns:
      this builder
    • includeOriginalColumns

      public RollupDefinition.Builder includeOriginalColumns(boolean include)
      Set if the result table should include original columns. NOTE: This is currently unsupported.
      Parameters:
      include - if original columns should be included
      Returns:
      this builder
    • withDescriptions

      @ScriptApi public RollupDefinition.Builder withDescriptions(boolean includeDescriptions)
      Set if the rollup should include column descriptions for each column.
      Parameters:
      includeDescriptions - true if the rollup should add column descriptions
      Returns:
      this builder
    • build

      Create a RollupDefinition from the state of this builder.
      Returns:
      this a new definition.
      Throws:
      UncheckedDeephavenException - if the definition is not complete.
    • buildAndAttach

      public RollupDefinition.Builder buildAndAttach(Table attachTo) throws UncheckedDeephavenException
      Create the rollup definition and attach it to the specified table as a predefined rollup.
      Parameters:
      attachTo - the table to attach to
      Returns:
      this builder
      Throws:
      UncheckedDeephavenException - if the builder has an error
    • buildAndAttach

      public RollupDefinition.Builder buildAndAttach(Table attachTo, boolean preCreate) throws UncheckedDeephavenException
      Create the rollup definition and attach it to the specified table as a predefined rollup. Additionally, create and hold a reference to the rollup table if requested.
      Parameters:
      attachTo - the table to attach to
      Returns:
      this builder
      Throws:
      UncheckedDeephavenException - If the builder has an error