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

The following examples show how to use net.sf.jsqlparser.expression.operators.relational.NotEqualsTo. These examples are extracted from open source projects. 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
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
public NotEqualExpressionConverter() {
    setJsqlparserExpressionSupplier(new Supplier<NotEqualExpression, NotEqualsTo>() {
        @Override
        public NotEqualsTo get(NotEqualExpression input) {
            return new NotEqualsTo(input.getOperateSymbol());
        }
    });
}
 
Example 3
@Override
public Class<NotEqualsTo> getJSqlParserExpressionClass() {
    return NotEqualsTo.class;
}
 
Example 4
@Override
public void visit(NotEqualsTo notEqualsTo) {
    visitBinaryExpression(notEqualsTo);
}
 
Example 5
Source Project: spanner-jdbc   Source File: DMLWhereClauseVisitorAdapter.java    License: MIT License 4 votes vote down vote up
@Override
public void visit(NotEqualsTo expr) {
  invalid = true;
  super.visit(expr);
}
 
Example 6
Source Project: quetzal   Source File: CTEToNestedQueryConverter.java    License: Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void visit(NotEqualsTo notEqualsTo) {
	visitBinary(notEqualsTo, false);
}