Java com.mongodb DBCursor fields, constructors, methods, implement or subclass

Example usage for Java com.mongodb DBCursor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.mongodb DBCursor.

The text is from its open source code.

Subclass

com.mongodb.DBCursor has subclasses.
Click this link to see all its subclasses.

Field

Constructor

Method

DBCursoraddOption(final int option)
Adds a query option.
DBCursoraddSpecial(@Nullable final String name, @Nullable final Object value)
Adds a special operator like $comment or $returnKey.
DBCursorbatchSize(final int numberOfElements)

Limits the number of elements returned in one batch.

voidclose()
DBCursorcopy()
Creates a copy of an existing database cursor.
intcount()
Counts the number of objects matching the query.
DBObjectcurr()
Returns the element the cursor is at.
DBObjectexplain()
Returns an object containing basic information about the execution of the query that created this cursor.
DBCollectiongetCollection()
Gets the collection.
longgetCursorId()
DBObjectgetKeysWanted()
Gets the fields to be returned.
intgetOptions()
Gets the query options.
DBObjectgetQuery()
Gets the query.
ReadPreferencegetReadPreference()
Gets the default read preference.
ServerAddressgetServerAddress()
booleanhasNext()
Checks if there is another object available.
DBCursorhint(final DBObject indexKeys)
Informs the database of indexed fields of the collection in order to improve performance.
DBCursorhint(final String indexName)
Informs the database of an indexed field of the collection in order to improve performance.
Iteratoriterator()

Creates a copy of this cursor object that can be iterated.

intlength()
Pulls back all items into an array and returns the number of objects.
DBCursorlimit(final int limit)
Limits the number of elements returned.
DBCursormaxTime(final long maxTime, final TimeUnit timeUnit)
Set the maximum execution time for operations on this cursor.
DBObjectnext()
Returns the object the cursor is at and moves the cursor ahead by one.
DBObjectone()
Returns the first document that matches the query.
voidremove()
DBCursorsetDecoderFactory(final DBDecoderFactory factory)
Sets the factory that will be used create a DBDecoder that will be used to decode BSON documents into DBObject instances.
DBCursorsetReadPreference(final ReadPreference readPreference)
Sets the read preference for this cursor.
intsize()
Counts the number of objects matching the query this does take limit/skip into consideration
DBCursorskip(final int numberOfElements)
Discards a given number of elements at the beginning of the cursor.
DBCursorsort(final DBObject orderBy)
Sorts this cursor's elements.
ListtoArray()
Converts this cursor to an array.
ListtoArray(final int max)
Converts this cursor to an array.
StringtoString()