|
16 | 16 | package org.pgcodekeeper.core.settings; |
17 | 17 |
|
18 | 18 | import org.pgcodekeeper.core.Consts; |
19 | | -import org.pgcodekeeper.core.database.base.formatter.FormatConfiguration; |
| 19 | +import org.pgcodekeeper.core.database.api.formatter.IFormatConfiguration; |
20 | 20 | import org.pgcodekeeper.core.database.api.schema.DbObjType; |
21 | 21 |
|
22 | 22 | import java.util.ArrayList; |
@@ -51,6 +51,8 @@ public class CoreSettings implements ISettings { |
51 | 51 | private boolean ignoreConcurrentModification; |
52 | 52 | private boolean parallelLoad; |
53 | 53 | private boolean disableAutoLoad; |
| 54 | + private IFormatConfiguration formatConfiguration; |
| 55 | + private boolean isAutoFormatObjectCode; |
54 | 56 |
|
55 | 57 | private String timeZone; |
56 | 58 | private String clusterName; |
@@ -134,7 +136,11 @@ public void setCommentsToEnd(boolean commentsToEnd) { |
134 | 136 |
|
135 | 137 | @Override |
136 | 138 | public boolean isAutoFormatObjectCode() { |
137 | | - return false; |
| 139 | + return isAutoFormatObjectCode; |
| 140 | + } |
| 141 | + |
| 142 | + public void setAutoFormatObjectCode(boolean isAutoFormatObjectCode) { |
| 143 | + this.isAutoFormatObjectCode = isAutoFormatObjectCode; |
138 | 144 | } |
139 | 145 |
|
140 | 146 | @Override |
@@ -247,8 +253,12 @@ public void setTimeZone(String timeZone) { |
247 | 253 | } |
248 | 254 |
|
249 | 255 | @Override |
250 | | - public FormatConfiguration getFormatConfiguration() { |
251 | | - return null; |
| 256 | + public IFormatConfiguration getFormatConfiguration() { |
| 257 | + return formatConfiguration; |
| 258 | + } |
| 259 | + |
| 260 | + public void setFormatConfiguration(IFormatConfiguration formatConfiguration) { |
| 261 | + this.formatConfiguration = formatConfiguration; |
252 | 262 | } |
253 | 263 |
|
254 | 264 | @Override |
@@ -334,6 +344,8 @@ public CoreSettings copy() { |
334 | 344 | settings.clusterName = clusterName; |
335 | 345 | settings.parallelLoad = parallelLoad; |
336 | 346 | settings.disableAutoLoad = disableAutoLoad; |
| 347 | + settings.formatConfiguration = formatConfiguration; |
| 348 | + settings.isAutoFormatObjectCode = isAutoFormatObjectCode; |
337 | 349 | return settings; |
338 | 350 | } |
339 | 351 | } |
0 commit comments