Class AddColumnChange

java.lang.Object
org.jumpmind.db.alter.TableChangeImplBase
org.jumpmind.db.alter.AddColumnChange
All Implemented Interfaces:
IModelChange, TableChange

public class AddColumnChange extends TableChangeImplBase
Represents the addition of a column to a table.
  • Constructor Details

    • AddColumnChange

      public AddColumnChange(Table table, Column newColumn, Column previousColumn, Column nextColumn)
      Creates a new change object.
      Parameters:
      table - The table to add the column to
      newColumn - The new column
      previousColumn - The column after which the new column should be added
      nextColumn - The column before which the new column should be added
  • Method Details

    • getNewColumn

      public Column getNewColumn()
      Returns the new column.
      Returns:
      The new column
    • getPreviousColumn

      public Column getPreviousColumn()
      Returns the column after which the new column should be added.
      Returns:
      The previous column
    • getNextColumn

      public Column getNextColumn()
      Returns the column before which the new column should be added.
      Returns:
      The next column
    • isAtEnd

      public boolean isAtEnd()
      Determines whether the column is added at the end (when applied in the order of creation of the changes).
      Returns:
      true if the column is added at the end
    • setAtEnd

      public void setAtEnd(boolean atEnd)
      Specifies whether the column is added at the end (when applied in the order of creation of the changes).
      Parameters:
      atEnd - true if the column is added at the end
    • apply

      public void apply(Database database, boolean caseSensitive)
      Applies this change to the given database.
      Parameters:
      database - The database
      caseSensitive - Whether the case of names matters