Class DbColumn

  • All Implemented Interfaces:
    Serializable

    public class DbColumn
    extends Object
    implements Serializable
    Represents a database column definition.
    Since:
    2.0.0
    Author:
    Rui Vilao (rui.vilao@feedzai.com)
    See Also:
    Serialized Form
    • Method Detail

      • getName

        public String getName()
        Gets column name.
        Returns:
        The column name.
      • getDbColumnType

        public DbColumnType getDbColumnType()
        Gets the column type.
        Returns:
        The column type.
      • getSize

        public Integer getSize()
        Gets the size of the column if applicable (e.g. VARCHAR), null is returned when not applicable.
        Returns:
        The size or null if not applicable.
      • getColumnConstraints

        public List<DbColumnConstraint> getColumnConstraints()
        Gets the immutable list of constraints in the column.
        Returns:
        The immutable list of column constraints.
      • isAutoInc

        public boolean isAutoInc()
        Signals whether this column is auto incremental or not.
        Returns:
        true if the column is auto incremental, false otherwise.
      • getDefaultValue

        public K getDefaultValue()
        Gets the default value, null when not applicable.
        Returns:
        The default value.
      • isDefaultValueSet

        public boolean isDefaultValueSet()
        Signals if the default value is set or not.
        Returns:
        true if the default value is set, false otherwise.
      • isSizeSet

        public boolean isSizeSet()
        Signals if the size is set or not.
        Returns:
        true if the size is set, false otherwise.
      • newBuilder

        public DbColumn.Builder newBuilder()
        Returns a new builder out of this configuration.
        Returns:
        a new builder out of this configuration.