Interface MutableSchema

All Superinterfaces:
com.fishlib.base.log.LogOutputAppendable, Schema, Serializable, TableDefinitionSchema

public interface MutableSchema extends Schema
A schema that can be mutated. This is really a prototype schema, in practice generated from element or table definition.
  • Method Details

    • setNamespace

      MutableSchema setNamespace(@NotNull String namespace)
    • setTableName

      MutableSchema setTableName(@NotNull String tableName)
    • setNamespaceSet

      MutableSchema setNamespaceSet(@NotNull NamespaceSet set)
    • setStorageType

      MutableSchema setStorageType(int storageType)
    • setExtendedStorage

      MutableSchema setExtendedStorage(@Nullable ExtendedStorage extendedStorage)
      Set the ExtendedStorage type. Note that this only makes sense if storageType is set to ExtendedStorage.
      Parameters:
      extendedStorageSpec - the extended storage type string. If null, The extendedStorage will be removed.
      Returns:
      this, for chaining
    • setPartitionKeyFormula

      MutableSchema setPartitionKeyFormula(@NotNull String formula)
    • removeColumn

      @NotNull MutableSchema removeColumn(@NotNull String columnName)
      Removes a column from this MutableSchema. The column will also be removed from Logger/Listener sections and ImportSources.
      Parameters:
      columnName - The column to be removed.
      Returns:
      A MutableSchema with the matching column removed.
      Throws:
      IllegalStateException - if no match is found.
    • renameColumn

      @NotNull MutableSchema renameColumn(@NotNull String oldName, @NotNull String newName)
      Renames a column in this MutableSchema. The column will also be renamed in Logger/Listener sections and ImportSources.

      Note that this method does not check for illegal or duplicate new column names. The suitability of the new name should be checked before calling this method.

      Parameters:
      oldName - The column to be renamed.
      newName - The name to be applied when renaming.
      Returns:
      A MutableSchema with the matching column removed.
      Throws:
      IllegalStateException - if no match is found.
    • setColumnType

      @NotNull MutableSchema setColumnType(@NotNull String columnName, @NotNull Class<?> columnType)
      Sets the datatype of a column in this MutableSchema.
      Parameters:
      columnName - The column to be renamed.
      columnType - The Class of the datatype to set for the column.
      Returns:
      A MutableSchema with the matching column removed.
      Throws:
      IllegalStateException - if no match is found.
    • setDataIndexSets

      MutableSchema setDataIndexSets(@NotNull List<String[]> dataIndexSets)
    • setInputTableStateSpec

      MutableSchema setInputTableStateSpec(@NotNull InputTableStateSpec inputTableStateSpec)
      Accepts an input table specification and applies it to the schema appropriately.
      Parameters:
      inputTableStateSpec - The input table specification.
      Returns:
      this, for e.g. chaining.