public class SqlGenerationAction extends Object implements StallionRunAction<SqlGenerateCommandOptions>
Modifier and Type | Class and Description |
---|---|
static class |
SqlGenerationAction.GenerateResult |
Constructor and Description |
---|
SqlGenerationAction() |
Modifier and Type | Method and Description |
---|---|
SqlGenerationAction.GenerateResult |
createAlterTableForNewColumns(Schema schema,
List<Col> columns) |
SqlGenerationAction.GenerateResult |
createTableSqlForSchema(Schema schema) |
protected String |
dbTypeForColumn(Col column) |
void |
execute(SqlGenerateCommandOptions options)
Actually do the action.
|
SqlGenerationAction.GenerateResult |
generateForModel(Class cls) |
SqlGenerationAction.GenerateResult |
generateForSchema(Schema schema) |
String |
getActionName()
The name of the action, will be used on the command line to run the action.
|
String |
getHelp()
A friendly description of what the action does, will be printed on the command-line
when help is asked for.
|
int |
getLastMigrationNumber() |
void |
loadApp(SqlGenerateCommandOptions options)
Load the application context.
|
SqlGenerateCommandOptions |
newCommandOptions()
Each action might have its own command-line arguments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSubActionName
public SqlGenerationAction()
public String getActionName()
StallionRunAction
getActionName
in interface StallionRunAction<SqlGenerateCommandOptions>
public String getHelp()
StallionRunAction
getHelp
in interface StallionRunAction<SqlGenerateCommandOptions>
public SqlGenerateCommandOptions newCommandOptions()
StallionRunAction
newCommandOptions
in interface StallionRunAction<SqlGenerateCommandOptions>
public void loadApp(SqlGenerateCommandOptions options)
StallionRunAction
loadApp
in interface StallionRunAction<SqlGenerateCommandOptions>
public void execute(SqlGenerateCommandOptions options) throws Exception
StallionRunAction
execute
in interface StallionRunAction<SqlGenerateCommandOptions>
Exception
public int getLastMigrationNumber()
public SqlGenerationAction.GenerateResult generateForModel(Class cls)
public SqlGenerationAction.GenerateResult generateForSchema(Schema schema)
public SqlGenerationAction.GenerateResult createTableSqlForSchema(Schema schema)
public SqlGenerationAction.GenerateResult createAlterTableForNewColumns(Schema schema, List<Col> columns)
protected String dbTypeForColumn(Col column)
Copyright © 2016. All rights reserved.