com.atlassian.confluence.upgrade.ddl
Interface AlterTableExecutor

All Known Implementing Classes:
HibernateAlterTableExecutor

public interface AlterTableExecutor

Executes all the various database-specific table altering commands.

Since:
4.0

Method Summary
 void alterTable(String tableName, List<? extends AlterTableCommand> commands)
          Perform a set of table altering actions on a given table.
 AddUniqueConstraintCommand createAddUniqueConstraintCommand(String constraintName, String... columnNames)
           
 AlterColumnNullabilityCommand createAlterColumnNullChoiceCommand(String columnName, String oldDataType, NullChoice nullChoice)
           
 DropUniqueConstraintCommand createDropUniqueConstraintCommand(String constraintName)
           
 List<String> getAlterTableStatements(String tableName, List<? extends AlterTableCommand> commands)
           
 

Method Detail

createAlterColumnNullChoiceCommand

AlterColumnNullabilityCommand createAlterColumnNullChoiceCommand(String columnName,
                                                                 String oldDataType,
                                                                 NullChoice nullChoice)

createAddUniqueConstraintCommand

AddUniqueConstraintCommand createAddUniqueConstraintCommand(String constraintName,
                                                            String... columnNames)

createDropUniqueConstraintCommand

DropUniqueConstraintCommand createDropUniqueConstraintCommand(String constraintName)

alterTable

void alterTable(String tableName,
                List<? extends AlterTableCommand> commands)
Perform a set of table altering actions on a given table. On some databases such as PostgreSQL this is combined into a single statement automatically. On other databases such as HSQLDB, each alter action is executed as a separate statement.

Parameters:
tableName - Name of the table to alter
commands - A collection of alter table actions to perform

getAlterTableStatements

List<String> getAlterTableStatements(String tableName,
                                     List<? extends AlterTableCommand> commands)


Copyright © 2003-2011 Atlassian. All Rights Reserved.