public class HibernateDdlExecutor extends Object implements DdlExecutor
DdlCommand
s thrown its way.Constructor and Description |
---|
HibernateDdlExecutor(ConfluenceHibernateConfig hibernateConfig,
org.hibernate.SessionFactory sessionFactory) |
Modifier and Type | Method and Description |
---|---|
CreateIndexCommand |
createCreateIndexCommand(String indexName,
String tableName,
boolean isUnique,
String... columnNames)
Create a compound index
|
CreateIndexCommand |
createCreateIndexCommand(String indexName,
String tableName,
String... columnNames)
Create a compound non-unique index
|
DropIndexCommand |
createDropIndexCommand(String indexName,
String tableName) |
DropTableCommand |
createDropTableCommand(String tableName) |
RenameTableCommand |
createRenameTableCommand(String oldTableName,
String newTableName) |
CreateUniqueConstraintWithMultipleNullsCommand |
createUniqueConstraintWithMultipleNullsCommand(String constraintName,
String tableName,
String columnName) |
void |
executeDdl(List<? extends DdlCommand> commands)
Perform a set of data definition altering actions.
|
void |
executeDdlStatements(List<String> statements) |
List<String> |
getDdlStatements(List<? extends DdlCommand> commands) |
public HibernateDdlExecutor(ConfluenceHibernateConfig hibernateConfig, org.hibernate.SessionFactory sessionFactory)
public CreateIndexCommand createCreateIndexCommand(String indexName, String tableName, String... columnNames)
createCreateIndexCommand
in interface DdlExecutor
indexName
- the index nametableName
- the table namecolumnNames
- a set of column namespublic CreateIndexCommand createCreateIndexCommand(String indexName, String tableName, boolean isUnique, String... columnNames)
createCreateIndexCommand
in interface DdlExecutor
indexName
- the index nametableName
- the table nameisUnique
- true if the index is uniquecolumnNames
- a set of column namespublic CreateUniqueConstraintWithMultipleNullsCommand createUniqueConstraintWithMultipleNullsCommand(String constraintName, String tableName, String columnName)
createUniqueConstraintWithMultipleNullsCommand
in interface DdlExecutor
public DropIndexCommand createDropIndexCommand(String indexName, String tableName)
createDropIndexCommand
in interface DdlExecutor
public DropTableCommand createDropTableCommand(String tableName)
createDropTableCommand
in interface DdlExecutor
public RenameTableCommand createRenameTableCommand(String oldTableName, String newTableName)
createRenameTableCommand
in interface DdlExecutor
public void executeDdl(List<? extends DdlCommand> commands)
DdlExecutor
executeDdl
in interface DdlExecutor
commands
- A collection of ddl commands to performpublic void executeDdlStatements(List<String> statements)
executeDdlStatements
in interface DdlExecutor
public List<String> getDdlStatements(List<? extends DdlCommand> commands)
getDdlStatements
in interface DdlExecutor
Copyright © 2003–2018 Atlassian. All rights reserved.