Object left = stack.pop();
if (left instanceof MongoLiteral && right instanceof MongoFieldExpression)
{
String field = ((MongoFieldExpression)right).getFieldName();
Object value = ((MongoLiteral)left).getValue();
MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_NOTEQ);
stack.push(mongoExpr);
return mongoExpr;
}
else if (left instanceof MongoFieldExpression && right instanceof MongoLiteral)
{
String field = ((MongoFieldExpression)left).getFieldName();
Object value = ((MongoLiteral)right).getValue();
MongoExpression mongoExpr = new MongoBooleanExpression(field, value, MongoOperator.OP_NOTEQ);
stack.push(mongoExpr);
return mongoExpr;
}
// TODO Auto-generated method stub