Package io.debezium.relational
Class ColumnImpl
java.lang.Object
io.debezium.relational.ColumnImpl
- All Implemented Interfaces:
Column
,Comparable<Column>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final String
private final String
private final String
private final boolean
private final boolean
private final int
private final int
private final String
private final int
private final boolean
private final int
private final Integer
private final String
private final String
Fields inherited from interface io.debezium.relational.Column
UNSET_INT_VALUE
-
Constructor Summary
ModifierConstructorDescriptionprotected
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) 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) 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 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 enumboolean
boolean
Determine whether this column's has a default valueint
hashCode()
boolean
Determine whether this column's values are automatically incremented by the database.boolean
Determine whether this column's values are generated by the database.boolean
Determine whether this column is optional.int
jdbcType()
Get theJDBC type
for this columnint
length()
Get the maximum length of this column's values.name()
Get the name of the column.int
Get the database native type for this columnint
position()
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, wait
Methods 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:Column
Get the name of the column. -
position
public int position()Description copied from interface:Column
Get the position of the column in the table. -
jdbcType
public int jdbcType()Description copied from interface:Column
Get theJDBC type
for this column -
nativeType
public int nativeType()Description copied from interface:Column
Get the database native type for this column- Specified by:
nativeType
in interfaceColumn
- Returns:
- a type constant for the specific database
-
typeName
Description copied from interface:Column
Get the database-specific name of the column's data type. -
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 interfaceColumn
- Returns:
- the complete type expression
-
charsetName
Description copied from interface:Column
Get the database-specific name of the character set used by this column.- Specified by:
charsetName
in interfaceColumn
- 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. -
scale
Description copied from interface:Column
Get the scale of the column. -
isOptional
public boolean isOptional()Description copied from interface:Column
Determine whether this column is optional.- Specified by:
isOptional
in interfaceColumn
- Returns:
true
if it is optional, orfalse
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 interfaceColumn
- Returns:
true
if the values are auto-incremented, orfalse
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 interfaceColumn
- Returns:
true
if the values are generated, orfalse
otherwise
-
defaultValueExpression
Description copied from interface:Column
Get the database-specific complete expression defining the column's default value.- Specified by:
defaultValueExpression
in interfaceColumn
- 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 interfaceColumn
- Returns:
true
if the default value was provided, orfalse
otherwise
-
enumValues
Description copied from interface:Column
Get the list of values associated with the enum- Specified by:
enumValues
in interfaceColumn
- Returns:
- the list of enum values
-
comment
Description copied from interface:Column
Get the comment of the column. -
hashCode
public int hashCode() -
equals
-
toString
-
edit
Description copied from interface:Column
Obtain an editor that contains the same information as this column definition.
-