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
+ */
10
10
package net .sf .jsqlparser .util .validation ;
11
11
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 ;
15
15
import net .sf .jsqlparser .statement .Statement ;
16
16
17
- public class ValidationError {
17
+ public class ValidationError {
18
18
19
- private final String statements ;
19
+ private final String statements ;
20
20
private Statement parsedStatement ;
21
21
22
22
private Set <ValidationException > errors = new HashSet <>();
23
- private ValidationCapability capability ;
24
-
23
+ private ValidationCapability capability ;
24
+
25
25
public ValidationError (String statements ) {
26
26
this .statements = statements ;
27
27
}
@@ -35,58 +35,58 @@ public ValidationError addErrors(Collection<ValidationException> errors) {
35
35
this .errors .addAll (errors );
36
36
return this ;
37
37
}
38
-
39
- /**
40
- * @return the set of {@link ValidationException}'s (no duplicates)
38
+
39
+ /**
40
+ * @return the set of {@link ValidationException}'s (no duplicates)
41
41
*/
42
42
public Set <ValidationException > getErrors () {
43
43
return errors ;
44
44
}
45
-
46
- /**
47
- * @return the {@link ValidationCapability} which produced this error
45
+
46
+ /**
47
+ * @return the {@link ValidationCapability} which produced this error
48
48
*/
49
49
public ValidationCapability getCapability () {
50
50
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 ) {
68
68
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 ;
73
73
}
74
74
75
75
public ValidationError withCapability (ValidationCapability databaseType ) {
76
76
setCapability (databaseType );
77
77
return this ;
78
- }
79
-
80
- public ValidationError withParsedStatement (Statement parsedStatement ) {
81
- setParsedStatement (parsedStatement );
82
- return this ;
83
78
}
84
79
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
+
91
91
92
92
}
0 commit comments