Skip to content

Commit ed3b542

Browse files
committed
squid:S1213 The members of an interface declaration or class should appear in a pre-defined order
1 parent ce2078a commit ed3b542

File tree

7 files changed

+27
-41
lines changed

7 files changed

+27
-41
lines changed

src/main/java/net/sf/jsqlparser/expression/OracleHint.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public class OracleHint implements Expression {
3232

3333
private static final Pattern SINGLE_LINE = Pattern.compile("--\\+ *([^ ].*[^ ])");
3434
private static final Pattern MULTI_LINE = Pattern.compile("\\/\\*\\+ *([^ ].*[^ ]) *\\*+\\/", Pattern.MULTILINE | Pattern.DOTALL);
35-
35+
36+
private String value;
37+
private boolean singleLine = false;
38+
3639
public static boolean isHintMatch(String comment) {
3740
return SINGLE_LINE.matcher(comment).find() ||
3841
MULTI_LINE.matcher(comment).find();
3942
}
4043

41-
private String value;
42-
private boolean singleLine = false;
43-
4444
public final void setComment(String comment) {
4545
Matcher m;
4646
{

src/main/java/net/sf/jsqlparser/expression/WithinGroupExpression.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
public class WithinGroupExpression implements Expression {
3333

3434
private String name;
35+
36+
private List<OrderByElement> orderByElements;
37+
38+
private ExpressionList exprList;
3539

3640
public String getName() {
3741
return name;
@@ -41,8 +45,6 @@ public void setName(String name) {
4145
this.name = name;
4246
}
4347

44-
private List<OrderByElement> orderByElements;
45-
4648
public List<OrderByElement> getOrderByElements() {
4749
return orderByElements;
4850
}
@@ -51,8 +53,6 @@ public void setOrderByElements(List<OrderByElement> orderByElements) {
5153
this.orderByElements = orderByElements;
5254
}
5355

54-
private ExpressionList exprList;
55-
5656
public ExpressionList getExprList() {
5757
return exprList;
5858
}

src/main/java/net/sf/jsqlparser/expression/operators/relational/SupportsOldOracleJoinSyntax.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ public interface SupportsOldOracleJoinSyntax {
2626
int NO_ORACLE_JOIN = 0;
2727
int ORACLE_JOIN_RIGHT = 1;
2828
int ORACLE_JOIN_LEFT = 2;
29+
int NO_ORACLE_PRIOR = 0;
30+
int ORACLE_PRIOR_START = 1;
31+
int ORACLE_PRIOR_END = 2;
2932

3033
int getOldOracleJoinSyntax();
3134

3235
void setOldOracleJoinSyntax(int oldOracleJoinSyntax);
3336

34-
int NO_ORACLE_PRIOR = 0;
35-
int ORACLE_PRIOR_START = 1;
36-
int ORACLE_PRIOR_END = 2;
37-
3837
int getOraclePriorPosition();
3938

4039
void setOraclePriorPosition(int priorPosition);

src/main/java/net/sf/jsqlparser/parser/CCJSqlParserUtil.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
* @author toben
3535
*/
3636
public final class CCJSqlParserUtil {
37+
38+
private CCJSqlParserUtil() {}
39+
3740
public static Statement parse(Reader statementReader) throws JSQLParserException {
3841
CCJSqlParser parser = new CCJSqlParser(statementReader);
3942
try {
@@ -122,6 +125,4 @@ public static Statements parseStatements(String sqls) throws JSQLParserException
122125
}
123126
}
124127

125-
private CCJSqlParserUtil() {
126-
}
127128
}

src/main/java/net/sf/jsqlparser/statement/alter/Alter.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ public class Alter implements Statement {
4444
private ForeignKeyIndex fkIndex = null;
4545
private String operation;
4646
private String constraintName;
47-
47+
private boolean onDeleteRestrict;
48+
private boolean onDeleteSetNull;
4849
private boolean onDeleteCascade;
50+
private List<String> fkColumns;
51+
private String fkSourceTable;
52+
private List<String> fkSourceColumns;
4953

5054
public boolean isOnDeleteCascade() {
5155
return onDeleteCascade;
@@ -55,8 +59,6 @@ public void setOnDeleteCascade(boolean onDeleteCascade) {
5559
this.onDeleteCascade = onDeleteCascade;
5660
}
5761

58-
private boolean onDeleteRestrict;
59-
6062
public boolean isOnDeleteRestrict() {
6163
return onDeleteRestrict;
6264
}
@@ -65,8 +67,6 @@ public void setOnDeleteRestrict(boolean onDeleteRestrict) {
6567
this.onDeleteRestrict = onDeleteRestrict;
6668
}
6769

68-
private boolean onDeleteSetNull;
69-
7070
public boolean isOnDeleteSetNull() {
7171
return onDeleteSetNull;
7272
}
@@ -75,8 +75,6 @@ public void setOnDeleteSetNull(boolean onDeleteSetNull) {
7575
this.onDeleteSetNull = onDeleteSetNull;
7676
}
7777

78-
private List<String> fkColumns;
79-
8078
public List<String> getFkColumns() {
8179
return fkColumns;
8280
}
@@ -85,8 +83,6 @@ public void setFkColumns(List<String> fkColumns) {
8583
this.fkColumns = fkColumns;
8684
}
8785

88-
private String fkSourceTable;
89-
9086
public String getFkSourceTable() {
9187
return fkSourceTable;
9288
}
@@ -103,8 +99,6 @@ public void setOperation(String operation) {
10399
this.operation = operation;
104100
}
105101

106-
private List<String> fkSourceColumns;
107-
108102
public List<String> getFkSourceColumns() {
109103
return fkSourceColumns;
110104
}

src/main/java/net/sf/jsqlparser/statement/merge/Merge.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
public class Merge implements Statement {
3737

3838
private Table table;
39+
private Table usingTable;
40+
private SubSelect usingSelect;
41+
private Alias usingAlias;
42+
private Expression onCondition;
43+
private MergeInsert mergeInsert;
44+
private MergeUpdate mergeUpdate;
3945

4046
public Table getTable() {
4147
return table;
@@ -45,8 +51,6 @@ public void setTable(Table name) {
4551
table = name;
4652
}
4753

48-
private Table usingTable;
49-
5054
public Table getUsingTable() {
5155
return usingTable;
5256
}
@@ -55,8 +59,6 @@ public void setUsingTable(Table usingTable) {
5559
this.usingTable = usingTable;
5660
}
5761

58-
private SubSelect usingSelect;
59-
6062
public SubSelect getUsingSelect() {
6163
return usingSelect;
6264
}
@@ -68,8 +70,6 @@ public void setUsingSelect(SubSelect usingSelect) {
6870
}
6971
}
7072

71-
private Alias usingAlias;
72-
7373
public Alias getUsingAlias() {
7474
return usingAlias;
7575
}
@@ -78,8 +78,6 @@ public void setUsingAlias(Alias usingAlias) {
7878
this.usingAlias = usingAlias;
7979
}
8080

81-
private Expression onCondition;
82-
8381
public Expression getOnCondition() {
8482
return onCondition;
8583
}
@@ -88,8 +86,6 @@ public void setOnCondition(Expression onCondition) {
8886
this.onCondition = onCondition;
8987
}
9088

91-
private MergeInsert mergeInsert;
92-
9389
public MergeInsert getMergeInsert() {
9490
return mergeInsert;
9591
}
@@ -98,8 +94,6 @@ public void setMergeInsert(MergeInsert insert) {
9894
this.mergeInsert = insert;
9995
}
10096

101-
private MergeUpdate mergeUpdate;
102-
10397
public MergeUpdate getMergeUpdate() {
10498
return mergeUpdate;
10599
}

src/main/java/net/sf/jsqlparser/statement/merge/MergeUpdate.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public class MergeUpdate {
3333

3434
private List<Column> columns = null;
3535
private List<Expression> values = null;
36+
private Expression whereCondition;
37+
private Expression deleteWhereCondition;
3638

3739
public List<Column> getColumns() {
3840
return columns;
@@ -50,8 +52,6 @@ public void setValues(List<Expression> values) {
5052
this.values = values;
5153
}
5254

53-
private Expression whereCondition;
54-
5555
public Expression getWhereCondition() {
5656
return whereCondition;
5757
}
@@ -60,8 +60,6 @@ public void setWhereCondition(Expression whereCondition) {
6060
this.whereCondition = whereCondition;
6161
}
6262

63-
private Expression deleteWhereCondition;
64-
6563
public Expression getDeleteWhereCondition() {
6664
return deleteWhereCondition;
6765
}

0 commit comments

Comments
 (0)