|
@@ -54,10 +54,14 @@ public class FileExporterApp {
|
54
|
54
|
properties = basePath;
|
55
|
55
|
}
|
56
|
56
|
|
|
57
|
+ final int pageCount = getPageCount(args);
|
|
58
|
+
|
57
|
59
|
|
58
|
60
|
injector = Guice.createInjector(new PropertiesModule(appProperties), new SQLModule(type));
|
59
|
61
|
|
60
|
62
|
final SQLStarter instance = injector.getInstance(SQLStarter.class);
|
|
63
|
+ instance.setPageCount(pageCount);
|
|
64
|
+
|
61
|
65
|
instance.exportDataAndConvert(table, properties, tableClass, isTruncate);
|
62
|
66
|
}
|
63
|
67
|
|
|
@@ -85,6 +89,19 @@ public class FileExporterApp {
|
85
|
89
|
return null;
|
86
|
90
|
}
|
87
|
91
|
|
|
92
|
+ private static int getPageCount(String[] args) {
|
|
93
|
+ for (String arg : args) {
|
|
94
|
+ if (arg.startsWith("--size=")) {
|
|
95
|
+ try {
|
|
96
|
+ return Integer.parseInt(arg.substring("--size=".length()));
|
|
97
|
+ } catch (RuntimeException e) {
|
|
98
|
+
|
|
99
|
+ }
|
|
100
|
+ }
|
|
101
|
+ }
|
|
102
|
+ return 10000;
|
|
103
|
+ }
|
|
104
|
+
|
88
|
105
|
|
89
|
106
|
private static boolean jdbcArgs(String[] args, AppProperties properties) {
|
90
|
107
|
final DbProperties database = properties.getFromDb();
|