com.atlassian.confluence.upgrade.ddl
Class HibernateDdlExecutor

java.lang.Object
  extended by com.atlassian.confluence.upgrade.ddl.HibernateDdlExecutor
All Implemented Interfaces:
DdlExecutor

public class HibernateDdlExecutor
extends Object
implements DdlExecutor

Executes any set of DdlCommands thrown its way.

Since:
4.0

Constructor Summary
HibernateDdlExecutor(ConfluenceHibernateConfig hibernateConfig, net.sf.hibernate.SessionFactory sessionFactory)
           
 
Method Summary
 CreateIndexCommand createCreateIndexCommand(String indexName, String tableName, String... columnNames)
           
 DropIndexCommand createDropIndexCommand(String indexName, String tableName)
           
 DropTableCommand createDropTableCommand(String tableName)
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateDdlExecutor

public HibernateDdlExecutor(ConfluenceHibernateConfig hibernateConfig,
                            net.sf.hibernate.SessionFactory sessionFactory)
Method Detail

createCreateIndexCommand

public CreateIndexCommand createCreateIndexCommand(String indexName,
                                                   String tableName,
                                                   String... columnNames)
Specified by:
createCreateIndexCommand in interface DdlExecutor

createDropIndexCommand

public DropIndexCommand createDropIndexCommand(String indexName,
                                               String tableName)
Specified by:
createDropIndexCommand in interface DdlExecutor

createDropTableCommand

public DropTableCommand createDropTableCommand(String tableName)
Specified by:
createDropTableCommand in interface DdlExecutor

executeDdl

public void executeDdl(List<? extends DdlCommand> commands)
Description copied from interface: DdlExecutor
Perform a set of data definition altering actions. Each action is executed as a separate statement.

Specified by:
executeDdl in interface DdlExecutor
Parameters:
commands - A collection of ddl commands to perform

executeDdlStatements

public void executeDdlStatements(List<String> statements)
Specified by:
executeDdlStatements in interface DdlExecutor

getDdlStatements

public List<String> getDdlStatements(List<? extends DdlCommand> commands)
Specified by:
getDdlStatements in interface DdlExecutor


Copyright © 2003-2013 Atlassian. All Rights Reserved.