Class SchemaTable


  • public class SchemaTable
    extends Object
    The schema of table.

    Building of data

    While you are building data for testing, this object defines necessary to declare the data of a table.
    The name of table and keys(for deletion) is used by operators of data grain.

    Validation of data

    After the schema information is fetched from real database, this object contains the real schema defined in database. And, the auto-inspected keys if there is no one while building data.
    • Method Detail

      • getMetaDataWorker

        public MetaDataWorker getMetaDataWorker()
        Gets the worker of meta-data.
      • getName

        public String getName()
        Gets name of table.
        Returns:
        The name of table
      • getSchema

        public Optional<String> getSchema()
        Gets optional value of schema.
        Returns:
        the schema
      • getCatalog

        public Optional<String> getCatalog()
        Gets optional value of schema.
        Returns:
        the schema
      • getKeys

        public List<String> getKeys()
        Gets keys of table.
        Returns:
        The keys of table
      • getNumberOfColumns

        public int getNumberOfColumns()
        Gets number of columns.
        Returns:
        The number of columns
      • getColumns

        public List<SchemaColumn> getColumns()
        Gets the columns(sorted by added sequence).
        Returns:
        The columns
      • hasColumn

        public boolean hasColumn​(String columnName)
        Whether or not has a column by name.
        Parameters:
        columnName - The name of column
        Returns:
        true if the column is existing
      • getColumn

        public SchemaColumn getColumn​(String columnName)
        Gets the column definition by name.
        Parameters:
        columnName - The name of column
        Returns:
        The column definition
        Throws:
        IllegalArgumentException - If the name of column cannot be found for definition
      • getColumn

        public SchemaColumn getColumn​(int columnIndex)
        Gets the column definition by column index.
        Parameters:
        columnIndex - The index of column
        Returns:
        The column definition
        Throws:
        IllegalArgumentException - If the name of column cannot be found for definition
      • treatIdentifier

        public String treatIdentifier​(String identifier)
        Converts the case of identifier by meta-data of database.
        Parameters:
        identifier - The identifier to be processed
        Returns:
        The processed identifier
      • getFullTableName

        public String getFullTableName()
        Gets name of table with catalog and schema and keys.
        Use "<null>" if the value is not set
        Returns:
        The string can be used in collection
      • clone

        protected SchemaTable clone()
        Safe clone for the fields of this object.
        Overrides:
        clone in class Object
      • equals

        public boolean equals​(Object obj)
        Compares the name of table, columns, keys, and indexed columns.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Hashes the name of table, columns, keys, and indexed columns.
        Overrides:
        hashCode in class Object