protobuf4j.orm.sql.expr.LogicalOp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobuf4j-sql Show documentation
Show all versions of protobuf4j-sql Show documentation
A Facility Framework to Develop with Google Protobuf
The newest version!
package protobuf4j.orm.sql.expr;
import protobuf4j.orm.sql.IExpression;
import protobuf4j.orm.sql.ISqlOperator;
import static com.google.common.base.Preconditions.*;
/**
* author: yuanwq
* date: 2018/7/11
*/
public enum LogicalOp implements ISqlOperator {
AND(" AND "),
OR(" OR "),
XOR(" XOR "),
/**
* no left expr
*/
NOT("NOT ") {
@Override
public void checkExpression(IExpression left, IExpression right) {
checkArgument(left == null, "no left expr for NOT");
checkNotNull(right, "right expr is null");
}
};
private final String op;
LogicalOp(String op) {
this.op = op;
}
@Override
public String getOp() {
return op;
}
}