Class Column

  • All Implemented Interfaces:
    DbObject

    public class Column
    extends AbstractDbObject
    Represents a column in a database table.
    Author:
    Matt Ward
    • Constructor Detail

      • Column

        public Column​(java.lang.String name)
      • Column

        public Column​(Table table,
                      java.lang.String name,
                      java.lang.String type,
                      boolean nullable)
        Construct a Column.
        Parameters:
        table - the parent table
        name - String
        type - String
        nullable - boolean
    • Method Detail

      • getType

        public java.lang.String getType()
        Returns:
        the type
      • setType

        public void setType​(java.lang.String type)
        Parameters:
        type - the type to set
      • isNullable

        public boolean isNullable()
        Returns:
        the nullable
      • setNullable

        public void setNullable​(boolean nullable)
        Parameters:
        nullable - the nullable to set
      • getOrder

        public int getOrder()
        Returns:
        the order
      • setOrder

        public void setOrder​(int order)
        Parameters:
        order - the order to set
      • isAutoIncrement

        public boolean isAutoIncrement()
        Returns:
        whether the column has an auto-increment flag set.
      • setAutoIncrement

        public void setAutoIncrement​(boolean autoIncrement)
        Parameters:
        autoIncrement - whether this column has the auto-increment flag set.
      • isCompareOrder

        public boolean isCompareOrder()
        Returns:
        the compareOrder
      • setCompareOrder

        public void setCompareOrder​(boolean compareOrder)
        Parameters:
        compareOrder - the compareOrder to set
      • accept

        public void accept​(DbObjectVisitor visitor)
        Description copied from interface: DbObject
        Allows a visitor to be invoked against this DbObject. Implementations should ensure that child objects are visited first (by calling accept on them) before invoking the visitor on itself.
        Parameters:
        visitor - DbObjectVisitor