com.atlassian.confluence.upgrade.ddl
Class DropForeignKeyConstraintCommandFactory

java.lang.Object
  extended by com.atlassian.confluence.upgrade.ddl.DropForeignKeyConstraintCommandFactory

public class DropForeignKeyConstraintCommandFactory
extends Object


Constructor Summary
DropForeignKeyConstraintCommandFactory(BootstrapManager bootstrapManager, org.springframework.transaction.PlatformTransactionManager platformTransactionManager, net.sf.hibernate.SessionFactory sessionFactory)
           
 
Method Summary
 DropForeignKeyConstraintCommand getCommand(String tableName, String columnName)
           
 DropForeignKeyConstraintCommand getCommandWithExistingConnection(Connection connection, String tableName, String columnName)
          Use this when you want to get the table metadata on the same transaction as other DDL commands (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropForeignKeyConstraintCommandFactory

public DropForeignKeyConstraintCommandFactory(BootstrapManager bootstrapManager,
                                              org.springframework.transaction.PlatformTransactionManager platformTransactionManager,
                                              net.sf.hibernate.SessionFactory sessionFactory)
Method Detail

getCommand

public DropForeignKeyConstraintCommand getCommand(String tableName,
                                                  String columnName)
Returns:
A command to drop the FK's on the specified column, null if the column cannot be found.

getCommandWithExistingConnection

public DropForeignKeyConstraintCommand getCommandWithExistingConnection(Connection connection,
                                                                        String tableName,
                                                                        String columnName)
Use this when you want to get the table metadata on the same transaction as other DDL commands (e.g. drop index) to prevent deadlocks.



Copyright © 2003–2015 Atlassian. All rights reserved.