Class ColumnImpl

java.lang.Object
io.debezium.relational.ColumnImpl
All Implemented Interfaces:
Column, Comparable<Column>

final class ColumnImpl extends Object implements Column, Comparable<Column>
  • Field Details

    • name

      private final String name
    • position

      private final int position
    • jdbcType

      private final int jdbcType
    • nativeType

      private final int nativeType
    • typeName

      private final String typeName
    • typeExpression

      private final String typeExpression
    • charsetName

      private final String charsetName
    • length

      private final int length
    • scale

      private final Integer scale
    • optional

      private final boolean optional
    • autoIncremented

      private final boolean autoIncremented
    • generated

      private final boolean generated
    • defaultValueExpression

      private final String defaultValueExpression
    • hasDefaultValue

      private final boolean hasDefaultValue
    • enumValues

      private final List<String> enumValues
    • comment

      private final String comment
  • Constructor Details

    • ColumnImpl

      protected ColumnImpl(String columnName, int position, int jdbcType, int componentType, String typeName, String typeExpression, String charsetName, String defaultCharsetName, int columnLength, Integer columnScale, boolean optional, boolean autoIncremented, boolean generated)
    • ColumnImpl

      protected ColumnImpl(String columnName, int position, int jdbcType, int nativeType, String typeName, String typeExpression, String charsetName, String defaultCharsetName, int columnLength, Integer columnScale, boolean optional, boolean autoIncremented, boolean generated, String defaultValueExpression, boolean hasDefaultValue)
    • ColumnImpl

      protected ColumnImpl(String columnName, int position, int jdbcType, int nativeType, String typeName, String typeExpression, String charsetName, String defaultCharsetName, int columnLength, Integer columnScale, List<String> enumValues, boolean optional, boolean autoIncremented, boolean generated, String defaultValueExpression, boolean hasDefaultValue, String comment)
  • Method Details

    • name

      public String name()
      Description copied from interface: Column
      Get the name of the column.
      Specified by:
      name in interface Column
      Returns:
      the column name; never null
    • position

      public int position()
      Description copied from interface: Column
      Get the position of the column in the table.
      Specified by:
      position in interface Column
      Returns:
      the 1-based position
    • jdbcType

      public int jdbcType()
      Description copied from interface: Column
      Get the JDBC type for this column
      Specified by:
      jdbcType in interface Column
      Returns:
      the type constant
    • nativeType

      public int nativeType()
      Description copied from interface: Column
      Get the database native type for this column
      Specified by:
      nativeType in interface Column
      Returns:
      a type constant for the specific database
    • typeName

      public String typeName()
      Description copied from interface: Column
      Get the database-specific name of the column's data type.
      Specified by:
      typeName in interface Column
      Returns:
      the name of the type
    • typeExpression

      public String typeExpression()
      Description copied from interface: Column
      Get the database-specific complete expression defining the column's data type, including dimensions, length, precision, character sets, constraints, etc.
      Specified by:
      typeExpression in interface Column
      Returns:
      the complete type expression
    • charsetName

      public String charsetName()
      Description copied from interface: Column
      Get the database-specific name of the character set used by this column.
      Specified by:
      charsetName in interface Column
      Returns:
      the database-specific character set name, or null if the column's data type doesn't use character sets or no character set is specified
    • length

      public int length()
      Description copied from interface: Column
      Get the maximum length of this column's values. For numeric columns, this represents the precision.
      Specified by:
      length in interface Column
      Returns:
      the length of the column
    • scale

      public Optional<Integer> scale()
      Description copied from interface: Column
      Get the scale of the column.
      Specified by:
      scale in interface Column
      Returns:
      the scale if it applies to this type
    • isOptional

      public boolean isOptional()
      Description copied from interface: Column
      Determine whether this column is optional.
      Specified by:
      isOptional in interface Column
      Returns:
      true if it is optional, or false otherwise
      See Also:
    • isAutoIncremented

      public boolean isAutoIncremented()
      Description copied from interface: Column
      Determine whether this column's values are automatically incremented by the database.
      Specified by:
      isAutoIncremented in interface Column
      Returns:
      true if the values are auto-incremented, or false otherwise
    • isGenerated

      public boolean isGenerated()
      Description copied from interface: Column
      Determine whether this column's values are generated by the database.
      Specified by:
      isGenerated in interface Column
      Returns:
      true if the values are generated, or false otherwise
    • defaultValueExpression

      public Optional<String> defaultValueExpression()
      Description copied from interface: Column
      Get the database-specific complete expression defining the column's default value.
      Specified by:
      defaultValueExpression in interface Column
      Returns:
      the complete type expression
    • hasDefaultValue

      public boolean hasDefaultValue()
      Description copied from interface: Column
      Determine whether this column's has a default value
      Specified by:
      hasDefaultValue in interface Column
      Returns:
      true if the default value was provided, or false otherwise
    • enumValues

      public List<String> enumValues()
      Description copied from interface: Column
      Get the list of values associated with the enum
      Specified by:
      enumValues in interface Column
      Returns:
      the list of enum values
    • comment

      public String comment()
      Description copied from interface: Column
      Get the comment of the column.
      Specified by:
      comment in interface Column
      Returns:
      the column comment; may be null if not set
    • 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
    • edit

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