public DBObject toSort(List<OrderSpecifier<?>> orderBys) {
        BasicDBObject sort = new BasicDBObject();
        for (OrderSpecifier<?> orderBy : orderBys) {
            Object key = orderBy.getTarget().accept(this, null);
            sort.append(key.toString(), orderBy.getOrder() == Order.ASC ? 1 : -1);
        }
        return sort;
    }
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