Class InvalidSchema

java.lang.Object
com.illumon.iris.db.schema.InvalidSchema
All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable, Schema, TableDefinitionSchema, SchemaXml, Serializable

public class InvalidSchema extends Object implements SchemaXml
Placeholder schema for copy tables that delegate to nonexistent/invalid sources.
See Also:
  • Constructor Details

    • InvalidSchema

      public InvalidSchema(String namespace, String tableName, String message)
  • Method Details

    • getMutable

      @NotNull public MutableSchema getMutable()
      Description copied from interface: Schema
      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.
      Specified by:
      getMutable in interface Schema
      Returns:
      A mutable copy of this Schema.
    • getImmutable

      @NotNull public SchemaXml getImmutable()
      Description copied from interface: Schema
      Get an immutable copy of this Schema. May return itself if it is already immutable.
      Specified by:
      getImmutable in interface Schema
      Specified by:
      getImmutable in interface SchemaXml
      Returns:
      An immutable copy of this schema.
    • getImportSources

      @NotNull public List<ImportSource> getImportSources()
      Description copied from interface: Schema
      Get all defined ImportSources.
      Specified by:
      getImportSources in interface Schema
      Returns:
      all defined import sources, might be empty
    • getImportSources

      @NotNull public List<ImportSource> getImportSources(@NotNull String type)
      Description copied from interface: Schema
      Get all ImportSources of the given type.
      Specified by:
      getImportSources in interface Schema
      Parameters:
      type - the import source type
      Returns:
      all import sources of the given type, may be null.
    • getImportSource

      @Nullable public ImportSource getImportSource(@NotNull String type, @Nullable String sourceName)
      Description copied from interface: Schema
      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.
      Specified by:
      getImportSource in interface Schema
      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 public Map<String,String> getAttributes()
      Description copied from interface: Schema
      Get all top level attributes for this schema.
      Specified by:
      getAttributes in interface Schema
      Returns:
      a map containing all attributes set for this schema. Might be empty.
    • getAttributeValue

      @Nullable public String getAttributeValue(@NotNull String attributeName)
      Description copied from interface: Schema
      Get the value for the named attribute.
      Specified by:
      getAttributeValue in interface Schema
      Parameters:
      attributeName - the attribute to fetch
      Returns:
      the value for the attribute, or null if it is not set
    • getPartitionKeyFormula

      @Nullable public String getPartitionKeyFormula()
      Description copied from interface: Schema
      Get the partitioning key formula for this schema.
      Specified by:
      getPartitionKeyFormula in interface Schema
      Returns:
      the partitioning key formula if set, else null
    • hasLoggers

      public boolean hasLoggers()
      Description copied from interface: Schema
      Returns true if this schema has any Loggers or LoggerListeners.
      Specified by:
      hasLoggers in interface Schema
      Returns:
      true if this schema has any Loggers or LoggerListeners
    • hasListeners

      public boolean hasListeners()
      Description copied from interface: Schema
      Returns true if this schema has any Listeners or LoggerListeners.
      Specified by:
      hasListeners in interface Schema
      Returns:
      true if this schema has any Listeners or LoggerListeners
    • getLoggers

      @NotNull public List<Logger> getLoggers()
      Description copied from interface: Schema
      Get an immutable list of the Loggers for this schema. This includes LoggerListeners.
      Specified by:
      getLoggers in interface Schema
      Returns:
      an immutable list of Loggers
    • getListeners

      @NotNull public List<Listener> getListeners()
      Description copied from interface: Schema
      Get an immutable list of the Listeners for this schema. This includes LoggerListeners.
      Specified by:
      getListeners in interface Schema
      Returns:
      an immutable list of Listeners
    • getValidator

      @Nullable public Validator getValidator()
      Description copied from interface: Schema
      Get an immutable Validator for this schema.
      Specified by:
      getValidator in interface Schema
      Returns:
      a Validators if configured, or null
    • getNamespace

      @NotNull public String getNamespace()
      Specified by:
      getNamespace in interface TableDefinitionSchema
      Returns:
      The namespace of the table
    • getTableName

      @NotNull public String getTableName()
      Specified by:
      getTableName in interface TableDefinitionSchema
      Returns:
      The name of the table
    • getDefaultMergeFormat

      @NotNull public Database.StorageFormat getDefaultMergeFormat()
      Specified by:
      getDefaultMergeFormat in interface TableDefinitionSchema
      Returns:
      the preferred merge storage format
    • getMergeCodecName

      @Nullable public String getMergeCodecName(@NotNull String mergeFormat)
      Description copied from interface: TableDefinitionSchema
      For the specified merge format, return the defined codec name, if any.
      Specified by:
      getMergeCodecName in interface TableDefinitionSchema
      Parameters:
      mergeFormat - the merge format
      Returns:
      the codec name, if defined
    • getNamespaceSet

      @NotNull public NamespaceSet getNamespaceSet()
      Specified by:
      getNamespaceSet in interface TableDefinitionSchema
      Returns:
      The NamespaceSet to which this schema belongs
    • getTableType

      @NotNull public TableType getTableType(boolean intraday)
      Description copied from interface: TableDefinitionSchema
      Get the table type for this schema, depending on if it was an intraday table or not. Note that the intraday setting is ignored for User table types.
      Specified by:
      getTableType in interface TableDefinitionSchema
      Parameters:
      intraday - true if the returned type should reflect an intraday table
      Returns:
      The table type
    • getTableTypeV2

      @NotNull public TableType getTableTypeV2(boolean intraday)
      Description copied from interface: TableDefinitionSchema
      Get the table type for this schema, depending on if it was an intraday table or not. The intraday setting is used even for User table types.
      Specified by:
      getTableTypeV2 in interface TableDefinitionSchema
      Parameters:
      intraday - true if the returned type should reflect an intraday table
      Returns:
      The table type
    • getVersion

      @NotNull public SchemaVersion getVersion()
      Specified by:
      getVersion in interface TableDefinitionSchema
      Returns:
      The version of this schema
    • getTableDefinition

      @NotNull public TableDefinition getTableDefinition()
      Specified by:
      getTableDefinition in interface TableDefinitionSchema
      Returns:
      The TableDefinition corresponding to this Schema
    • getTableDescription

      @NotNull public String getTableDescription()
      Specified by:
      getTableDescription in interface TableDefinitionSchema
      Returns:
      The table description from the schema.
    • getColumnDescriptions

      @NotNull public Map<String,String> getColumnDescriptions()
      Description copied from interface: TableDefinitionSchema
      Get an unmodifiable map of column names to column descriptions. The map may not contain any columns that don't have descriptions.
      Specified by:
      getColumnDescriptions in interface TableDefinitionSchema
      Returns:
      A map of column names to column descriptions
    • getElement

      @NotNull public org.jdom2.Element getElement()
      Specified by:
      getElement in interface SchemaXml
      Returns:
      The underlying XML element describing this schema.
    • getImportSourceElement

      @Nullable public org.jdom2.Element getImportSourceElement(@NotNull String type, @Nullable String sourceName)
      Description copied from interface: SchemaXml
      Specified by:
      getImportSourceElement in interface SchemaXml
      Parameters:
      type - the import source type
      sourceName - the import source name, may be null
      Returns:
      the identified import source, or null if not found
    • getLoggerElements

      @NotNull public List<org.jdom2.Element> getLoggerElements()
      Description copied from interface: SchemaXml
      Schema.getLoggers(), with Loggers as XML Elements.
      Specified by:
      getLoggerElements in interface SchemaXml
      Returns:
      an immutable list of Loggers
    • getListenerElements

      @NotNull public List<org.jdom2.Element> getListenerElements()
      Description copied from interface: SchemaXml
      Schema.getListeners(), with Listeners as XML Elements.
      Specified by:
      getListenerElements in interface SchemaXml
      Returns:
      an immutable list of Listeners
    • getExtendedStorageElement

      @NotNull public org.jdom2.Element getExtendedStorageElement()
      Description copied from interface: SchemaXml
      Schema.getExtendedStorage(), as an XML Element.
      Specified by:
      getExtendedStorageElement in interface SchemaXml
      Returns:
      the ExtendedStorage Element if set, or null.
    • getDataIndexSets

      @NotNull public List<String[]> getDataIndexSets()
      Description copied from interface: Schema
      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.
      Specified by:
      getDataIndexSets in interface Schema
      Returns:
      a list of Data Index sets
    • getStorageType

      public int getStorageType()
      Description copied from interface: TableDefinitionSchema
      Get the StorageType as an integer enum value.
      Specified by:
      getStorageType in interface TableDefinitionSchema
      Returns:
      the storage type
    • getExtendedStorage

      @Nullable public ExtendedStorage getExtendedStorage()
      Description copied from interface: Schema
      Return the extended storage for this schema
      Specified by:
      getExtendedStorage in interface Schema
      Returns:
      an ExtendedStorage if present, or null
    • toString

      public String toString()
      Overrides:
      toString in class Object