org.apache.ddlutils.alteration
Class AddTableChange

java.lang.Object
  extended by org.apache.ddlutils.alteration.AddTableChange
All Implemented Interfaces:
ModelChange

public class AddTableChange
extends Object
implements ModelChange

Represents the addition of a table to a model. Note that this change does not include foreign keys originating from the new table.

Version:
$Revision: $

Constructor Summary
AddTableChange(Table newTable)
          Creates a new change object.
 
Method Summary
 void apply(Database database, boolean caseSensitive)
          Applies this change to the given database.
 Table getNewTable()
          Returns the new table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddTableChange

public AddTableChange(Table newTable)
Creates a new change object.

Parameters:
newTable - The new table
Method Detail

getNewTable

public Table getNewTable()
Returns the new table. Note that only the columns and table-level constraints are to be used. Any model-level constraints (e.g. foreign keys) shall be ignored as there are different change objects for them.

Returns:
The new table

apply

public void apply(Database database,
                  boolean caseSensitive)
Applies this change to the given database.

Specified by:
apply in interface ModelChange
Parameters:
database - The database
caseSensitive - Whether the case of names matters


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.