liquibase.change.core
Class AddPrimaryKeyChange

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

public class AddPrimaryKeyChange
extends AbstractChange

Creates a primary key out of an existing column or set of columns.


Constructor Summary
AddPrimaryKeyChange()
           
 
Method Summary
protected  Change[] createInverses()
           
 SqlStatement[] generateStatements(Database database)
          Generates the SQL statements required to run the change
 String getColumnNames()
           
 String getConfirmationMessage()
           
 String getConstraintName()
           
 String getSchemaName()
           
 String getTableName()
           
 String getTablespace()
           
 void setColumnNames(String columnNames)
           
 void setConstraintName(String constraintName)
           
 void setSchemaName(String schemaName)
           
 void setTableName(String tableName)
           
 void setTablespace(String tablespace)
           
 
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

AddPrimaryKeyChange

public AddPrimaryKeyChange()
Method Detail

getTableName

public String getTableName()

setTableName

public void setTableName(String tableName)

getSchemaName

public String getSchemaName()

setSchemaName

public void setSchemaName(String schemaName)

getColumnNames

public String getColumnNames()

setColumnNames

public void setColumnNames(String columnNames)

getConstraintName

public String getConstraintName()

setConstraintName

public void setConstraintName(String constraintName)

getTablespace

public String getTablespace()

setTablespace

public void setTablespace(String tablespace)

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.