com.atlassian.confluence.upgrade.ddl
Class HibernateAlterTableExecutor
java.lang.Object
com.atlassian.confluence.upgrade.ddl.HibernateAlterTableExecutor
- All Implemented Interfaces:
- AlterTableExecutor
public class HibernateAlterTableExecutor
- extends Object
- implements AlterTableExecutor
Executes all the various database-specific table altering commands.
- Since:
- 4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateAlterTableExecutor
public HibernateAlterTableExecutor(ConfluenceHibernateConfig hibernateConfig,
DdlExecutor ddlExecutor)
createAlterColumnNullChoiceCommand
public AlterColumnNullabilityCommand createAlterColumnNullChoiceCommand(String columnName,
String oldDataType,
NullChoice nullChoice)
- Specified by:
createAlterColumnNullChoiceCommand
in interface AlterTableExecutor
createAddUniqueConstraintCommand
public AddUniqueConstraintCommand createAddUniqueConstraintCommand(String constraintName,
String... columnNames)
- Specified by:
createAddUniqueConstraintCommand
in interface AlterTableExecutor
createDropUniqueConstraintCommand
public DropUniqueConstraintCommand createDropUniqueConstraintCommand(String constraintName)
- Specified by:
createDropUniqueConstraintCommand
in interface AlterTableExecutor
alterTable
public void alterTable(String tableName,
List<? extends AlterTableCommand> commands)
- Description copied from interface:
AlterTableExecutor
- 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.
- Specified by:
alterTable
in interface AlterTableExecutor
- Parameters:
tableName
- Name of the table to altercommands
- A collection of alter table actions to perform
getAlterTableStatements
public List<String> getAlterTableStatements(String tableName,
List<? extends AlterTableCommand> commands)
- Specified by:
getAlterTableStatements
in interface AlterTableExecutor