Interface HierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>>

All Superinterfaces:
AttributeMap<IFACE_TYPE>, GridAttributes<IFACE_TYPE>, LivenessReferent
All Known Subinterfaces:
RollupTable, TreeTable
All Known Implementing Classes:
RollupTableImpl, TreeTableImpl

public interface HierarchicalTable<IFACE_TYPE extends HierarchicalTable<IFACE_TYPE>> extends AttributeMap<IFACE_TYPE>, GridAttributes<IFACE_TYPE>, LivenessReferent
Base interface for the results of operations that produce a hierarchy of table nodes.
  • Field Details

    • KEY_TABLE_ACTION_EXPAND

      static final byte KEY_TABLE_ACTION_EXPAND
      Key table action value specifying that a node should be expanded. This is the default action if no action column is specified.
      See Also:
    • KEY_TABLE_ACTION_EXPAND_ALL

      static final byte KEY_TABLE_ACTION_EXPAND_ALL
      Key table action value specifying that a node should be expanded, and that its descendants should all be expanded unless they are included in the key table with a contraction or their parent is included with a simple expansion.
      See Also:
    • KEY_TABLE_ACTION_CONTRACT

      static final byte KEY_TABLE_ACTION_CONTRACT
      Key table action value specifying that a node should be contracted. The node must descend from a node that was expanded with its descendants, or this key table row will have no effect.
      See Also:
  • Method Details

    • getDescription

      String getDescription()
      Get a description of this HierarchicalTable.
      Returns:
      The description
    • getSource

      Table getSource()
      Get the source Table that was aggregated to make this HierarchicalTable.
      Returns:
      The source table
    • getRoot

      Table getRoot()
      Get the root Table that represents the top level of this HierarchicalTable.
      Returns:
      The root table
    • getEmptyExpansionsTable

      Table getEmptyExpansionsTable()
      Get a re-usable, static key Table with zero rows that will cause a snapshot to expand only the default nodes.
      Returns:
      An empty key Table for default expansions
    • getRowExpandedColumn

      ColumnName getRowExpandedColumn()
      Get the name of a column of Booleans that denotes whether a row is expanded (or expandable). It takes on the value null for rows that are not expandable, false for expandable but unexpanded rows, and true for expanded rows. This column is "synthetic"; that is, it's not part of the data, but rather calculated as part of snapshotting.
      Returns:
      The name of a column that denotes whether a row is expanded or expandable
    • getRowDepthColumn

      ColumnName getRowDepthColumn()
      Get the name of a column that denotes row depth. This column is "synthetic"; that is, it's not part of the data, but rather calculated as part of snapshotting.
      Returns:
      The name of a column that denotes row depth
    • getStructuralColumnDefinitions

      List<ColumnDefinition<?>> getStructuralColumnDefinitions()
      Get the definitions for all structural columns. Structural columns are synthetic columns that allow snapshot consumers to make sense of the relationship between rows, and should always be included in the requested columns set when snapshotting a HierarchicalTable. This list includes the row-depth column and the row-expanded column, but never includes type-specific node-level columns.
      Returns:
      A list of @link ColumnDefinition definitions} for all structural columns
    • getAvailableColumnDefinitions

      List<ColumnDefinition<?>> getAvailableColumnDefinitions()
      Get the definitions for all available columns that may be requested in a snapshot.

      The result will always begin with the structural columns, which are then followed by type-specific node-level columns.

      Returns:
      A list of definitions for all available columns that may be requested in a snapshot
    • makeSnapshotState

      HierarchicalTable.SnapshotState makeSnapshotState()
      Make a re-usable snapshot state. The result will ensure liveness for this HierarchicalTable if the source isRefreshing, and callers must similarly retain the result for the duration of their usage under the same conditions.
    • snapshot

      long snapshot(@NotNull @NotNull HierarchicalTable.SnapshotState snapshotState, @NotNull @NotNull Table keyTable, @Nullable @Nullable ColumnName keyTableActionColumn, @Nullable @Nullable BitSet columns, @NotNull @NotNull RowSequence rows, @NotNull @NotNull WritableChunk<? super Values>[] destinations)
      Take a snapshot of the data in the grid defined by columns, rows, and the directives in keyTable. Accumulate the results in destinations.
      Parameters:
      snapshotState - Snapshot state object used to cache data across invocations. Must have been created by this HierarchicalTable with makeSnapshotState().
      keyTable - Type-specific "key" table specifying expanded and contracted nodes
      keyTableActionColumn - The name of a column of byte on keyTable that specifies whether nodes should be expanded, expanded with their descendants, or contracted. If null, all rows are treated as simple expansions.
      columns - Optional bit-set of columns to include, null to include all columns
      rows - Position-space rows to include from the expanded data specified by keyTable
      destinations - The destination chunks
      Returns:
      The total expanded data size or an estimate thereof