java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.alteration.TableChangeImplBase
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.alteration.PrimaryKeyChange
All Implemented Interfaces:
ModelChange, TableChange

public class PrimaryKeyChange extends TableChangeImplBase
Represents the change of the primary key of a table.
Version:
$Revision: $
  • Constructor Details

    • PrimaryKeyChange

      public PrimaryKeyChange(Table table, Column[] oldPrimaryKeyColumns, Column[] newPrimaryKeyColumns)
      Creates a new change object.
      Parameters:
      table - The table whose primary key is to be changed
      oldPrimaryKeyColumns - The columns making up the original primary key
      newPrimaryKeyColumns - The columns making up the new primary key
  • Method Details

    • getOldPrimaryKeyColumns

      public Column[] getOldPrimaryKeyColumns()
      Returns the columns making up the original primary key.
      Returns:
      The columns
    • getNewPrimaryKeyColumns

      public Column[] getNewPrimaryKeyColumns()
      Returns the columns making up the new primary key.
      Returns:
      The columns
    • 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