Skip to content

Commit 5302b45

Browse files
committed
some housekeeping: adding override annotations
1 parent af7fc5c commit 5302b45

File tree

75 files changed

+4832
-4636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+4832
-4636
lines changed
Lines changed: 80 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,80 @@
1-
/* ================================================================
2-
* JSQLParser : java based sql parser
3-
* ================================================================
4-
*
5-
* Project Info: http://jsqlparser.sourceforge.net
6-
* Project Lead: Leonardo Francalanci (leoonardoo@yahoo.it);
7-
*
8-
* (C) Copyright 2004, by Leonardo Francalanci
9-
*
10-
* This library is free software; you can redistribute it and/or modify it under the terms
11-
* of the GNU Lesser General Public License as published by the Free Software Foundation;
12-
* either version 2.1 of the License, or (at your option) any later version.
13-
*
14-
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15-
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16-
* See the GNU Lesser General Public License for more details.
17-
*
18-
* You should have received a copy of the GNU Lesser General Public License along with this
19-
* library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20-
* Boston, MA 02111-1307, USA.
21-
*/
22-
23-
package net.sf.jsqlparser;
24-
25-
/**
26-
* An exception class with stack trace informations
27-
*/
28-
public class JSQLParserException extends Exception {
29-
30-
/* The serial class version */
31-
private static final long serialVersionUID = -1099039459759769980L;
32-
33-
private Throwable cause = null;
34-
35-
public JSQLParserException() {
36-
super();
37-
}
38-
39-
public JSQLParserException(String arg0) {
40-
super(arg0);
41-
}
42-
43-
public JSQLParserException(Throwable arg0) {
44-
this.cause = arg0;
45-
}
46-
47-
public JSQLParserException(String arg0, Throwable arg1) {
48-
super(arg0);
49-
this.cause = arg1;
50-
}
51-
52-
public Throwable getCause() {
53-
return cause;
54-
}
55-
56-
public void printStackTrace() {
57-
printStackTrace(System.err);
58-
}
59-
60-
public void printStackTrace(java.io.PrintWriter pw) {
61-
super.printStackTrace(pw);
62-
if (cause != null) {
63-
pw.println("Caused by:");
64-
cause.printStackTrace(pw);
65-
}
66-
}
67-
68-
public void printStackTrace(java.io.PrintStream ps) {
69-
super.printStackTrace(ps);
70-
if (cause != null) {
71-
ps.println("Caused by:");
72-
cause.printStackTrace(ps);
73-
}
74-
}
75-
76-
}
1+
/* ================================================================
2+
* JSQLParser : java based sql parser
3+
* ================================================================
4+
*
5+
* Project Info: http://jsqlparser.sourceforge.net
6+
* Project Lead: Leonardo Francalanci (leoonardoo@yahoo.it);
7+
*
8+
* (C) Copyright 2004, by Leonardo Francalanci
9+
*
10+
* This library is free software; you can redistribute it and/or modify it under the terms
11+
* of the GNU Lesser General Public License as published by the Free Software Foundation;
12+
* either version 2.1 of the License, or (at your option) any later version.
13+
*
14+
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15+
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16+
* See the GNU Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public License along with this
19+
* library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20+
* Boston, MA 02111-1307, USA.
21+
*/
22+
23+
package net.sf.jsqlparser;
24+
25+
/**
26+
* An exception class with stack trace informations
27+
*/
28+
public class JSQLParserException extends Exception {
29+
30+
/* The serial class version */
31+
private static final long serialVersionUID = -1099039459759769980L;
32+
33+
private Throwable cause = null;
34+
35+
public JSQLParserException() {
36+
super();
37+
}
38+
39+
public JSQLParserException(String arg0) {
40+
super(arg0);
41+
}
42+
43+
public JSQLParserException(Throwable arg0) {
44+
this.cause = arg0;
45+
}
46+
47+
public JSQLParserException(String arg0, Throwable arg1) {
48+
super(arg0);
49+
this.cause = arg1;
50+
}
51+
52+
@Override
53+
public Throwable getCause() {
54+
return cause;
55+
}
56+
57+
@Override
58+
public void printStackTrace() {
59+
printStackTrace(System.err);
60+
}
61+
62+
@Override
63+
public void printStackTrace(java.io.PrintWriter pw) {
64+
super.printStackTrace(pw);
65+
if (cause != null) {
66+
pw.println("Caused by:");
67+
cause.printStackTrace(pw);
68+
}
69+
}
70+
71+
@Override
72+
public void printStackTrace(java.io.PrintStream ps) {
73+
super.printStackTrace(ps);
74+
if (cause != null) {
75+
ps.println("Caused by:");
76+
cause.printStackTrace(ps);
77+
}
78+
}
79+
80+
}
Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
package net.sf.jsqlparser.expression;
2-
3-
import net.sf.jsqlparser.statement.select.SubSelect;
4-
5-
public class AllComparisonExpression implements Expression {
6-
private SubSelect subSelect;
7-
8-
public AllComparisonExpression(SubSelect subSelect) {
9-
this.subSelect = subSelect;
10-
}
11-
12-
public SubSelect GetSubSelect() {
13-
return subSelect;
14-
}
15-
16-
public void accept(ExpressionVisitor expressionVisitor) {
17-
expressionVisitor.visit(this);
18-
}
19-
20-
}
1+
package net.sf.jsqlparser.expression;
2+
3+
import net.sf.jsqlparser.statement.select.SubSelect;
4+
5+
public class AllComparisonExpression implements Expression {
6+
private SubSelect subSelect;
7+
8+
public AllComparisonExpression(SubSelect subSelect) {
9+
this.subSelect = subSelect;
10+
}
11+
12+
public SubSelect GetSubSelect() {
13+
return subSelect;
14+
}
15+
16+
@Override
17+
public void accept(ExpressionVisitor expressionVisitor) {
18+
expressionVisitor.visit(this);
19+
}
20+
21+
}
Lines changed: 74 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,74 @@
1-
package net.sf.jsqlparser.expression;
2-
3-
import java.util.List;
4-
5-
/**
6-
* Analytic function. The name of the function is variable but the parameters
7-
* following the special analytic function path.
8-
* e.g. row_number() over (order by test)
9-
* @author tw
10-
*/
11-
public class AnalyticExpression implements Expression {
12-
13-
private List partitionByColumns;
14-
private List orderByElements;
15-
private String name;
16-
17-
@Override
18-
public void accept(ExpressionVisitor expressionVisitor) {
19-
expressionVisitor.visit(this);
20-
}
21-
22-
public List getOrderByElements() {
23-
return orderByElements;
24-
}
25-
26-
public void setOrderByElements(List orderByElements) {
27-
this.orderByElements = orderByElements;
28-
}
29-
30-
public List getPartitionByColumns() {
31-
return partitionByColumns;
32-
}
33-
34-
public void setPartitionByColumns(List partitionByColumns) {
35-
this.partitionByColumns = partitionByColumns;
36-
}
37-
38-
public String getName() {
39-
return name;
40-
}
41-
42-
public void setName(String name) {
43-
this.name = name;
44-
}
45-
46-
public String toString() {
47-
StringBuilder b = new StringBuilder();
48-
49-
b.append(name).append("() OVER (");
50-
if (partitionByColumns!=null && !partitionByColumns.isEmpty()) {
51-
b.append("PARTITION BY ");
52-
for (int i=0;i<partitionByColumns.size();i++) {
53-
if (i>0)
54-
b.append(", ");
55-
b.append(partitionByColumns.get(i).toString());
56-
}
57-
b.append(" ");
58-
}
59-
60-
if (orderByElements!=null && !orderByElements.isEmpty()) {
61-
b.append("ORDER BY ");
62-
for (int i=0;i<orderByElements.size();i++) {
63-
if (i>0)
64-
b.append(", ");
65-
b.append(orderByElements.get(i).toString());
66-
}
67-
}
68-
69-
b.append(")");
70-
71-
return b.toString();
72-
}
73-
}
1+
package net.sf.jsqlparser.expression;
2+
3+
import java.util.List;
4+
5+
/**
6+
* Analytic function. The name of the function is variable but the parameters
7+
* following the special analytic function path.
8+
* e.g. row_number() over (order by test)
9+
* @author tw
10+
*/
11+
public class AnalyticExpression implements Expression {
12+
13+
private List partitionByColumns;
14+
private List orderByElements;
15+
private String name;
16+
17+
@Override
18+
public void accept(ExpressionVisitor expressionVisitor) {
19+
expressionVisitor.visit(this);
20+
}
21+
22+
public List getOrderByElements() {
23+
return orderByElements;
24+
}
25+
26+
public void setOrderByElements(List orderByElements) {
27+
this.orderByElements = orderByElements;
28+
}
29+
30+
public List getPartitionByColumns() {
31+
return partitionByColumns;
32+
}
33+
34+
public void setPartitionByColumns(List partitionByColumns) {
35+
this.partitionByColumns = partitionByColumns;
36+
}
37+
38+
public String getName() {
39+
return name;
40+
}
41+
42+
public void setName(String name) {
43+
this.name = name;
44+
}
45+
46+
@Override
47+
public String toString() {
48+
StringBuilder b = new StringBuilder();
49+
50+
b.append(name).append("() OVER (");
51+
if (partitionByColumns!=null && !partitionByColumns.isEmpty()) {
52+
b.append("PARTITION BY ");
53+
for (int i=0;i<partitionByColumns.size();i++) {
54+
if (i>0)
55+
b.append(", ");
56+
b.append(partitionByColumns.get(i).toString());
57+
}
58+
b.append(" ");
59+
}
60+
61+
if (orderByElements!=null && !orderByElements.isEmpty()) {
62+
b.append("ORDER BY ");
63+
for (int i=0;i<orderByElements.size();i++) {
64+
if (i>0)
65+
b.append(", ");
66+
b.append(orderByElements.get(i).toString());
67+
}
68+
}
69+
70+
b.append(")");
71+
72+
return b.toString();
73+
}
74+
}
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
package net.sf.jsqlparser.expression;
2-
3-
import net.sf.jsqlparser.statement.select.SubSelect;
4-
5-
public class AnyComparisonExpression implements Expression {
6-
private SubSelect subSelect;
7-
8-
public AnyComparisonExpression(SubSelect subSelect) {
9-
this.subSelect = subSelect;
10-
}
11-
12-
public SubSelect GetSubSelect() {
13-
return subSelect;
14-
}
15-
16-
public void accept(ExpressionVisitor expressionVisitor) {
17-
expressionVisitor.visit(this);
18-
}
19-
}
1+
package net.sf.jsqlparser.expression;
2+
3+
import net.sf.jsqlparser.statement.select.SubSelect;
4+
5+
public class AnyComparisonExpression implements Expression {
6+
private SubSelect subSelect;
7+
8+
public AnyComparisonExpression(SubSelect subSelect) {
9+
this.subSelect = subSelect;
10+
}
11+
12+
public SubSelect GetSubSelect() {
13+
return subSelect;
14+
}
15+
16+
@Override
17+
public void accept(ExpressionVisitor expressionVisitor) {
18+
expressionVisitor.visit(this);
19+
}
20+
}

0 commit comments

Comments
 (0)