Class HibernateDdlExecutor
java.lang.Object
com.atlassian.confluence.upgrade.ddl.HibernateDdlExecutor
- All Implemented Interfaces:
DdlExecutor
Executes any set of
DdlCommands thrown its way.- Since:
- 4.0
-
Constructor Summary
ConstructorsConstructorDescriptionHibernateDdlExecutor(HibernateDatabaseCapabilities databaseCapabilities, org.hibernate.SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreateCreateIndexCommand(String indexName, String tableName, boolean isUnique, String... columnNames) Create a compound indexcreateCreateIndexCommand(String indexName, String tableName, String... columnNames) Create a compound non-unique indexcreateDropIndexCommand(String indexName, String tableName) createDropTableCommand(String tableName) createDropTableIfExistsCommand(String tableName) createRenameTableCommand(String oldTableName, String newTableName) createUniqueConstraintWithMultipleNullsCommand(String constraintName, String tableName, String columnName) voidexecuteDdl(List<? extends DdlCommand> commands) Perform a set of data definition altering actions.voidexecuteDdlStatements(List<String> statements) getDdlStatements(List<? extends DdlCommand> commands)
-
Constructor Details
-
HibernateDdlExecutor
public HibernateDdlExecutor(HibernateDatabaseCapabilities databaseCapabilities, org.hibernate.SessionFactory sessionFactory) - Since:
- 7.13.17
-
-
Method Details
-
createCreateIndexCommand
public CreateIndexCommand createCreateIndexCommand(String indexName, String tableName, String... columnNames) Create a compound non-unique index- Specified by:
createCreateIndexCommandin interfaceDdlExecutor- Parameters:
indexName- the index nametableName- the table namecolumnNames- a set of column names- Returns:
- a CreateIndexCommand object for execution
-
createCreateIndexCommand
public CreateIndexCommand createCreateIndexCommand(String indexName, String tableName, boolean isUnique, String... columnNames) Create a compound index- Specified by:
createCreateIndexCommandin interfaceDdlExecutor- Parameters:
indexName- the index nametableName- the table nameisUnique- true if the index is uniquecolumnNames- a set of column names- Returns:
- a CreateIndexCommand object for execution
- Since:
- 6.0
-
createUniqueConstraintWithMultipleNullsCommand
public CreateUniqueConstraintWithMultipleNullsCommand createUniqueConstraintWithMultipleNullsCommand(String constraintName, String tableName, String columnName) - Specified by:
createUniqueConstraintWithMultipleNullsCommandin interfaceDdlExecutor
-
createDropIndexCommand
- Specified by:
createDropIndexCommandin interfaceDdlExecutor
-
createDropTableCommand
- Specified by:
createDropTableCommandin interfaceDdlExecutor
-
createDropTableIfExistsCommand
- Specified by:
createDropTableIfExistsCommandin interfaceDdlExecutor
-
createRenameTableCommand
- Specified by:
createRenameTableCommandin interfaceDdlExecutor
-
executeDdl
Description copied from interface:DdlExecutorPerform a set of data definition altering actions. Each action is executed as a separate statement.- Specified by:
executeDdlin interfaceDdlExecutor- Parameters:
commands- A collection of ddl commands to perform
-
executeDdlStatements
- Specified by:
executeDdlStatementsin interfaceDdlExecutor
-
getDdlStatements
- Specified by:
getDdlStatementsin interfaceDdlExecutor
-