|
1 | 1 | package com.googlecode.scheme2ddl;
|
2 | 2 |
|
3 | 3 | import com.googlecode.scheme2ddl.dao.ConnectionDao;
|
4 |
| -import com.googlecode.scheme2ddl.dao.UserObjectDao; |
5 | 4 | import oracle.jdbc.pool.OracleDataSource;
|
6 | 5 | import org.apache.commons.logging.Log;
|
7 | 6 | import org.apache.commons.logging.LogFactory;
|
@@ -33,7 +32,7 @@ public class Main {
|
33 | 32 | private static boolean justTestConnection = false;
|
34 | 33 | private static boolean skipPublicDbLinks = false;
|
35 | 34 | private static boolean stopOnWarning = false;
|
36 |
| - private static boolean filterSequenceValues = false; |
| 35 | + private static boolean replaceSequenceValues = false; |
37 | 36 | private static String customConfigLocation = null;
|
38 | 37 | private static String defaultConfigLocation = "scheme2ddl.config.xml";
|
39 | 38 | private static String dbUrl = null;
|
@@ -121,9 +120,9 @@ private static void modifyContext(ConfigurableApplicationContext context) {
|
121 | 120 | UserObjectProcessor processor = (UserObjectProcessor) context.getBean("processor");
|
122 | 121 | processor.setStopOnWarning(stopOnWarning);
|
123 | 122 | }
|
124 |
| - if (filterSequenceValues){ |
| 123 | + if (replaceSequenceValues){ |
125 | 124 | UserObjectProcessor processor = (UserObjectProcessor) context.getBean("processor");
|
126 |
| - processor.setFilterSequenceValues(filterSequenceValues); |
| 125 | + processor.setReplaceSequenceValues(replaceSequenceValues); |
127 | 126 | }
|
128 | 127 |
|
129 | 128 | }
|
@@ -245,23 +244,25 @@ private static void printUsage() {
|
245 | 244 | msg.append("internally call to dbms_metadata.get_ddl " + lSep);
|
246 | 245 | msg.append("more config options in scheme2ddl.config.xml " + lSep);
|
247 | 246 | msg.append("Options: " + lSep);
|
248 |
| - msg.append(" -help, -h print this message" + lSep); |
249 |
| - // msg.append(" -verbose, -v be extra verbose" + lSep); |
250 |
| - msg.append(" -url, DB connection URL" + lSep); |
251 |
| - msg.append(" example: scott/tiger@localhost:1521:ORCL" + lSep); |
| 247 | + msg.append(" -help, -h print this message" + lSep); |
| 248 | + // msg.append(" -verbose, -v be extra verbose" + lSep); |
| 249 | + msg.append(" -url, DB connection URL" + lSep); |
| 250 | + msg.append(" example: scott/tiger@localhost:1521:ORCL" + lSep); |
252 | 251 |
|
253 |
| - msg.append(" -o, --output, output dir" + lSep); |
254 |
| - msg.append(" -p, --parallel, number of parallel thread (default 4)" + lSep); |
255 |
| - msg.append(" -s, --schemas, a comma separated list of schemas for processing" + lSep); |
256 |
| - msg.append(" (works only if connected to oracle as sysdba)" + lSep); |
257 |
| - msg.append(" -c, --config, path to scheme2ddl config file (xml)" + lSep); |
258 |
| - msg.append(" -f, --filter, filter for specific DDL objects" + lSep); |
259 |
| - msg.append(" every LIKE wildcard can be used" + lSep); |
260 |
| - msg.append(" -tf, --type-filter, filter for specific DDL object types" + lSep); |
261 |
| - msg.append(" -tfm, --type-filtermode, mode for type filter: include(default) or exclude" + lSep); |
262 |
| - msg.append(" --stop-on-warning, stop on getting DDL error (skip by default)" + lSep); |
263 |
| - msg.append(" -tc,--test-connection, test db connection available" + lSep); |
264 |
| - msg.append(" -version, print version info and exit" + lSep); |
| 252 | + msg.append(" -o, --output, output dir" + lSep); |
| 253 | + msg.append(" -p, --parallel, number of parallel thread (default 4)" + lSep); |
| 254 | + msg.append(" -s, --schemas, a comma separated list of schemas for processing" + lSep); |
| 255 | + msg.append(" (works only if connected to oracle as sysdba)" + lSep); |
| 256 | + msg.append(" -c, --config, path to scheme2ddl config file (xml)" + lSep); |
| 257 | + msg.append(" -f, --filter, filter for specific DDL objects" + lSep); |
| 258 | + msg.append(" every LIKE wildcard can be used" + lSep); |
| 259 | + msg.append(" -tf, --type-filter, filter for specific DDL object types" + lSep); |
| 260 | + msg.append(" -tfm, --type-filtermode, mode for type filter: include(default) or exclude" + lSep); |
| 261 | + msg.append(" --stop-on-warning, stop on getting DDL error (skip by default)" + lSep); |
| 262 | + msg.append(" -rsv, replace actual filter values with 1 " + |
| 263 | + " --replace-sequence-values, " + lSep); |
| 264 | + msg.append(" -tc,--test-connection, test db connection available" + lSep); |
| 265 | + msg.append(" -version, print version info and exit" + lSep); |
265 | 266 | System.out.println(msg.toString());
|
266 | 267 | }
|
267 | 268 |
|
@@ -305,7 +306,7 @@ private static void collectArgs(String[] args) throws Exception {
|
305 | 306 | } else if (arg.equals("--stop-on-warning")) {
|
306 | 307 | stopOnWarning = true;
|
307 | 308 | } else if ((arg.equals("-fsv") || arg.equals("--filter-sequence-values"))) {
|
308 |
| - filterSequenceValues = true; |
| 309 | + replaceSequenceValues = true; |
309 | 310 | } else if (arg.equals("-c") || arg.equals("--config")) {
|
310 | 311 | customConfigLocation = args[i + 1];
|
311 | 312 | i++;
|
|
0 commit comments