Interface RollupTable

All Superinterfaces:
AttributeMap<RollupTable>, GridAttributes<RollupTable>, HierarchicalTable<RollupTable>, LivenessReferent
All Known Implementing Classes:
RollupTableImpl

public interface RollupTable extends HierarchicalTable<RollupTable>
Interface for the result of rollup operations.
  • Method Details

    • getAggregations

      Collection<? extends Aggregation> getAggregations()
      Get the aggregations for the rollup operation.
      Returns:
      The rollup aggregations
    • includesConstituents

      boolean includesConstituents()
      Are the source table's constituent rows included at the lowest level of the rollup?
      Returns:
      Whether constituents are included
    • getLeafNodeType

      @FinalDefault default RollupTable.NodeType getLeafNodeType()
      Get the RollupTable.NodeType at this RollupTable's leaf level.
      Returns:
      The leaf node type
    • getGroupByColumns

      Collection<? extends ColumnName> getGroupByColumns()
      Get the group-by columns for the rollup operation.
      Returns:
      The group-by columns
    • getNodeDefinition

      TableDefinition getNodeDefinition(@NotNull @NotNull RollupTable.NodeType nodeType)
      Get the TableDefinition that should be exposed to node table consumers, e.g. UI-driven snapshots. This excludes "internal" columns used to organize the rollup or support operations, as well as the row-depth column and row-expanded column, but includes formatting columns.
      Parameters:
      nodeType - The node type to get the TableDefinition for
      Returns:
      The externally-visible node TableDefinition for the requested nodeType
      Throws:
      IllegalArgumentException - If Constituent is specified when includesConstituents() == false
    • withFilter

      RollupTable withFilter(Filter filter)
      Apply a filter to the group-by columns of this RollupTable in order to produce a new RollupTable.
      Parameters:
      filter - The filter to apply; must only reference the group-by columns and must not use column arrays
      Returns:
      The new RollupTable
    • makeNodeOperationsRecorder

      RollupTable.NodeOperationsRecorder makeNodeOperationsRecorder(@NotNull @NotNull RollupTable.NodeType nodeType)
      Get a recorder for per-node operations to apply during snapshots of the requested RollupTable.NodeType.
      Parameters:
      nodeType - The node type that operations will be applied to
      Returns:
      The new recorder
      Throws:
      IllegalArgumentException - If Constituent is specified when includesConstituents() == false
    • withNodeOperations

      RollupTable withNodeOperations(@NotNull @NotNull RollupTable.NodeOperationsRecorder... nodeOperations)
      Get a new RollupTable that will apply the recorded operations to nodes when gathering snapshots. Operations will be applied only to the node type supplied when the elements of nodeOperations were initially created.
      Parameters:
      nodeOperations - The node-level operations to apply. Elements must have been initially supplied by makeNodeOperationsRecorder(NodeType) from this RollupTable.
      Returns:
      The new RollupTable
    • translateAggregatedNodeOperationsForConstituentNodes

      RollupTable.NodeOperationsRecorder translateAggregatedNodeOperationsForConstituentNodes(@NotNull @NotNull RollupTable.NodeOperationsRecorder aggregatedNodeOperationsToTranslate)
      Translate node operations for aggregated nodes to the closest equivalent for a constituent node. May only be invoked if includesConstituents() == true.
      Parameters:
      aggregatedNodeOperationsToTranslate - Node-level operations for aggregated nodes, initially supplied by makeNodeOperationsRecorder(NodeType.Aggregated).
      Returns:
      Node-level operations for constituent nodes