Class TableImpl

java.lang.Object
io.debezium.relational.TableImpl
All Implemented Interfaces:
Table

final class TableImpl extends Object implements Table
  • Field Details

    • id

      private final TableId id
    • columnDefs

      private final List<Column> columnDefs
    • pkColumnNames

      private final List<String> pkColumnNames
    • columnsByLowercaseName

      private final Map<String,Column> columnsByLowercaseName
    • defaultCharsetName

      private final String defaultCharsetName
    • comment

      private final String comment
    • attributes

      private final List<Attribute> attributes
  • Constructor Details

  • Method Details

    • id

      public TableId id()
      Description copied from interface: Table
      Get the identifier for this table.
      Specified by:
      id in interface Table
      Returns:
      the identifier; never null
    • primaryKeyColumnNames

      public List<String> primaryKeyColumnNames()
      Description copied from interface: Table
      The list of column names that make up the primary key for this table.
      Specified by:
      primaryKeyColumnNames in interface Table
      Returns:
      the immutable list of column names that make up the primary key; never null but possibly empty
    • columns

      public List<Column> columns()
      Description copied from interface: Table
      Get the definitions for the columns in this table, in the same order in which the table defines them.
      Specified by:
      columns in interface Table
      Returns:
      the immutable and ordered list of definitions; never null
    • retrieveColumnNames

      public List<String> retrieveColumnNames()
      Description copied from interface: Table
      The list of column names that make up this table.

      Note: If feasible, call Table.columns() instead, e.g. if just interested in the number of columns.

      Specified by:
      retrieveColumnNames in interface Table
      Returns:
      the immutable list of column names ; never null but possibly empty
    • columnWithName

      public Column columnWithName(String name)
      Description copied from interface: Table
      Get the definition for the column in this table with the supplied name. The case of the supplied name does not matter.
      Specified by:
      columnWithName in interface Table
      Parameters:
      name - the case-insensitive name of the column
      Returns:
      the column definition, or null if there is no column with the given name
    • defaultCharsetName

      public String defaultCharsetName()
      Description copied from interface: Table
      Get the database-specific name of the default character set used by columns in this table.
      Specified by:
      defaultCharsetName in interface Table
      Returns:
      the database-specific character set name used by default in columns of this table, or null if there is no such default character set name defined on the table
    • comment

      public String comment()
      Description copied from interface: Table
      Get the comment of the table.
      Specified by:
      comment in interface Table
      Returns:
      the table comment; may be null if not set
    • attributes

      public List<Attribute> attributes()
      Description copied from interface: Table
      Get the attributes of the table.
      Specified by:
      attributes in interface Table
      Returns:
      the table attributes; may be null if not set
    • attributeWithName

      public Attribute attributeWithName(String name)
      Description copied from interface: Table
      Get the definition for an attribute in this table with the supplied name.
      Specified by:
      attributeWithName in interface Table
      Parameters:
      name - the case-insensitive name of the attribute
      Returns:
      the attribute definition, or null if there is no attribute with the given name
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public void toString(StringBuilder sb, String prefix)
    • edit

      public TableEditor edit()
      Description copied from interface: Table
      Obtain an editor that contains the same information as this table definition.
      Specified by:
      edit in interface Table
      Returns:
      the editor; never null