Package io.debezium.relational
Class ColumnImpl
java.lang.Object
io.debezium.relational.ColumnImpl
- All Implemented Interfaces:
Column,Comparable<Column>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final Stringprivate final Stringprivate final Stringprivate final booleanprivate final booleanprivate final intprivate final intprivate final Stringprivate final intprivate final booleanprivate final intprivate final Integerprivate final Stringprivate final StringFields inherited from interface io.debezium.relational.Column
UNSET_INT_VALUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedColumnImpl(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) protectedColumnImpl(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) protectedColumnImpl(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 Summary
Modifier and TypeMethodDescriptionGet the database-specific name of the character set used by this column.comment()Get the comment of the column.Get the database-specific complete expression defining the column's default value.edit()Obtain an editor that contains the same information as this column definition.Get the list of values associated with the enumbooleanbooleanDetermine whether this column's has a default valueinthashCode()booleanDetermine whether this column's values are automatically incremented by the database.booleanDetermine whether this column's values are generated by the database.booleanDetermine whether this column is optional.intjdbcType()Get theJDBC typefor this columnintlength()Get the maximum length of this column's values.name()Get the name of the column.intGet the database native type for this columnintposition()Get the position of the column in the table.scale()Get the scale of the column.toString()Get the database-specific complete expression defining the column's data type, including dimensions, length, precision, character sets, constraints, etc.typeName()Get the database-specific name of the column's data type.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.debezium.relational.Column
compareTo, isRequired, typeUsesCharset
-
Field Details
-
name
-
position
private final int position -
jdbcType
private final int jdbcType -
nativeType
private final int nativeType -
typeName
-
typeExpression
-
charsetName
-
length
private final int length -
scale
-
optional
private final boolean optional -
autoIncremented
private final boolean autoIncremented -
generated
private final boolean generated -
defaultValueExpression
-
hasDefaultValue
private final boolean hasDefaultValue -
enumValues
-
comment
-
-
Constructor Details
-
ColumnImpl
-
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
Description copied from interface:ColumnGet the name of the column. -
position
public int position()Description copied from interface:ColumnGet the position of the column in the table. -
jdbcType
public int jdbcType()Description copied from interface:ColumnGet theJDBC typefor this column -
nativeType
public int nativeType()Description copied from interface:ColumnGet the database native type for this column- Specified by:
nativeTypein interfaceColumn- Returns:
- a type constant for the specific database
-
typeName
Description copied from interface:ColumnGet the database-specific name of the column's data type. -
typeExpression
Description copied from interface:ColumnGet the database-specific complete expression defining the column's data type, including dimensions, length, precision, character sets, constraints, etc.- Specified by:
typeExpressionin interfaceColumn- Returns:
- the complete type expression
-
charsetName
Description copied from interface:ColumnGet the database-specific name of the character set used by this column.- Specified by:
charsetNamein interfaceColumn- Returns:
- the database-specific character set name, or null if the column's data type doesn't
use character setsor no character set is specified
-
length
public int length()Description copied from interface:ColumnGet the maximum length of this column's values. For numeric columns, this represents the precision. -
scale
Description copied from interface:ColumnGet the scale of the column. -
isOptional
public boolean isOptional()Description copied from interface:ColumnDetermine whether this column is optional.- Specified by:
isOptionalin interfaceColumn- Returns:
trueif it is optional, orfalseotherwise- See Also:
-
isAutoIncremented
public boolean isAutoIncremented()Description copied from interface:ColumnDetermine whether this column's values are automatically incremented by the database.- Specified by:
isAutoIncrementedin interfaceColumn- Returns:
trueif the values are auto-incremented, orfalseotherwise
-
isGenerated
public boolean isGenerated()Description copied from interface:ColumnDetermine whether this column's values are generated by the database.- Specified by:
isGeneratedin interfaceColumn- Returns:
trueif the values are generated, orfalseotherwise
-
defaultValueExpression
Description copied from interface:ColumnGet the database-specific complete expression defining the column's default value.- Specified by:
defaultValueExpressionin interfaceColumn- Returns:
- the complete type expression
-
hasDefaultValue
public boolean hasDefaultValue()Description copied from interface:ColumnDetermine whether this column's has a default value- Specified by:
hasDefaultValuein interfaceColumn- Returns:
trueif the default value was provided, orfalseotherwise
-
enumValues
Description copied from interface:ColumnGet the list of values associated with the enum- Specified by:
enumValuesin interfaceColumn- Returns:
- the list of enum values
-
comment
Description copied from interface:ColumnGet the comment of the column. -
hashCode
public int hashCode() -
equals
-
toString
-
edit
Description copied from interface:ColumnObtain an editor that contains the same information as this column definition.
-