Package | Description |
---|---|
com.mongodb | |
com.mongodb.client.model |
Modifier and Type | Method and Description |
---|---|
DBCursor |
DBCollection.find(DBObject query,
DBCollectionFindOptions options)
Select documents in collection and get a cursor to the selected documents.
|
DBObject |
DBCollection.findOne(DBObject query,
DBCollectionFindOptions findOptions)
Get a single document from collection.
|
Modifier and Type | Method and Description |
---|---|
DBCollectionFindOptions |
DBCollectionFindOptions.batchSize(int batchSize)
Sets the number of documents to return per batch.
|
DBCollectionFindOptions |
DBCollectionFindOptions.collation(com.mongodb.client.model.Collation collation)
Sets the collation
|
DBCollectionFindOptions |
DBCollectionFindOptions.copy()
Copy this DBCollectionFindOptions instance into a new instance.
|
DBCollectionFindOptions |
DBCollectionFindOptions.cursorType(com.mongodb.CursorType cursorType)
Sets the cursor type.
|
DBCollectionFindOptions |
DBCollectionFindOptions.limit(int limit)
Sets the limit to apply.
|
DBCollectionFindOptions |
DBCollectionFindOptions.maxAwaitTime(long maxAwaitTime,
TimeUnit timeUnit)
Sets the maximum await execution time on the server for this operation.
|
DBCollectionFindOptions |
DBCollectionFindOptions.maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
DBCollectionFindOptions |
DBCollectionFindOptions.modifiers(DBObject modifiers)
Sets the query modifiers to apply to this operation.
|
DBCollectionFindOptions |
DBCollectionFindOptions.noCursorTimeout(boolean noCursorTimeout)
The server normally times out idle cursors after an inactivity period (10 minutes)
to prevent excess memory use.
|
DBCollectionFindOptions |
DBCollectionFindOptions.oplogReplay(boolean oplogReplay)
Users should not set this under normal circumstances.
|
DBCollectionFindOptions |
DBCollectionFindOptions.partial(boolean partial)
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
|
DBCollectionFindOptions |
DBCollectionFindOptions.projection(DBObject projection)
Sets a document describing the fields to return for all matching documents.
|
DBCollectionFindOptions |
DBCollectionFindOptions.readConcern(com.mongodb.ReadConcern readConcern)
Sets the readConcern
|
DBCollectionFindOptions |
DBCollectionFindOptions.readPreference(com.mongodb.ReadPreference readPreference)
Sets the readPreference
|
DBCollectionFindOptions |
DBCollectionFindOptions.skip(int skip)
Sets the number of documents to skip.
|
DBCollectionFindOptions |
DBCollectionFindOptions.sort(DBObject sort)
Sets the sort criteria to apply to the query.
|
Copyright © 2017. All rights reserved.