private Object negate(String key, BasicDBObject value) {
        if (value.size() == 1) {
            return asDBObject(key, asDBObject("$not", value));

        } else {
            BasicDBList list2 = new BasicDBList();
            for (Map.Entry<String, Object> entry2 : value.entrySet()) {
                list2.add(asDBObject(key,
                        asDBObject("$not", asDBObject(entry2.getKey(), entry2.getValue()))));
            }
            return asDBObject("$or", list2);
        }
    }
Serializes the given Querydsl query to a DBObject query for MongoDB

@author laimw
@author sangyong choi
querydsl-mongodb/src/main/java/com/querydsl/mongodb/MongodbSerializer.java