@@ -97,7 +97,7 @@ for more information.
9797
9898To get a collection to use, just specify the name of the collection to
9999the [ getCollection(String
100- collectionName)] ( http://api.mongodb.org/java/2.13 /com/mongodb/DB.html#getCollection%28java.lang.String%29 )
100+ collectionName)] ( http://api.mongodb.org/java/2.14 /com/mongodb/DB.html#getCollection%28java.lang.String%29 )
101101method:
102102
103103``` java
@@ -110,7 +110,7 @@ data, query for data, etc
110110## Setting Write Concern
111111
112112As of version 2.10.0, the default write concern is
113- [ WriteConcern.ACKNOWLEDGED] ( http://api.mongodb.org/java/2.13 /com/mongodb/WriteConcern.html#ACKNOWLEDGED ) ,
113+ [ WriteConcern.ACKNOWLEDGED] ( http://api.mongodb.org/java/2.14 /com/mongodb/WriteConcern.html#ACKNOWLEDGED ) ,
114114but it can be easily changed:
115115
116116``` java
@@ -120,7 +120,7 @@ mongoClient.setWriteConcern(WriteConcern.JOURNALED);
120120There are many options for write concern. Additionally, the default
121121write concern can be overridden on the database, collection, and
122122individual update operations. Please consult the [ API
123- Documentation] ( http://api.mongodb.org/java/2.13 /index.html ) for
123+ Documentation] ( http://api.mongodb.org/java/2.14 /index.html ) for
124124details.
125125
126126## Inserting a Document
@@ -143,7 +143,7 @@ be represented as
143143
144144Notice that the above has an "inner" document embedded within it. To do
145145this, we can use the
146- [ BasicDBObject] ( http://api.mongodb.org/java/2.13 /com/mongodb/BasicDBObject.html )
146+ [ BasicDBObject] ( http://api.mongodb.org/java/2.14 /com/mongodb/BasicDBObject.html )
147147class to create the document (including the inner document), and then
148148just simply insert it into the collection using the ` insert() ` method.
149149
@@ -159,10 +159,10 @@ coll.insert(doc);
159159
160160To show that the document we inserted in the previous step is there, we
161161can do a simple
162- [ findOne()] ( http://api.mongodb.org/java/2.13 /com/mongodb/DBCollection.html#findOne%28java.lang.Object%29 )
162+ [ findOne()] ( http://api.mongodb.org/java/2.14 /com/mongodb/DBCollection.html#findOne%28java.lang.Object%29 )
163163operation to get the first document in the collection. This method
164- returns a single document (rather than the [ DBCursor] ( http://api.mongodb.org/java/2.13 /com/mongodb/DBCursor.html )
165- that the [ find()] ( http://api.mongodb.org/java/2.13 /com/mongodb/DBCollection.html#find()' )
164+ returns a single document (rather than the [ DBCursor] ( http://api.mongodb.org/java/2.14 /com/mongodb/DBCursor.html )
165+ that the [ find()] ( http://api.mongodb.org/java/2.14 /com/mongodb/DBCollection.html#find()' )
166166operation returns), and it's useful for things where there only is one
167167document, or you are only interested in the first. You don't have to
168168deal with the cursor.
0 commit comments