Example usage for com.mongodb.async.client FindIterable modifiers

List of usage examples for com.mongodb.async.client FindIterable modifiers

Introduction

In this page you can find the example usage for com.mongodb.async.client FindIterable modifiers.

Prototype

@Deprecated
FindIterable<T> modifiers(@Nullable Bson modifiers);

Source Link

Document

Sets the query modifiers to apply to this operation.

Usage

From source file:com.mastfrog.asyncpromises.mongo.FindBuilderImpl.java

License:Open Source License

FindIterable<T> apply(FindIterable<T> iter) {
    if (batchSize > 0) {
        iter = iter.batchSize(batchSize);
    }/*  w  ww  . j  av  a2 s . c  om*/
    if (limit > 0) {
        iter = iter.limit(limit);
    }
    if (projection != null) {
        iter = iter.projection(projection);
    }
    if (cursorType != null) {
        iter = iter.cursorType(cursorType);
    }
    if (filter != null) {
        iter = iter.filter(filter);
    }
    if (modifiers != null) {
        iter = iter.modifiers(modifiers);
    }
    if (unit != null) {
        iter = iter.maxTime(maxTime, unit);
    }
    if (sort != null) {
        iter = iter.sort(sort);
    }
    return iter;
}