Class HibernateDdlExecutor
- java.lang.Object
- 
- com.atlassian.confluence.upgrade.ddl.HibernateDdlExecutor
 
- 
- All Implemented Interfaces:
- DdlExecutor
 
 public class HibernateDdlExecutor extends Object implements DdlExecutor Executes any set ofDdlCommands thrown its way.- Since:
- 4.0
 
- 
- 
Constructor SummaryConstructors Constructor Description HibernateDdlExecutor(HibernateDatabaseCapabilities databaseCapabilities, org.hibernate.SessionFactory sessionFactory)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateIndexCommandcreateCreateIndexCommand(String indexName, String tableName, boolean isUnique, String... columnNames)Create a compound indexCreateIndexCommandcreateCreateIndexCommand(String indexName, String tableName, String... columnNames)Create a compound non-unique indexDropIndexCommandcreateDropIndexCommand(String indexName, String tableName)DropTableCommandcreateDropTableCommand(String tableName)RenameTableCommandcreateRenameTableCommand(String oldTableName, String newTableName)CreateUniqueConstraintWithMultipleNullsCommandcreateUniqueConstraintWithMultipleNullsCommand(String constraintName, String tableName, String columnName)voidexecuteDdl(List<? extends DdlCommand> commands)Perform a set of data definition altering actions.voidexecuteDdlStatements(List<String> statements)List<String>getDdlStatements(List<? extends DdlCommand> commands)
 
- 
- 
- 
Constructor Detail- 
HibernateDdlExecutorpublic HibernateDdlExecutor(HibernateDatabaseCapabilities databaseCapabilities, org.hibernate.SessionFactory sessionFactory) - Since:
- 7.20
 
 
- 
 - 
Method Detail- 
createCreateIndexCommandpublic CreateIndexCommand createCreateIndexCommand(String indexName, String tableName, String... columnNames) Create a compound non-unique index- Specified by:
- createCreateIndexCommandin interface- DdlExecutor
- Parameters:
- indexName- the index name
- tableName- the table name
- columnNames- a set of column names
- Returns:
- a CreateIndexCommand object for execution
 
 - 
createCreateIndexCommandpublic CreateIndexCommand createCreateIndexCommand(String indexName, String tableName, boolean isUnique, String... columnNames) Create a compound index- Specified by:
- createCreateIndexCommandin interface- DdlExecutor
- Parameters:
- indexName- the index name
- tableName- the table name
- isUnique- true if the index is unique
- columnNames- a set of column names
- Returns:
- a CreateIndexCommand object for execution
- Since:
- 6.0
 
 - 
createUniqueConstraintWithMultipleNullsCommandpublic CreateUniqueConstraintWithMultipleNullsCommand createUniqueConstraintWithMultipleNullsCommand(String constraintName, String tableName, String columnName) - Specified by:
- createUniqueConstraintWithMultipleNullsCommandin interface- DdlExecutor
 
 - 
createDropIndexCommandpublic DropIndexCommand createDropIndexCommand(String indexName, String tableName) - Specified by:
- createDropIndexCommandin interface- DdlExecutor
 
 - 
createDropTableCommandpublic DropTableCommand createDropTableCommand(String tableName) - Specified by:
- createDropTableCommandin interface- DdlExecutor
 
 - 
createRenameTableCommandpublic RenameTableCommand createRenameTableCommand(String oldTableName, String newTableName) - Specified by:
- createRenameTableCommandin interface- DdlExecutor
 
 - 
executeDdlpublic void executeDdl(List<? extends DdlCommand> commands) Description copied from interface:DdlExecutorPerform a set of data definition altering actions. Each action is executed as a separate statement.- Specified by:
- executeDdlin interface- DdlExecutor
- Parameters:
- commands- A collection of ddl commands to perform
 
 - 
executeDdlStatementspublic void executeDdlStatements(List<String> statements) - Specified by:
- executeDdlStatementsin interface- DdlExecutor
 
 - 
getDdlStatementspublic List<String> getDdlStatements(List<? extends DdlCommand> commands) - Specified by:
- getDdlStatementsin interface- DdlExecutor
 
 
- 
 
-