Package | Description |
---|---|
com.mongodb.client |
Modifier and Type | Method and Description |
---|---|
MongoCollection<org.bson.Document> |
MongoDatabase.getCollection(String collectionName)
Gets a collection.
|
<TDocument> |
MongoDatabase.getCollection(String collectionName,
Class<TDocument> documentClass)
Gets a collection, with a specific default document class.
|
MongoCollection<TDocument> |
MongoCollection.withCodecRegistry(org.bson.codecs.configuration.CodecRegistry codecRegistry)
Create a new MongoCollection instance with a different codec registry.
|
<NewTDocument> |
MongoCollection.withDocumentClass(Class<NewTDocument> clazz)
Create a new MongoCollection instance with a different default class to cast any documents returned from the database into..
|
MongoCollection<TDocument> |
MongoCollection.withReadConcern(com.mongodb.ReadConcern readConcern)
Create a new MongoCollection instance with a different read concern.
|
MongoCollection<TDocument> |
MongoCollection.withReadPreference(com.mongodb.ReadPreference readPreference)
Create a new MongoCollection instance with a different read preference.
|
MongoCollection<TDocument> |
MongoCollection.withWriteConcern(com.mongodb.WriteConcern writeConcern)
Create a new MongoCollection instance with a different write concern.
|
Copyright © 2017. All rights reserved.