public final class GfxdDdlUtils extends ToolsBase
ToolsBase.ConnectionOptions, ToolsBase.ProcessCommandAUTH_PROVIDER, BIND_ADDRESS, CLIENT_BIND_ADDRESS, CLIENT_PORT, CONNECTION_URL, currentOpts, EXTRA_CONN_PROPS, LOCATORS, MCAST_ADDRESS, MCAST_PORT, outputStream, PASSWORD, SYSTEM_PROPERTY, USERNAME| Constructor and Description |
|---|
GfxdDdlUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBasicConnectionOptions(org.apache.commons.cli.Options opts) |
protected void |
addCommonOptions(org.apache.commons.cli.Options opts) |
protected void |
addCommonReadTaskOptions(org.apache.commons.cli.Options opts) |
protected void |
addCommonTaskOptions(org.apache.commons.cli.Options opts) |
protected void |
addConnectionOptions(org.apache.commons.cli.Options opts) |
protected void |
addReplayFailedDMLsOptions(org.apache.commons.cli.Options opts) |
protected void |
addWriteDataDtdToFileOptions(org.apache.commons.cli.Options opts) |
protected void |
addWriteDataToDBOptions(org.apache.commons.cli.Options opts) |
protected void |
addWriteDataToXMLOptions(org.apache.commons.cli.Options opts) |
protected void |
addWriteSchemaToDBOptions(org.apache.commons.cli.Options opts) |
protected void |
addWriteSchemaToSQLOptions(org.apache.commons.cli.Options opts) |
protected void |
addWriteSchemaToXMLOptions(org.apache.commons.cli.Options opts) |
protected void |
executeReplayFailedDMLs(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey) |
protected void |
executeWriteDataDtdToFile(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey) |
protected void |
executeWriteDataToDB(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey) |
protected void |
executeWriteDataToXML(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey) |
protected void |
executeWriteSchemaToDB(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey) |
protected void |
executeWriteSchemaToSQL(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey) |
protected void |
executeWriteSchemaToXML(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey) |
protected ToolsBase.ProcessCommand |
getCommandProcessor(String cmd)
Get a processor specific to the provided command.
|
protected Map<String,String> |
getCommandToDescriptionKeyMap()
Get the mapping from command-name to its description key that can be used
to lookup the localized description string using
LocalizedResource. |
protected String |
getUsageString(String cmd,
String cmdDescKey)
Get the usage string (without any formatting etc.) in case of an exception
or when explicitly requested.
|
static Map<String,String> |
getValidCommands() |
protected com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.TaskOptions |
handleCommonTaskOption(GfxdOption opt,
boolean fromDatabase,
com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.TaskOptions taskOpts)
Return a non-null TaskOptions object with the set TaskOptions field if the
option is one of those handled by TaskOptions else return null.
|
protected boolean |
handleDataSourceOption(GfxdOption opt,
com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.DataSourceOptions dsOpts) |
protected org.apache.commons.dbcp.BasicDataSource |
handleDataSourceOptions(com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.DataSourceOptions dsOpts,
String cmd,
String cmdDescKey) |
protected String |
handleVerbosityOption(GfxdOption opt) |
static void |
main(String[] args) |
protected void |
setCommonReadTaskOptions(DatabaseToDdlTask task,
com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.TaskOptions taskOpts) |
protected void |
setCommonTaskOptions(DatabaseTaskBase task,
com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.TaskOptions taskOpts) |
buildCommandOptions, getConnection, handleCommonOption, handleConnectionOption, handleConnectionOptions, invoke, printUsageExamples, showUsagepublic static void main(String[] args)
protected Map<String,String> getCommandToDescriptionKeyMap()
LocalizedResource.getCommandToDescriptionKeyMap in class ToolsBaseprotected ToolsBase.ProcessCommand getCommandProcessor(String cmd)
getCommandProcessor in class ToolsBaseprotected String getUsageString(String cmd, String cmdDescKey)
getUsageString in class ToolsBaseprotected void addWriteSchemaToXMLOptions(org.apache.commons.cli.Options opts)
protected void addWriteSchemaToSQLOptions(org.apache.commons.cli.Options opts)
protected void addWriteDataToXMLOptions(org.apache.commons.cli.Options opts)
protected void addWriteDataDtdToFileOptions(org.apache.commons.cli.Options opts)
protected void addWriteSchemaToDBOptions(org.apache.commons.cli.Options opts)
protected void addWriteDataToDBOptions(org.apache.commons.cli.Options opts)
protected void addReplayFailedDMLsOptions(org.apache.commons.cli.Options opts)
protected void addCommonTaskOptions(org.apache.commons.cli.Options opts)
protected void addCommonReadTaskOptions(org.apache.commons.cli.Options opts)
protected void addCommonOptions(org.apache.commons.cli.Options opts)
addCommonOptions in class ToolsBaseprotected void addConnectionOptions(org.apache.commons.cli.Options opts)
addConnectionOptions in class ToolsBaseprotected void addBasicConnectionOptions(org.apache.commons.cli.Options opts)
protected void executeWriteSchemaToXML(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey)
throws org.apache.commons.cli.ParseException,
SQLException
org.apache.commons.cli.ParseExceptionSQLExceptionprotected void executeWriteSchemaToSQL(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey)
throws org.apache.commons.cli.ParseException,
SQLException
org.apache.commons.cli.ParseExceptionSQLExceptionprotected void executeWriteDataToXML(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey)
throws org.apache.commons.cli.ParseException,
SQLException
org.apache.commons.cli.ParseExceptionSQLExceptionprotected void executeWriteDataDtdToFile(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey)
throws org.apache.commons.cli.ParseException,
SQLException
org.apache.commons.cli.ParseExceptionSQLExceptionprotected void executeWriteSchemaToDB(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey)
throws org.apache.commons.cli.ParseException,
SQLException
org.apache.commons.cli.ParseExceptionSQLExceptionprotected void executeReplayFailedDMLs(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey)
throws org.apache.commons.cli.ParseException,
SQLException
org.apache.commons.cli.ParseExceptionSQLExceptionprotected void executeWriteDataToDB(org.apache.commons.cli.CommandLine cmdLine,
String cmd,
String cmdDescKey)
throws org.apache.commons.cli.ParseException,
SQLException
org.apache.commons.cli.ParseExceptionSQLExceptionprotected boolean handleDataSourceOption(GfxdOption opt, com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.DataSourceOptions dsOpts)
protected com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.TaskOptions handleCommonTaskOption(GfxdOption opt, boolean fromDatabase, com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.TaskOptions taskOpts) throws org.apache.commons.cli.ParseException
org.apache.commons.cli.ParseExceptionprotected String handleVerbosityOption(GfxdOption opt)
protected org.apache.commons.dbcp.BasicDataSource handleDataSourceOptions(com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.DataSourceOptions dsOpts,
String cmd,
String cmdDescKey)
protected void setCommonTaskOptions(DatabaseTaskBase task, com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.TaskOptions taskOpts)
protected void setCommonReadTaskOptions(DatabaseToDdlTask task, com.pivotal.gemfirexd.tools.internal.GfxdDdlUtils.TaskOptions taskOpts)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.