Package | Description |
---|---|
com.mongodb |
Main package with core files.
|
com.mongodb.gridfs |
GridFS tools.
|
Modifier and Type | Method and Description |
---|---|
DBCursor |
DBCursor.addOption(int option)
Adds a query option.
|
DBCursor |
DBCursor.addSpecial(String name,
Object o)
Adds a special operator like $maxScan or $returnKey.
|
DBCursor |
DBCursor.batchSize(int numberOfElements)
Limits the number of elements returned in one batch.
|
DBCursor |
DBCursor.comment(String comment)
Adds a comment to the query to identify queries in the database profiler output.
|
DBCursor |
DBCursor.copy()
Creates a copy of an existing database cursor.
|
DBCursor |
DBCursor.disableBatchSizeTracking()
Deprecated.
This method is being added temporarily, and will be removed along with
getSizes() in the next major release |
DBCursor |
DBCollection.find()
Queries for all objects in this collection.
|
DBCursor |
DBCollection.find(DBObject ref)
Queries for an object in this collection.
|
DBCursor |
DBCollection.find(DBObject ref,
DBObject keys)
Queries for an object in this collection.
|
DBCursor |
DBCollection.find(DBObject query,
DBObject fields,
int numToSkip,
int batchSize)
Deprecated.
use
skip(int) and batchSize(int) on the DBCursor
returned from DBCollection.find(DBObject, DBObject) |
DBCursor |
DBCollection.find(DBObject query,
DBObject fields,
int numToSkip,
int batchSize,
int options)
Deprecated.
use
skip(int) , batchSize(int) and setOptions(int) on the DBCursor returned from DBCollection.find(DBObject,
DBObject) |
DBCursor |
DBCursor.hint(DBObject indexKeys)
Informs the database of indexed fields of the collection in order to improve performance.
|
DBCursor |
DBCursor.hint(String indexName)
Informs the database of an indexed field of the collection in order to improve performance.
|
DBCursor |
DBCursor.limit(int limit)
Limits the number of elements returned.
|
DBCursor |
DBCursor.max(DBObject max)
Specifies an exclusive upper limit for the index to use in a query.
|
DBCursor |
DBCursor.maxScan(int max)
Limits the number of documents a cursor will return for a query.
|
DBCursor |
DBCursor.maxTime(long maxTime,
TimeUnit timeUnit)
Set the maximum execution time for operations on this cursor.
|
DBCursor |
DBCursor.min(DBObject min)
Specifies an inclusive lower limit for the index to use in a query.
|
DBCursor |
DBCursor.resetOptions()
Resets the query options.
|
DBCursor |
DBCursor.returnKey()
Forces the cursor to only return fields included in the index.
|
DBCursor |
DBCursor.setDecoderFactory(DBDecoderFactory fact)
Sets the factory that will be used create a
DBDecoder that will be used to decode BSON documents into DBObject instances. |
DBCursor |
DBCursor.setOptions(int options)
Sets the query option - see Bytes.QUERYOPTION_* for list.
|
DBCursor |
DBCursor.setReadPreference(ReadPreference readPreference)
Sets the read preference for this cursor.
|
DBCursor |
DBCursor.showDiskLoc()
Modifies the documents returned to include references to the on-disk location of each document.
|
DBCursor |
DBCursor.skip(int numberOfElements)
Discards a given number of elements at the beginning of the cursor.
|
DBCursor |
DBCursor.slaveOk()
Deprecated.
Replaced with
ReadPreference.secondaryPreferred() |
DBCursor |
DBCursor.snapshot()
Use snapshot mode for the query.
|
DBCursor |
DBCursor.sort(DBObject orderBy)
Sorts this cursor's elements.
|
Modifier and Type | Method and Description |
---|---|
DBCursor |
GridFS.getFileList()
Gets the list of files stored in this gridfs, sorted by filename.
|
DBCursor |
GridFS.getFileList(DBObject query)
Gets a filtered list of files stored in this gridfs, sorted by filename.
|
DBCursor |
GridFS.getFileList(DBObject query,
DBObject sort)
Gets a sorted, filtered list of files stored in this gridfs.
|