Skip to content

Commit

Permalink
reformating hole sourcecode
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Mar 22, 2017
1 parent 5d90186 commit 4146f86
Show file tree
Hide file tree
Showing 205 changed files with 4,810 additions and 4,668 deletions.
80 changes: 40 additions & 40 deletions src/main/java/net/sf/jsqlparser/JSQLParserException.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,52 +26,52 @@
*/
public class JSQLParserException extends Exception {

/* The serial class version */
private static final long serialVersionUID = -1099039459759769980L;
private Throwable cause = null;
/* The serial class version */
private static final long serialVersionUID = -1099039459759769980L;
private Throwable cause = null;

public JSQLParserException() {
super();
}
public JSQLParserException() {
super();
}

public JSQLParserException(String arg0) {
super(arg0);
}
public JSQLParserException(String arg0) {
super(arg0);
}

public JSQLParserException(Throwable arg0) {
this.cause = arg0;
}
public JSQLParserException(Throwable arg0) {
this.cause = arg0;
}

public JSQLParserException(String arg0, Throwable arg1) {
super(arg0);
this.cause = arg1;
}
public JSQLParserException(String arg0, Throwable arg1) {
super(arg0);
this.cause = arg1;
}

@Override
public Throwable getCause() {
return cause;
}
@Override
public Throwable getCause() {
return cause;
}

@Override
public void printStackTrace() {
printStackTrace(System.err);
}
@Override
public void printStackTrace() {
printStackTrace(System.err);
}

@Override
public void printStackTrace(java.io.PrintWriter pw) {
super.printStackTrace(pw);
if (cause != null) {
pw.println("Caused by:");
cause.printStackTrace(pw);
}
}
@Override
public void printStackTrace(java.io.PrintWriter pw) {
super.printStackTrace(pw);
if (cause != null) {
pw.println("Caused by:");
cause.printStackTrace(pw);
}
}

@Override
public void printStackTrace(java.io.PrintStream ps) {
super.printStackTrace(ps);
if (cause != null) {
ps.println("Caused by:");
cause.printStackTrace(ps);
}
}
@Override
public void printStackTrace(java.io.PrintStream ps) {
super.printStackTrace(ps);
if (cause != null) {
ps.println("Caused by:");
cause.printStackTrace(ps);
}
}
}
64 changes: 32 additions & 32 deletions src/main/java/net/sf/jsqlparser/expression/Alias.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,36 @@
*/
public class Alias {

private String name;
private boolean useAs = true;

public Alias(String name) {
this.name = name;
}
public Alias(String name, boolean useAs) {
this.name = name;
this.useAs = useAs;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public boolean isUseAs() {
return useAs;
}

public void setUseAs(boolean useAs) {
this.useAs = useAs;
}

@Override
public String toString() {
return (useAs ? " AS " : " ") + name;
}
private String name;
private boolean useAs = true;

public Alias(String name) {
this.name = name;
}

public Alias(String name, boolean useAs) {
this.name = name;
this.useAs = useAs;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public boolean isUseAs() {
return useAs;
}

public void setUseAs(boolean useAs) {
this.useAs = useAs;
}

@Override
public String toString() {
return (useAs ? " AS " : " ") + name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@

public class AllComparisonExpression implements Expression {

private final SubSelect subSelect;
private final SubSelect subSelect;

public AllComparisonExpression(SubSelect subSelect) {
this.subSelect = subSelect;
}
public AllComparisonExpression(SubSelect subSelect) {
this.subSelect = subSelect;
}

public SubSelect getSubSelect() {
return subSelect;
}

public SubSelect getSubSelect() {
return subSelect;
}
@Override
public void accept(ExpressionVisitor expressionVisitor) {
expressionVisitor.visit(this);
}

@Override
public void accept(ExpressionVisitor expressionVisitor) {
expressionVisitor.visit(this);
}

@Override
public String toString() {
return "ALL " + subSelect.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
import net.sf.jsqlparser.statement.select.PlainSelect;

/**
* Analytic function. The name of the function is variable but the parameters
* following the special analytic function path. e.g. row_number() over (order
* by test). Additional there can be an expression for an analytical aggregate
* like sum(col) or the "all collumns" wildcard like count(*).
* Analytic function. The name of the function is variable but the parameters following the special
* analytic function path. e.g. row_number() over (order by test). Additional there can be an
* expression for an analytical aggregate like sum(col) or the "all collumns" wildcard like
* count(*).
*
* @author tw
*/
Expand Down Expand Up @@ -157,7 +157,8 @@ public void setAllColumns(boolean allColumns) {
private void toStringPartitionBy(StringBuilder b) {
if (partitionExpressionList != null && !partitionExpressionList.getExpressions().isEmpty()) {
b.append("PARTITION BY ");
b.append(PlainSelect.getStringList(partitionExpressionList.getExpressions(), true, false));
b.append(PlainSelect.
getStringList(partitionExpressionList.getExpressions(), true, false));
b.append(" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,32 @@

/**
* Combines ANY and SOME expressions.
*
* @author toben
*/
public class AnyComparisonExpression implements Expression {

private final SubSelect subSelect;
private final SubSelect subSelect;
private final AnyType anyType;
public AnyComparisonExpression(AnyType anyType, SubSelect subSelect) {

public AnyComparisonExpression(AnyType anyType, SubSelect subSelect) {
this.anyType = anyType;
this.subSelect = subSelect;
}
this.subSelect = subSelect;
}

public SubSelect getSubSelect() {
return subSelect;
}
public SubSelect getSubSelect() {
return subSelect;
}

@Override
public void accept(ExpressionVisitor expressionVisitor) {
expressionVisitor.visit(this);
}
@Override
public void accept(ExpressionVisitor expressionVisitor) {
expressionVisitor.visit(this);
}

public AnyType getAnyType() {
return anyType;
}

@Override
public String toString() {
return anyType.name() + " " + subSelect.toString();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/sf/jsqlparser/expression/AnyType.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
* #L%
*/
/*
/*
* Copyright (C) 2015 JSQLParser.
*
* This library is free software; you can redistribute it and/or
Expand All @@ -45,6 +45,6 @@
*/
public enum AnyType {

ANY,
ANY,
SOME
}
60 changes: 30 additions & 30 deletions src/main/java/net/sf/jsqlparser/expression/BinaryExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,46 +22,46 @@
package net.sf.jsqlparser.expression;

/**
* A basic class for binary expressions, that is expressions having a left
* member and a right member which are in turn expressions.
* A basic class for binary expressions, that is expressions having a left member and a right member
* which are in turn expressions.
*/
public abstract class BinaryExpression implements Expression {

private Expression leftExpression;
private Expression rightExpression;
private boolean not = false;
private Expression leftExpression;
private Expression rightExpression;
private boolean not = false;

public BinaryExpression() {
}
public BinaryExpression() {
}

public Expression getLeftExpression() {
return leftExpression;
}
public Expression getLeftExpression() {
return leftExpression;
}

public Expression getRightExpression() {
return rightExpression;
}
public Expression getRightExpression() {
return rightExpression;
}

public void setLeftExpression(Expression expression) {
leftExpression = expression;
}
public void setLeftExpression(Expression expression) {
leftExpression = expression;
}

public void setRightExpression(Expression expression) {
rightExpression = expression;
}
public void setRightExpression(Expression expression) {
rightExpression = expression;
}

public void setNot() {
not = true;
}
public void setNot() {
not = true;
}

public boolean isNot() {
return not;
}
public boolean isNot() {
return not;
}

@Override
public String toString() {
return (not ? "NOT " : "") + getLeftExpression() + " " + getStringExpression() + " " + getRightExpression();
}
@Override
public String toString() {
return (not ? "NOT " : "") + getLeftExpression() + " " + getStringExpression() + " " + getRightExpression();
}

public abstract String getStringExpression();
public abstract String getStringExpression();
}
Loading

0 comments on commit 4146f86

Please sign in to comment.