net.sourceforge.squirrel_sql.plugins.refactoring.commands
Class MergeTableCommand

java.lang.Object
  extended by net.sourceforge.squirrel_sql.plugins.refactoring.commands.AbstractRefactoringCommand
      extended by net.sourceforge.squirrel_sql.plugins.refactoring.commands.MergeTableCommand
All Implemented Interfaces:
ICommand

public class MergeTableCommand
extends AbstractRefactoringCommand


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.squirrel_sql.plugins.refactoring.commands.AbstractRefactoringCommand
AbstractRefactoringCommand.CommandExecHandler, AbstractRefactoringCommand.EditSQLListener, AbstractRefactoringCommand.ExecuteListener, AbstractRefactoringCommand.ShowSQLListener
 
Field Summary
protected  HashMap<String,TableColumnInfo[]> _allTables
           
protected  IMergeTableDialog customDialog
          The dialog implementation that gets displayed when we are executed
protected  IMergeTableDialogFactory dialogFactory
          The factory that creates the custom dialog for us.
 
Fields inherited from class net.sourceforge.squirrel_sql.plugins.refactoring.commands.AbstractRefactoringCommand
_dialect, _info, _qualifier, _session, _sqlPrefs
 
Constructor Summary
MergeTableCommand(ISession session, IDatabaseObjectInfo[] info, IMergeTableDialogFactory dialogFactory)
           
 
Method Summary
protected  void executeScript(String script)
          The subclass should implement this so that the ExecuteListener can delegate the execution of the sql script to the subclass.
protected  String[] generateSQLStatements()
          The subclass should implement this so that getSQLStatements can generate the actual statements.
protected  boolean isRefactoringSupportedForDialect(HibernateDialect dialect)
          Returns a boolean value indicating whether or not this refactoring is supported for the specified dialect.
protected  void onExecute()
          The subclass should implement this method with it's refactoring specific execution code.
 
Methods inherited from class net.sourceforge.squirrel_sql.plugins.refactoring.commands.AbstractRefactoringCommand
execute, getSQLStatements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

customDialog

protected IMergeTableDialog customDialog
The dialog implementation that gets displayed when we are executed


dialogFactory

protected IMergeTableDialogFactory dialogFactory
The factory that creates the custom dialog for us.


_allTables

protected HashMap<String,TableColumnInfo[]> _allTables
Constructor Detail

MergeTableCommand

public MergeTableCommand(ISession session,
                         IDatabaseObjectInfo[] info,
                         IMergeTableDialogFactory dialogFactory)
Parameters:
session -
info -
dialogFactory -
Method Detail

onExecute

protected void onExecute()
                  throws SQLException
Description copied from class: AbstractRefactoringCommand
The subclass should implement this method with it's refactoring specific execution code.

Specified by:
onExecute in class AbstractRefactoringCommand
Throws:
SQLException
See Also:
AbstractRefactoringCommand.onExecute()

generateSQLStatements

protected String[] generateSQLStatements()
                                  throws UserCancelledOperationException,
                                         SQLException
Description copied from class: AbstractRefactoringCommand
The subclass should implement this so that getSQLStatements can generate the actual statements.

Specified by:
generateSQLStatements in class AbstractRefactoringCommand
Returns:
the sql statements
Throws:
UserCancelledOperationException
SQLException
See Also:
AbstractRefactoringCommand.generateSQLStatements()

executeScript

protected void executeScript(String script)
Description copied from class: AbstractRefactoringCommand
The subclass should implement this so that the ExecuteListener can delegate the execution of the sql script to the subclass.

Specified by:
executeScript in class AbstractRefactoringCommand
Parameters:
script - the sql script that should be executed
See Also:
AbstractRefactoringCommand.executeScript(java.lang.String)

isRefactoringSupportedForDialect

protected boolean isRefactoringSupportedForDialect(HibernateDialect dialect)
Returns a boolean value indicating whether or not this refactoring is supported for the specified dialect.

Specified by:
isRefactoringSupportedForDialect in class AbstractRefactoringCommand
Parameters:
dialect - the HibernateDialect to check
Returns:
true if this refactoring is supported; false otherwise.


Copyright © 2001-2010. All Rights Reserved.