public class

HibernateAlterTableExecutor

extends Object
implements AlterTableExecutor
java.lang.Object
   ↳ com.atlassian.confluence.upgrade.ddl.HibernateAlterTableExecutor

Class Overview

Executes all the various database-specific table altering commands.

Summary

Public Constructors
HibernateAlterTableExecutor(ConfluenceHibernateConfig hibernateConfig, DdlExecutor ddlExecutor)
Public Methods
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)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.upgrade.ddl.AlterTableExecutor

Public Constructors

public HibernateAlterTableExecutor (ConfluenceHibernateConfig hibernateConfig, DdlExecutor ddlExecutor)

Public Methods

public 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

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

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

public DropUniqueConstraintCommand createDropUniqueConstraintCommand (String constraintName)

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