net.sf.jsqlparser.statement.select.MinusOp 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.statement.select;
import net.sf.jsqlparser.statement.select.SetOperationList.SetOperationType;
public class MinusOp extends SetOperation {
private boolean distinct;
private boolean all;
public MinusOp() {
super(SetOperationType.MINUS);
}
public boolean isAll() {
return all;
}
public void setAll(boolean all) {
this.all = all;
}
public boolean isDistinct() {
return distinct;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
@Override
public String toString() {
String allDistinct = "";
if (isAll()) {
allDistinct = " ALL";
} else if (isDistinct()) {
allDistinct = " DISTINCT";
}
return super.toString() + allDistinct;
}
public MinusOp withDistinct(boolean distinct) {
this.setDistinct(distinct);
return this;
}
public MinusOp withAll(boolean all) {
this.setAll(all);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy