Class Table

All Implemented Interfaces:
DbObject

public class Table extends AbstractDbObject
Instances of this class represent a database table.
Author:
Matt Ward
  • Constructor Details

  • Method Details

    • getColumns

      public List<Column> getColumns()
      Returns:
      the columns
    • setColumns

      public void setColumns(Collection<Column> columns)
      Parameters:
      columns - the columns to set
    • getPrimaryKey

      public PrimaryKey getPrimaryKey()
      Returns:
      the primaryKey
    • hasPrimaryKey

      public boolean hasPrimaryKey()
      Returns:
      Whether there is a primary key on this table.
    • setPrimaryKey

      public void setPrimaryKey(PrimaryKey primaryKey)
      Parameters:
      primaryKey - the primaryKey to set
    • getForeignKeys

      public List<ForeignKey> getForeignKeys()
      Returns:
      the foreignKeys
    • setForeignKeys

      public void setForeignKeys(Collection<ForeignKey> foreignKeys)
      Parameters:
      foreignKeys - the foreignKeys to set
    • getIndexes

      public List<Index> getIndexes()
      Returns:
      the indexes
    • setIndexes

      public void setIndexes(Collection<Index> indexes)
      Parameters:
      indexes - the indexes 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 other, DiffContext ctx)
      Description copied from class: AbstractDbObject
      Override this method to provide subclass specific diffing logic.
      Overrides:
      doDiff in class AbstractDbObject
      Parameters:
      other - 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