Example usage for Java com.mongodb DBCursor fields, constructors, methods, implement or subclass
The text is from its open source code.
int | numSeen |
DBCursor | addOption(final int option) Adds a query option. |
DBCursor | addSpecial(@Nullable final String name, @Nullable final Object value) Adds a special operator like $comment or $returnKey. |
DBCursor | batchSize(final int numberOfElements) Limits the number of elements returned in one batch. |
void | close() |
DBCursor | copy() Creates a copy of an existing database cursor. |
int | count() Counts the number of objects matching the query. |
DBObject | curr() Returns the element the cursor is at. |
DBObject | explain() Returns an object containing basic information about the execution of the query that created this cursor. |
DBCollection | getCollection() Gets the collection. |
long | getCursorId() |
DBObject | getKeysWanted() Gets the fields to be returned. |
int | getOptions() Gets the query options. |
DBObject | getQuery() Gets the query. |
ReadPreference | getReadPreference() Gets the default read preference. |
ServerAddress | getServerAddress() |
boolean | hasNext() Checks if there is another object available. |
DBCursor | hint(final DBObject indexKeys) Informs the database of indexed fields of the collection in order to improve performance. |
DBCursor | hint(final String indexName) Informs the database of an indexed field of the collection in order to improve performance. |
Iterator | iterator() Creates a copy of this cursor object that can be iterated. |
int | length() Pulls back all items into an array and returns the number of objects. |
DBCursor | limit(final int limit) Limits the number of elements returned. |
DBCursor | maxTime(final long maxTime, final TimeUnit timeUnit) Set the maximum execution time for operations on this cursor. |
DBObject | next() Returns the object the cursor is at and moves the cursor ahead by one. |
DBObject | one() Returns the first document that matches the query. |
void | remove() |
DBCursor | setDecoderFactory(final DBDecoderFactory factory) Sets the factory that will be used create a DBDecoder that will be used to decode BSON documents into DBObject instances. |
DBCursor | setReadPreference(final ReadPreference readPreference) Sets the read preference for this cursor. |
int | size() Counts the number of objects matching the query this does take limit/skip into consideration |
DBCursor | skip(final int numberOfElements) Discards a given number of elements at the beginning of the cursor. |
DBCursor | sort(final DBObject orderBy) Sorts this cursor's elements. |
List | toArray() Converts this cursor to an array. |
List | toArray(final int max) Converts this cursor to an array. |
String | toString() |