net.sf.jsqlparser.expression.operators.relational.ExcludesExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsqlparser Show documentation
Show all versions of jsqlparser Show documentation
JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes.
The generated hierarchy can be navigated using the Visitor Pattern.
The newest version!
/*-
* #%L
* JSQLParser library
* %%
* Copyright (C) 2004 - 2019 JSQLParser
* %%
* Dual licensed under GNU LGPL 2.1 or Apache License 2.0
* #L%
*/
package net.sf.jsqlparser.expression.operators.relational;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.ExpressionVisitor;
import net.sf.jsqlparser.parser.ASTNodeAccessImpl;
public class ExcludesExpression extends ASTNodeAccessImpl implements Expression {
private Expression leftExpression;
private Expression rightExpression;
public ExcludesExpression() {}
public ExcludesExpression(Expression leftExpression, Expression rightExpression) {
this.leftExpression = leftExpression;
this.rightExpression = rightExpression;
}
public Expression getLeftExpression() {
return leftExpression;
}
public final void setLeftExpression(Expression expression) {
leftExpression = expression;
}
public ExcludesExpression withLeftExpression(Expression expression) {
this.setLeftExpression(expression);
return this;
}
public Expression getRightExpression() {
return rightExpression;
}
public void setRightExpression(Expression rightExpression) {
this.rightExpression = rightExpression;
}
@Override
public T accept(ExpressionVisitor expressionVisitor, S context) {
return expressionVisitor.visit(this, context);
}
@Override
public String toString() {
StringBuilder statementBuilder = new StringBuilder();
statementBuilder.append(leftExpression);
statementBuilder.append(" ");
statementBuilder.append("EXCLUDES ");
statementBuilder.append(rightExpression);
return statementBuilder.toString();
}
public ExcludesExpression withRightExpression(Expression rightExpression) {
this.setRightExpression(rightExpression);
return this;
}
public E getLeftExpression(Class type) {
return type.cast(getLeftExpression());
}
public E getRightExpression(Class type) {
return type.cast(getRightExpression());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy