|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.squirrel_sql.plugins.refactoring.commands.AbstractRefactoringCommand
public abstract class AbstractRefactoringCommand
| Nested Class Summary | |
|---|---|
protected class |
AbstractRefactoringCommand.CommandExecHandler
|
protected class |
AbstractRefactoringCommand.EditSQLListener
An ActionListener for the Edit SQL button that appends the sql statement to the sql panel, disposes the specified dialog and switches to the sql panel. |
protected class |
AbstractRefactoringCommand.ExecuteListener
An ActionListener for the Execute button that delegates the execution of the sql statement to the subclass. |
protected class |
AbstractRefactoringCommand.ShowSQLListener
An ActionListener for the Show SQL button that opens the sql statement in a dialog. |
| Field Summary | |
|---|---|
protected HibernateDialect |
_dialect
HibernateDialect to use for this refactoring. |
protected IDatabaseObjectInfo[] |
_info
Selected database object(s) |
protected DatabaseObjectQualifier |
_qualifier
qualifier object to use in qualifying identifiers. |
protected ISession |
_session
Current session |
protected SqlGenerationPreferences |
_sqlPrefs
User preferences regarding the generation of SQL scripts. |
| Constructor Summary | |
|---|---|
AbstractRefactoringCommand(ISession session,
IDatabaseObjectInfo[] info)
|
|
| Method Summary | |
|---|---|
void |
execute()
Does general execution work that every refactoring command needs (e.g. |
protected abstract 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 abstract String[] |
generateSQLStatements()
The subclass should implement this so that getSQLStatements can generate the actual statements. |
protected void |
getSQLStatements(SQLResultListener listener)
Adds a new task to the ThreadPool that generates the SQL statements and notifies the listener when the statements were successfully generated. |
protected abstract boolean |
isRefactoringSupportedForDialect(HibernateDialect dialectExt)
Returns a boolean value indicating whether or not this refactoring is supported for the specified dialect. |
protected abstract void |
onExecute()
The subclass should implement this method with it's refactoring specific execution code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ISession _session
protected final IDatabaseObjectInfo[] _info
protected HibernateDialect _dialect
protected final SqlGenerationPreferences _sqlPrefs
protected final DatabaseObjectQualifier _qualifier
| Constructor Detail |
|---|
public AbstractRefactoringCommand(ISession session,
IDatabaseObjectInfo[] info)
| Method Detail |
|---|
public void execute()
execute in interface ICommandprotected abstract boolean isRefactoringSupportedForDialect(HibernateDialect dialectExt)
dialectExt - the HibernateDialect to check
protected abstract void onExecute()
throws Exception
Exception - if something goes wrong while executing the command
protected abstract String[] generateSQLStatements()
throws Exception
Exception - if something goes wrong while generating the sql statementsprotected void getSQLStatements(SQLResultListener listener)
listener - the listener to notify when the statments are readyprotected abstract void executeScript(String script)
script - the sql script that should be executed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||