connectors/rocketmq-connect-doris/src/main/java/org/apache/rocketmq/connect/doris/schema/column/ColumnDefinition.java [25:182]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class ColumnDefinition {

    /**
     * The nullability of a column.
     */
    public enum Nullability {
        NULL, NOT_NULL, UNKNOWN
    }

    /**
     * The mutability of a column.
     */
    public enum Mutability {
        READ_ONLY, MAYBE_WRITABLE, WRITABLE, UNKNOWN
    }

    private final ColumnId id;
    private final String typeName;
    private final int jdbcType;
    private final int displaySize;
    private final int precision;
    private final int scale;
    private final boolean autoIncremented;
    private final boolean caseSensitive;
    private final boolean searchable;
    private final boolean currency;
    private final boolean signedNumbers;
    private final boolean isPrimaryKey;
    private final Nullability nullability;
    private final Mutability mutability;
    private final String classNameForType;

    public ColumnDefinition(
            ColumnId id,
            int jdbcType,
            String typeName,
            String classNameForType,
            Nullability nullability,
            Mutability mutability,
            int precision,
            int scale,
            boolean signedNumbers,
            int displaySize,
            boolean autoIncremented,
            boolean caseSensitive,
            boolean searchable,
            boolean currency,
            boolean isPrimaryKey
    ) {
        this.id = id;
        this.typeName = typeName;
        this.jdbcType = jdbcType;
        this.displaySize = displaySize;
        this.precision = precision;
        this.scale = scale;
        this.autoIncremented = autoIncremented;
        this.caseSensitive = caseSensitive;
        this.searchable = searchable;
        this.currency = currency;
        this.signedNumbers = signedNumbers;
        this.nullability = nullability != null ? nullability : Nullability.UNKNOWN;
        this.mutability = mutability != null ? mutability : Mutability.MAYBE_WRITABLE;
        this.classNameForType = classNameForType;
        this.isPrimaryKey = isPrimaryKey;
    }


    /**
     * Indicates whether the column is automatically numbered.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isAutoIncrement() {
        return autoIncremented;
    }

    /**
     * Indicates whether the column's case matters.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isCaseSensitive() {
        return caseSensitive;
    }

    /**
     * Indicates whether the column can be used in a where clause.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isSearchable() {
        return searchable;
    }

    /**
     * Indicates whether the column is a cash value.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isCurrency() {
        return currency;
    }

    /**
     * Indicates whether the column is part of the table's primary key.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isPrimaryKey() {
        return isPrimaryKey;
    }

    /**
     * Indicates the nullability of values in the column.
     *
     * @return the nullability status of the given column; never null
     */
    public Nullability nullability() {
        return nullability;
    }

    /**
     * Indicates whether values in the column are optional. This is equivalent to calling:
     * <pre>
     *   nullability() == Nullability.NULL || nullability() == Nullability.UNKNOWN
     * </pre>
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isOptional() {
        return nullability == Nullability.NULL || nullability == Nullability.UNKNOWN;
    }

    /**
     * Indicates whether values in the column are signed numbers.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isSignedNumber() {
        return signedNumbers;
    }

    /**
     * Indicates the column's normal maximum width in characters.
     *
     * @return the normal maximum number of characters allowed as the width of the designated column
     */
    public int displaySize() {
        return displaySize;
    }

    /**
     * Get the column's identifier.
     *
     * @return column identifier; never null
     */
    public ColumnId id() {
        return id;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



connectors/rocketmq-connect-jdbc/src/main/java/org/apache/rocketmq/connect/jdbc/schema/column/ColumnDefinition.java [26:183]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public class ColumnDefinition {

    /**
     * The nullability of a column.
     */
    public enum Nullability {
        NULL, NOT_NULL, UNKNOWN
    }

    /**
     * The mutability of a column.
     */
    public enum Mutability {
        READ_ONLY, MAYBE_WRITABLE, WRITABLE, UNKNOWN
    }

    private final ColumnId id;
    private final String typeName;
    private final int jdbcType;
    private final int displaySize;
    private final int precision;
    private final int scale;
    private final boolean autoIncremented;
    private final boolean caseSensitive;
    private final boolean searchable;
    private final boolean currency;
    private final boolean signedNumbers;
    private final boolean isPrimaryKey;
    private final Nullability nullability;
    private final Mutability mutability;
    private final String classNameForType;

    public ColumnDefinition(
            ColumnId id,
            int jdbcType,
            String typeName,
            String classNameForType,
            Nullability nullability,
            Mutability mutability,
            int precision,
            int scale,
            boolean signedNumbers,
            int displaySize,
            boolean autoIncremented,
            boolean caseSensitive,
            boolean searchable,
            boolean currency,
            boolean isPrimaryKey
    ) {
        this.id = id;
        this.typeName = typeName;
        this.jdbcType = jdbcType;
        this.displaySize = displaySize;
        this.precision = precision;
        this.scale = scale;
        this.autoIncremented = autoIncremented;
        this.caseSensitive = caseSensitive;
        this.searchable = searchable;
        this.currency = currency;
        this.signedNumbers = signedNumbers;
        this.nullability = nullability != null ? nullability : Nullability.UNKNOWN;
        this.mutability = mutability != null ? mutability : Mutability.MAYBE_WRITABLE;
        this.classNameForType = classNameForType;
        this.isPrimaryKey = isPrimaryKey;
    }


    /**
     * Indicates whether the column is automatically numbered.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isAutoIncrement() {
        return autoIncremented;
    }

    /**
     * Indicates whether the column's case matters.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isCaseSensitive() {
        return caseSensitive;
    }

    /**
     * Indicates whether the column can be used in a where clause.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isSearchable() {
        return searchable;
    }

    /**
     * Indicates whether the column is a cash value.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isCurrency() {
        return currency;
    }

    /**
     * Indicates whether the column is part of the table's primary key.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isPrimaryKey() {
        return isPrimaryKey;
    }

    /**
     * Indicates the nullability of values in the column.
     *
     * @return the nullability status of the given column; never null
     */
    public Nullability nullability() {
        return nullability;
    }

    /**
     * Indicates whether values in the column are optional. This is equivalent to calling:
     * <pre>
     *   nullability() == Nullability.NULL || nullability() == Nullability.UNKNOWN
     * </pre>
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isOptional() {
        return nullability == Nullability.NULL || nullability == Nullability.UNKNOWN;
    }

    /**
     * Indicates whether values in the column are signed numbers.
     *
     * @return <code>true</code> if so; <code>false</code> otherwise
     */
    public boolean isSignedNumber() {
        return signedNumbers;
    }

    /**
     * Indicates the column's normal maximum width in characters.
     *
     * @return the normal maximum number of characters allowed as the width of the designated column
     */
    public int displaySize() {
        return displaySize;
    }

    /**
     * Get the column's identifier.
     *
     * @return column identifier; never null
     */
    public ColumnId id() {
        return id;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



