Class RedefinableTable<IMPL_TYPE extends RedefinableTable<IMPL_TYPE>>

All Implemented Interfaces:
TableOperations<Table,Table>, TableOperationsDefaults<Table,Table>, LogOutputAppendable, LivenessManager, LivenessNode, LivenessReferent, AttributeMap<Table>, GridAttributes<Table>, HasParentPerformanceIds, NotificationStepReceiver, NotificationStepSource, TableDefaults, Table, DynamicNode, NotificationQueue.Dependency, SystemicObject<Table>, LongSizedDataStructure, Serializable
Direct Known Subclasses:
DeferredViewTable, SourceTable

public abstract class RedefinableTable<IMPL_TYPE extends RedefinableTable<IMPL_TYPE>> extends UncoalescedTable<IMPL_TYPE>
An uncoalesced table that may be redefined without triggering a UncoalescedTable.coalesce().
See Also:
  • Constructor Details

    • RedefinableTable

      protected RedefinableTable(@NotNull @NotNull TableDefinition definition, @NotNull @NotNull String description)
  • Method Details

    • view

      public Table view(Collection<? extends Selectable> selectables)
      Specified by:
      view in interface TableOperations<Table,Table>
      Overrides:
      view in class UncoalescedTable<IMPL_TYPE extends RedefinableTable<IMPL_TYPE>>
    • updateView

      public Table updateView(Collection<? extends Selectable> selectables)
      Specified by:
      updateView in interface TableOperations<Table,Table>
      Overrides:
      updateView in class UncoalescedTable<IMPL_TYPE extends RedefinableTable<IMPL_TYPE>>
    • dropColumns

      public Table dropColumns(String... columnNames)
      Description copied from interface: TableOperations
      Creates a new table without the columnNames from this.
      Specified by:
      dropColumns in interface TableOperations<Table,Table>
      Overrides:
      dropColumns in class UncoalescedTable<IMPL_TYPE extends RedefinableTable<IMPL_TYPE>>
      Parameters:
      columnNames - the columns to drop
      Returns:
      the table
    • renameColumns

      public Table renameColumns(Collection<Pair> pairs)
      Description copied from interface: Table
      Produce a new table with the specified columns renamed using the specified pairs. The renames are simultaneous and unordered, enabling direct swaps between column names. The resulting table retains the original column ordering after applying the specified renames.

      NOTE: If a new column name conflicts with an existing column name in the table, the existing column will be silently replaced.

      IllegalArgumentException will be thrown:

      • if a source column does not exist
      • if a source column is used more than once
      • if a destination column is used more than once
      Specified by:
      renameColumns in interface Table
      Overrides:
      renameColumns in class UncoalescedTable<IMPL_TYPE extends RedefinableTable<IMPL_TYPE>>
      Parameters:
      pairs - The columns to rename
      Returns:
      The new table, with the columns renamed
    • redefine

      protected abstract Table redefine(TableDefinition newDefinition)
      Redefine this table with a subset of its current columns.
      Parameters:
      newDefinition - A TableDefinition with a subset of this RedefinableTable's ColumnDefinitions.
      Returns:
      the redefined table
    • redefine

      protected abstract Table redefine(TableDefinition newDefinitionExternal, TableDefinition newDefinitionInternal, SelectColumn[] viewColumns)
      Redefine this table with a subset of its current columns, with a potentially-differing definition to present to external interfaces and one or more select columns to apply.
      Parameters:
      newDefinitionExternal - A TableDefinition that represents the results of redefine(newDefinitionInternal).view(viewColumns).
      newDefinitionInternal - A TableDefinition with a subset of this RedefinableTable's ColumnDefinitions.
      viewColumns - A set of SelectColumns to apply in order to transform a table with newDefinitionInternal to a table with newDefinitionExternal.
      Returns:
      the redefined table