Skip to content

Commit a92afc8

Browse files
committed
Api Docs clarify the connection between MongoCollection and the CodecRegistry
JAVA-1859
1 parent 487c04f commit a92afc8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

driver-async/src/main/com/mongodb/async/client/MongoCollection.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,13 @@
4343

4444
/**
4545
* The MongoCollection interface.
46-
* <p>
47-
Note: Additions to this interface will not be considered to break binary compatibility.
46+
*
47+
* <p>Note: Additions to this interface will not be considered to break binary compatibility.</p>
48+
*
49+
* <p>MongoCollection is generic allowing for different types to represent documents. Any custom classes must have a
50+
* {@link org.bson.codecs.Codec} registered in the {@link CodecRegistry}. The default {@code CodecRegistry} includes built-in support for:
51+
* {@link org.bson.BsonDocument} and {@link Document}.
52+
* </p>
4853
*
4954
* @param <TDocument> The type that this collection will encode documents from and decode documents to.
5055
* @since 3.0

driver/src/main/com/mongodb/client/MongoCollection.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
*
4646
* <p>Note: Additions to this interface will not be considered to break binary compatibility.</p>
4747
*
48+
* <p>MongoCollection is generic allowing for different types to represent documents. Any custom classes must have a
49+
* {@link org.bson.codecs.Codec} registered in the {@link CodecRegistry}. The default {@code CodecRegistry} includes built-in support for:
50+
* {@link org.bson.BsonDocument}, {@link Document} and {@link com.mongodb.DBObject}.
51+
* </p>
52+
*
4853
* @param <TDocument> The type that this collection will encode documents from and decode documents to.
4954
* @since 3.0
5055
*/

0 commit comments

Comments
 (0)