Interface Schema

All Superinterfaces:
com.fishlib.base.log.LogOutputAppendable, Serializable, TableDefinitionSchema
All Known Subinterfaces:
MutableSchema, SchemaXml
All Known Implementing Classes:
CopyTableSchema, InvalidSchema, Schema.AbstractSchema, Schema.Delegating

public interface Schema extends TableDefinitionSchema, Serializable
This defines a complete schema, including TableDefinitionSchema and additional metadata for import and logging.
  • Method Details

    • getMutable

      @NotNull MutableSchema getMutable()
      Get a mutable copy of this Schema. The returned copy is guaranteed to be decoupled from this instance, That is, changes to the returned mutable instance will not affect this instance.
      Returns:
      A mutable copy of this Schema.
    • getImmutable

      @NotNull Schema getImmutable()
      Get an immutable copy of this Schema. May return itself if it is already immutable.
      Returns:
      An immutable copy of this schema.
    • getImportSources

      @NotNull List<ImportSource> getImportSources()
      Get all defined ImportSources.
      Returns:
      all defined import sources, might be empty
    • getImportSources

      @NotNull List<ImportSource> getImportSources(@NotNull String type)
      Get all ImportSources of the given type.
      Parameters:
      type - the import source type
      Returns:
      all import sources of the given type, may be null.
    • getImportSource

      @Nullable ImportSource getImportSource(@NotNull String type, @Nullable String sourceName)
      Get the ImportSource with the given type and name. The first matching ImportSource is returned, where it is possible to have more than one. If sourceName is null, the first import source of the specified type will be returned.
      Parameters:
      type - the import source type
      sourceName - the import source name, may be null
      Returns:
      the identified import source, or null if not found
    • getAttributes

      @NotNull Map<String,String> getAttributes()
      Get all top level attributes for this schema.
      Returns:
      a map containing all attributes set for this schema. Might be empty.
    • getAttributeValue

      @Nullable String getAttributeValue(@NotNull String attributeName)
      Get the value for the named attribute.
      Parameters:
      attributeName - the attribute to fetch
      Returns:
      the value for the attribute, or null if it is not set
    • getPartitionKeyFormula

      @Nullable String getPartitionKeyFormula()
      Get the partitioning key formula for this schema.
      Returns:
      the partitioning key formula if set, else null
    • hasLoggers

      boolean hasLoggers()
      Returns true if this schema has any Loggers or LoggerListeners.
      Returns:
      true if this schema has any Loggers or LoggerListeners
    • hasListeners

      boolean hasListeners()
      Returns true if this schema has any Listeners or LoggerListeners.
      Returns:
      true if this schema has any Listeners or LoggerListeners
    • getLoggers

      @NotNull List<Logger> getLoggers()
      Get an immutable list of the Loggers for this schema. This includes LoggerListeners.
      Returns:
      an immutable list of Loggers
    • getListeners

      @NotNull List<Listener> getListeners()
      Get an immutable list of the Listeners for this schema. This includes LoggerListeners.
      Returns:
      an immutable list of Listeners
    • getValidator

      @Nullable Validator getValidator()
      Get an immutable Validator for this schema.
      Returns:
      a Validators if configured, or null
    • getDataIndexSets

      @NotNull List<String[]> getDataIndexSets()
      Get the set of Data Indexes for this table. Each element in the list is a set of columns which produce a key for which the table has been indexed by.
      Returns:
      a list of Data Index sets
    • getExtendedStorage

      @Nullable ExtendedStorage getExtendedStorage()
      Return the extended storage for this schema
      Returns:
      an ExtendedStorage if present, or null