Class Column

All Implemented Interfaces:
DbObject

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

    • Column

      public Column(String name)
    • Column

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

    • getType

      public String getType()
      Returns:
      the type
    • setType

      public void setType(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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractDbObject
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractDbObject
    • doDiff

      protected void doDiff(DbObject right, DiffContext ctx)
      Description copied from class: AbstractDbObject
      Override this method to provide subclass specific diffing logic.
      Overrides:
      doDiff in class AbstractDbObject
      Parameters:
      right - DbObject
      ctx - DiffContext
    • 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