Package io.debezium.relational
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 Summary
Fields Modifier and Type Field Description private booleanautoIncrementedprivate StringcharsetNameprivate Stringcommentprivate StringdefaultValueExpressionprivate List<String>enumValuesprivate booleangeneratedprivate booleanhasDefaultValueprivate intjdbcTypeprivate intlengthprivate Stringnameprivate intnativeTypeprivate booleanoptionalprivate intpositionprivate Integerscaleprivate StringtypeExpressionprivate StringtypeName-
Fields inherited from interface io.debezium.relational.Column
UNSET_INT_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedColumnImpl(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcharsetName()Get the database-specific name of the character set used by this column.Stringcomment()Get the comment of the column.Optional<String>defaultValueExpression()Get the database-specific complete expression defining the column's default value.ColumnEditoredit()Obtain an editor that contains the same information as this column definition.List<String>enumValues()Get the list of values associated with the enumbooleanequals(Object obj)booleanhasDefaultValue()Determine whether this column's has a default valueinthashCode()booleanisAutoIncremented()Determine whether this column's values are automatically incremented by the database.booleanisGenerated()Determine whether this column's values are generated by the database.booleanisOptional()Determine whether this column is optional.intjdbcType()Get theJDBC typefor this columnintlength()Get the maximum length of this column's values.Stringname()Get the name of the column.intnativeType()Get the database native type for this columnintposition()Get the position of the column in the table.Optional<Integer>scale()Get the scale of the column.StringtoString()StringtypeExpression()Get the database-specific complete expression defining the column's data type, including dimensions, length, precision, character sets, constraints, etc.StringtypeName()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, wait
-
Methods inherited from interface io.debezium.relational.Column
compareTo, isRequired, typeUsesCharset
-
-
-
-
Field Detail
-
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
-
comment
private final String comment
-
-
Constructor Detail
-
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 Detail
-
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
public String typeName()
Description copied from interface:ColumnGet the database-specific name of the column's data type.
-
typeExpression
public String 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
public String 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
public Optional<Integer> 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:
Column.isRequired()
-
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
public Optional<String> 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
public List<String> 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
public String comment()
Description copied from interface:ColumnGet the comment of the column.
-
edit
public ColumnEditor edit()
Description copied from interface:ColumnObtain an editor that contains the same information as this column definition.
-
-