liquibase.change.core
Class AddForeignKeyConstraintChange

java.lang.Object
  extended by liquibase.change.AbstractChange
      extended by liquibase.change.core.AddForeignKeyConstraintChange
All Implemented Interfaces:
Change

public class AddForeignKeyConstraintChange
extends AbstractChange

Adds a foreign key constraint to an existing column.


Constructor Summary
AddForeignKeyConstraintChange()
           
 
Method Summary
protected  Change[] createInverses()
           
 SqlStatement[] generateStatements(Database database)
          Generates the SQL statements required to run the change
 String getBaseColumnNames()
           
 String getBaseTableName()
           
 String getBaseTableSchemaName()
           
 String getConfirmationMessage()
           
 String getConstraintName()
           
 Boolean getDeferrable()
           
 Boolean getInitiallyDeferred()
           
 String getOnDelete()
           
 String getOnUpdate()
           
 String getReferencedColumnNames()
           
 String getReferencedTableName()
           
 String getReferencedTableSchemaName()
           
 Boolean getReferencesUniqueColumn()
           
 void setBaseColumnNames(String baseColumnNames)
           
 void setBaseTableName(String baseTableName)
           
 void setBaseTableSchemaName(String baseTableSchemaName)
           
 void setConstraintName(String constraintName)
           
 void setDeferrable(Boolean deferrable)
           
 void setDeleteCascade(Boolean deleteCascade)
           
 void setInitiallyDeferred(Boolean initiallyDeferred)
           
 void setOnDelete(ForeignKeyConstraintType rule)
           
 void setOnDelete(String onDelete)
           
 void setOnUpdate(ForeignKeyConstraintType rule)
           
 void setOnUpdate(String rule)
           
 void setReferencedColumnNames(String referencedColumnNames)
           
 void setReferencedTableName(String referencedTableName)
           
 void setReferencedTableSchemaName(String referencedTableSchemaName)
           
 void setReferencesUniqueColumn(Boolean referencesUniqueColumn)
           
 
Methods inherited from class liquibase.change.AbstractChange
generateCheckSum, generateRollbackStatements, getAffectedDatabaseObjects, getChangeMetaData, getChangeSet, getResourceAccessor, init, requiresUpdatedDatabaseMetadata, setChangeSet, setPriority, setResourceAccessor, supports, supportsRollback, validate, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddForeignKeyConstraintChange

public AddForeignKeyConstraintChange()
Method Detail

getBaseTableSchemaName

public String getBaseTableSchemaName()

setBaseTableSchemaName

public void setBaseTableSchemaName(String baseTableSchemaName)

getBaseTableName

public String getBaseTableName()

setBaseTableName

public void setBaseTableName(String baseTableName)

getBaseColumnNames

public String getBaseColumnNames()

setBaseColumnNames

public void setBaseColumnNames(String baseColumnNames)

getReferencedTableSchemaName

public String getReferencedTableSchemaName()

setReferencedTableSchemaName

public void setReferencedTableSchemaName(String referencedTableSchemaName)

getReferencedTableName

public String getReferencedTableName()

setReferencedTableName

public void setReferencedTableName(String referencedTableName)

getReferencedColumnNames

public String getReferencedColumnNames()

setReferencedColumnNames

public void setReferencedColumnNames(String referencedColumnNames)

getConstraintName

public String getConstraintName()

setConstraintName

public void setConstraintName(String constraintName)

getDeferrable

public Boolean getDeferrable()

setDeferrable

public void setDeferrable(Boolean deferrable)

getInitiallyDeferred

public Boolean getInitiallyDeferred()

setInitiallyDeferred

public void setInitiallyDeferred(Boolean initiallyDeferred)

setDeleteCascade

public void setDeleteCascade(Boolean deleteCascade)

setOnUpdate

public void setOnUpdate(String rule)

getOnUpdate

public String getOnUpdate()

setOnDelete

public void setOnDelete(String onDelete)

getOnDelete

public String getOnDelete()

getReferencesUniqueColumn

public Boolean getReferencesUniqueColumn()

setReferencesUniqueColumn

public void setReferencesUniqueColumn(Boolean referencesUniqueColumn)

setOnDelete

public void setOnDelete(ForeignKeyConstraintType rule)

setOnUpdate

public void setOnUpdate(ForeignKeyConstraintType rule)

generateStatements

public SqlStatement[] generateStatements(Database database)
Description copied from interface: Change
Generates the SQL statements required to run the change

Parameters:
database - databasethe target Database associated to this change's statements
Returns:
an array of Strings with the statements

createInverses

protected Change[] createInverses()
Overrides:
createInverses in class AbstractChange

getConfirmationMessage

public String getConfirmationMessage()
Returns:
Confirmation message to be displayed after the change is executed


Copyright © 2004-2011 Liquibase.org. All Rights Reserved.