Example usage for com.mongodb.operation FindOperation FindOperation

List of usage examples for com.mongodb.operation FindOperation FindOperation

Introduction

In this page you can find the example usage for com.mongodb.operation FindOperation FindOperation.

Prototype

public FindOperation(final MongoNamespace namespace, final Decoder<T> decoder) 

Source Link

Document

Construct a new instance.

Usage

From source file:mongofx.driver.FindIterable.java

License:Open Source License

private FindOperation<Document> createQueryOperation() {
    return new FindOperation<>(namespace, codecRegistry.get(Document.class))
            .filter(filter.toBsonDocument(Document.class, codecRegistry)).batchSize(findOptions.getBatchSize())
            .skip(findOptions.getSkip()).limit(findOptions.getLimit())
            .maxTime(findOptions.getMaxTime(MILLISECONDS), MILLISECONDS)
            .modifiers(toBsonDocument(findOptions.getModifiers()))
            .projection(toBsonDocument(findOptions.getProjection())).sort(toBsonDocument(findOptions.getSort()))
            .cursorType(findOptions.getCursorType()).noCursorTimeout(findOptions.isNoCursorTimeout())
            .oplogReplay(findOptions.isOplogReplay()).partial(findOptions.isPartial())
            .slaveOk(readPreference.isSlaveOk());
}