net.sf.jsqlparser.expression.operators.relational.NotEqualsTo Java Examples

The following examples show how to use net.sf.jsqlparser.expression.operators.relational.NotEqualsTo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ObjectIdFunction.java    From sql-to-mongo-db-query-converter with Apache License 2.0 6 votes vote down vote up
public Object toDocument() throws ParseException {
    if (EqualsTo.class.isInstance(comparisonExpression)) {
        return new ObjectId(value.toString());
    } else if (NotEqualsTo.class.isInstance(comparisonExpression)) {
        return new Document("$ne", new ObjectId(value.toString()));
    } else if (InExpression.class.isInstance(comparisonExpression)) {
        InExpression inExpression = (InExpression) comparisonExpression;
        List<String> stringList = (List<String>) value;
        return new Document(inExpression.isNot() ? "$nin" : "$in", Lists.transform(stringList, new Function<String, ObjectId>() {
            @Override public ObjectId apply(String s) {
                return new ObjectId(s);
            }
        }));
    }
    throw new ParseException("Count not convert ObjectId function into document");
}
 
Example #2
Source File: NotEqualExpressionConverter.java    From sqlhelper with GNU Lesser General Public License v3.0 5 votes vote down vote up
public NotEqualExpressionConverter() {
    setJsqlparserExpressionSupplier(new Supplier<NotEqualExpression, NotEqualsTo>() {
        @Override
        public NotEqualsTo get(NotEqualExpression input) {
            return new NotEqualsTo(input.getOperateSymbol());
        }
    });
}
 
Example #3
Source File: NotEqualExpressionConverter.java    From sqlhelper with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public Class<NotEqualsTo> getJSqlParserExpressionClass() {
    return NotEqualsTo.class;
}
 
Example #4
Source File: ExpressionVisitorImpl.java    From DataPermissionHelper with Apache License 2.0 4 votes vote down vote up
@Override
public void visit(NotEqualsTo notEqualsTo) {
    visitBinaryExpression(notEqualsTo);
}
 
Example #5
Source File: DMLWhereClauseVisitorAdapter.java    From spanner-jdbc with MIT License 4 votes vote down vote up
@Override
public void visit(NotEqualsTo expr) {
  invalid = true;
  super.visit(expr);
}
 
Example #6
Source File: CTEToNestedQueryConverter.java    From quetzal with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void visit(NotEqualsTo notEqualsTo) {
	visitBinary(notEqualsTo, false);
}