1- /*-
2- * #%L
3- * JSQLParser library
4- * %%
5- * Copyright (C) 2004 - 2020 JSQLParser
6- * %%
7- * Dual licensed under GNU LGPL 2.1 or Apache License 2.0
8- * #L%
9- */
1+ /*-
2+ * #%L
3+ * JSQLParser library
4+ * %%
5+ * Copyright (C) 2004 - 2020 JSQLParser
6+ * %%
7+ * Dual licensed under GNU LGPL 2.1 or Apache License 2.0
8+ * #L%
9+ */
1010package net .sf .jsqlparser .util .validation ;
1111
12- import java .util .Collection ;
13- import java .util .HashSet ;
14- import java .util .Set ;
12+ import java .util .Collection ;
13+ import java .util .HashSet ;
14+ import java .util .Set ;
1515import net .sf .jsqlparser .statement .Statement ;
1616
17- public class ValidationError {
17+ public class ValidationError {
1818
19- private final String statements ;
19+ private final String statements ;
2020 private Statement parsedStatement ;
2121
2222 private Set <ValidationException > errors = new HashSet <>();
23- private ValidationCapability capability ;
24-
23+ private ValidationCapability capability ;
24+
2525 public ValidationError (String statements ) {
2626 this .statements = statements ;
2727 }
@@ -35,58 +35,58 @@ public ValidationError addErrors(Collection<ValidationException> errors) {
3535 this .errors .addAll (errors );
3636 return this ;
3737 }
38-
39- /**
40- * @return the set of {@link ValidationException}'s (no duplicates)
38+
39+ /**
40+ * @return the set of {@link ValidationException}'s (no duplicates)
4141 */
4242 public Set <ValidationException > getErrors () {
4343 return errors ;
4444 }
45-
46- /**
47- * @return the {@link ValidationCapability} which produced this error
45+
46+ /**
47+ * @return the {@link ValidationCapability} which produced this error
4848 */
4949 public ValidationCapability getCapability () {
5050 return capability ;
51- }
52-
53- /**
54- * @return the parsed {@link Statement}, if parsing was possible
55- */
56- public Statement getParsedStatement () {
57- return parsedStatement ;
58- }
59-
60- /**
61- * @return the statements (may be more than one) given for validation
62- */
63- public String getStatements () {
64- return statements ;
65- }
66-
67- public void setCapability (ValidationCapability databaseType ) {
51+ }
52+
53+ /**
54+ * @return the parsed {@link Statement}, if parsing was possible
55+ */
56+ public Statement getParsedStatement () {
57+ return parsedStatement ;
58+ }
59+
60+ /**
61+ * @return the statements (may be more than one) given for validation
62+ */
63+ public String getStatements () {
64+ return statements ;
65+ }
66+
67+ public void setCapability (ValidationCapability databaseType ) {
6868 this .capability = databaseType ;
69- }
70-
71- public void setParsedStatement (Statement parsedStatement ) {
72- this .parsedStatement = parsedStatement ;
69+ }
70+
71+ public void setParsedStatement (Statement parsedStatement ) {
72+ this .parsedStatement = parsedStatement ;
7373 }
7474
7575 public ValidationError withCapability (ValidationCapability databaseType ) {
7676 setCapability (databaseType );
7777 return this ;
78- }
79-
80- public ValidationError withParsedStatement (Statement parsedStatement ) {
81- setParsedStatement (parsedStatement );
82- return this ;
8378 }
8479
85- @ Override
86- public String toString () {
87- return "ValidationError [\n statement=" + statements + "\n capability="
88- + (capability != null ? capability .getName () : "<null>" ) + "\n errors=" + errors + "\n ]" ;
89- }
90-
80+ public ValidationError withParsedStatement (Statement parsedStatement ) {
81+ setParsedStatement (parsedStatement );
82+ return this ;
83+ }
84+
85+ @ Override
86+ public String toString () {
87+ return "ValidationError [\n statement=" + statements + "\n capability="
88+ + (capability != null ? capability .getName () : "<null>" ) + "\n errors=" + errors + "\n ]" ;
89+ }
90+
9191
9292}
0 commit comments