Skip to content

Commit 2d0ec0c

Browse files
committed
Backport Javadoc apiref link fixes from 4.x to master
JAVA-3525
1 parent ff0386e commit 2d0ec0c

28 files changed

+254
-254
lines changed

docs/reference/content/bson/pojos.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Each `PropertyModel` includes:
4040
discriminator key and value.
4141

4242
ClassModels are built using the [`ClassModelBuilder`]({{<apiref "org/bson/codecs/pojo/ClassModelBuilder.html">}}) which can be accessed via
43-
the [`ClassModel.builder(clazz)`]({{<apiref "org/bson/codecs/pojo/ClassModel.html#builder-java.lang.Class-">}}) method. The builder
43+
the [`ClassModel.builder(clazz)`]({{<apiref "org/bson/codecs/pojo/ClassModel.html#builder(java.lang.Class)">}}) method. The builder
4444
initially uses reflection to create the required metadata.
4545

4646
POJO `Codec` instances are created by the [`PojoCodecProvider`]({{<apiref "org/bson/codecs/pojo/PojoCodecProvider.html">}}) which is a
@@ -327,8 +327,8 @@ The following Conventions are available from the [`Conventions`]({{<apiref "org/
327327
* The [`NO_CONVENTIONS`]({{<apiref "org/bson/codecs/pojo/Conventions.html#NO_CONVENTIONS">}}) an empty list.
328328

329329
Custom Conventions can either be set globally via the
330-
[`PojoCodecProvider.Builder.conventions(conventions)`]({{<apiref "org/bson/codecs/pojo/PojoCodecProvider.Builder.html#conventions-java.util.List-">}})
331-
method, or via the [`ClassModelBuilder.conventions(conventions)`]({{<apiref "org/bson/codecs/pojo/ClassModelBuilder.html#conventions-java.util.List-">}})
330+
[`PojoCodecProvider.Builder.conventions(conventions)`]({{<apiref "org/bson/codecs/pojo/PojoCodecProvider.Builder.html#conventions(java.util.List)">}})
331+
method, or via the [`ClassModelBuilder.conventions(conventions)`]({{<apiref "org/bson/codecs/pojo/ClassModelBuilder.html#conventions(java.util.List)">}})
332332
method.
333333

334334
{{% note class="note" %}}
@@ -408,7 +408,7 @@ If a POJO contains a field that has an abstract type or has an interface as its
408408
subtypes / implementations need to be registered with the `PojoCodecProvider` so that values can be encoded and decoded correctly.
409409

410410
The easiest way to enable a discriminator is to annotate the abstract class with the `Discriminator` annotation. Alternatively, the
411-
[`ClassModelBuilder.enableDiscriminator(true)`]({{<apiref "org/bson/codecs/pojo/ClassModelBuilder.html#enableDiscriminator-boolean-">}})
411+
[`ClassModelBuilder.enableDiscriminator(true)`]({{<apiref "org/bson/codecs/pojo/ClassModelBuilder.html#enableDiscriminator(boolean)">}})
412412
method can be used to enable the use of a discriminator.
413413

414414
The following example creates a `CodecRegistry` with discriminators enabled for a `User` interface and its concrete `FreeUser` and

docs/reference/content/driver-async/getting-started/quick-start-pojo.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Remember, always check for errors in any `SingleResultCallback<T>` implementatio
187187
For sake of brevity, this tutorial omits the error check logic in the code examples.
188188
{{% /note %}}
189189

190-
To insert a Person into the collection, you can use the collection's [`insertOne()`]({{< apiref "com/mongodb/client/MongoCollection.html#insertOne-TDocument-" >}}) method.
190+
To insert a Person into the collection, you can use the collection's [`insertOne()`]({{< apiref "com/mongodb/client/MongoCollection.html#insertOne(TDocument)" >}}) method.
191191

192192
```java
193193
Person ada = new Person("Ada Byron", 20, new Address("St James Square", "London", "W1"));
@@ -201,7 +201,7 @@ collection.insertOne(ada, new SingleResultCallback<Void>() {
201201

202202
### Insert Many Persons
203203

204-
To add multiple Person instances, you can use the collection's [`insertMany()`]({{< apiref "com/mongodb/client/MongoCollection.html#insertMany-java.util.List-" >}}) method
204+
To add multiple Person instances, you can use the collection's [`insertMany()`]({{< apiref "com/mongodb/client/MongoCollection.html#insertMany(java.util.List)" >}}) method
205205
which takes a list of `Person`.
206206

207207
The following example will add multiple Person instances into the collection:
@@ -228,7 +228,7 @@ collection.insertMany(people, new SingleResultCallback<Void>() {
228228

229229
## Query the Collection
230230

231-
To query the collection, you can use the collection's [`find()`]({{< apiref "com/mongodb/client/MongoCollection.html#find--">}}) method.
231+
To query the collection, you can use the collection's [`find()`]({{< apiref "com/mongodb/client/MongoCollection.html#find()">}}) method.
232232

233233
The following example prints all the Person instances in the collection:
234234
```java
@@ -249,7 +249,7 @@ SingleResultCallback<Void> callbackWhenFinished = new SingleResultCallback<Void>
249249
collection.find().forEach(printBlock, callbackWhenFinished);
250250
```
251251

252-
The example uses the [`forEach`]({{ <apiref "com/mongodb/client/MongoIterable.html#forEach-com.mongodb.Block-">}}) method on the ``FindIterable``
252+
The example uses the [`forEach`]({{ <apiref "com/mongodb/client/MongoIterable.html#forEach(com.mongodb.Block)">}}) method on the ``FindIterable``
253253
object to apply a block to each Person and outputs the following:
254254

255255
```bash
@@ -261,7 +261,7 @@ Person{id='591dbc2550852fa685b3ad1a', name='Timothy Berners-Lee', age=61, addres
261261

262262
## Specify a Query Filter
263263

264-
To query for Person instance that match certain conditions, pass a filter object to the [`find()`]({{< apiref "com/mongodb/client/MongoCollection.html#find--">}}) method.
264+
To query for Person instance that match certain conditions, pass a filter object to the [`find()`]({{< apiref "com/mongodb/client/MongoCollection.html#find()">}}) method.
265265
To facilitate creating filter objects, Java driver provides the [`Filters`]({{< apiref "com/mongodb/client/model/Filters.html">}}) helper.
266266

267267
{{% note class="important" %}}
@@ -272,7 +272,7 @@ By default they are the same but it is possible to change how POJO property name
272272

273273
### Get A Single Person That Matches a Filter
274274

275-
For example, to find the first `Person` in the database that lives in `Wimborne` pass an [`eq`]({{<apiref "com/mongodb/client/model/Filters.html#eq-java.lang.String-TItem-">}})
275+
For example, to find the first `Person` in the database that lives in `Wimborne` pass an [`eq`]({{<apiref "com/mongodb/client/model/Filters.html#eq(java.lang.String,TItem)">}})
276276
filter object to specify the equality condition:
277277

278278
```java
@@ -301,7 +301,7 @@ collection.find(gt("age", 30)).forEach(printBlock, callbackWhenFinished);
301301

302302
## Update Documents
303303

304-
To update documents in a collection, you can use the collection's [`updateOne`]({{<apiref "com/mongodb/client/MongoCollection.html#updateOne-org.bson.conversions.Bson-org.bson.conversions.Bson-">}}) and [`updateMany`]({{<apiref "com/mongodb/async/client/MongoCollection.html#updateMany-org.bson.conversions.Bson-org.bson.conversions.Bson-">}}) methods.
304+
To update documents in a collection, you can use the collection's [`updateOne`]({{<apiref "com/mongodb/client/MongoCollection.html#updateOne(org.bson.conversions.Bson,org.bson.conversions.Bson)">}}) and [`updateMany`]({{<apiref "com/mongodb/async/client/MongoCollection.html#updateMany(org.bson.conversions.Bson,org.bson.conversions.Bson)">}}) methods.
305305

306306
Pass to the methods:
307307

@@ -313,7 +313,7 @@ The update methods return an [`UpdateResult`]({{<apiref "com/mongodb/client/resu
313313

314314
### Update a Single Person
315315

316-
To update at most a single `Person`, use the [`updateOne`]({{<apiref "com/mongodb/client/MongoCollection.html#updateOne-org.bson.conversions.Bson-org.bson.conversions.Bson-">}}) method.
316+
To update at most a single `Person`, use the [`updateOne`]({{<apiref "com/mongodb/client/MongoCollection.html#updateOne(org.bson.conversions.Bson,org.bson.conversions.Bson)">}}) method.
317317

318318
The following example updates `Ada Byron` setting their age to `23` and name to `Ada Lovelace`:
319319

@@ -329,7 +329,7 @@ collection.updateOne(eq("name", "Ada Byron"), combine(set("age", 23), set("name"
329329

330330
### Update Multiple Persons
331331

332-
To update all Persons that match a filter, use the [`updateMany`]({{<apiref "com/mongodb/async/client/MongoCollection.html#updateMany-org.bson.conversions.Bson-org.bson.conversions.Bson-">}}) method.
332+
To update all Persons that match a filter, use the [`updateMany`]({{<apiref "com/mongodb/async/client/MongoCollection.html#updateMany(org.bson.conversions.Bson,org.bson.conversions.Bson)">}}) method.
333333

334334
The following example sets the zip field to `null` for all documents that have a `zip` value:
335335

@@ -340,7 +340,7 @@ collection.updateMany(not(eq("zip", null)), set("zip", null), printModifiedCount
340340

341341
### Replace a Single Person
342342

343-
An alternative method to change an existing `Person`, would be to use the [`replaceOne`]({{<apiref "com/mongodb/client/MongoCollection.html#replaceOne-org.bson.conversions.Bson-TDocument-">}}) method.
343+
An alternative method to change an existing `Person`, would be to use the [`replaceOne`]({{<apiref "com/mongodb/client/MongoCollection.html#replaceOne(org.bson.conversions.Bson,TDocument)">}}) method.
344344

345345
The following example replaces the `Ada Lovelace` back to the original document:
346346

@@ -350,7 +350,7 @@ collection.replaceOne(eq("name", "Ada Lovelace"), ada, printModifiedCount);
350350

351351
## Delete Documents
352352

353-
To delete documents from a collection, you can use the collection's [`deleteOne`]({{< apiref "com/mongodb/client/MongoCollection.html#deleteOne-org.bson.conversions.Bson-">}}) and [`deleteMany`]({{< apiref "com/mongodb/client/MongoCollection.html#deleteMany-org.bson.conversions.Bson-">}}) methods.
353+
To delete documents from a collection, you can use the collection's [`deleteOne`]({{< apiref "com/mongodb/client/MongoCollection.html#deleteOne(org.bson.conversions.Bson)">}}) and [`deleteMany`]({{< apiref "com/mongodb/client/MongoCollection.html#deleteMany(org.bson.conversions.Bson)">}}) methods.
354354

355355
Pass to the methods a filter object to determine the document or documents to delete. To facilitate creating filter objects, Java driver provides the [`Filters`]({{< apiref "com/mongodb/client/model/Filters.html">}}) helper. To specify an empty filter (i.e. match all documents in a collection), use an empty [`Document`]({{< apiref "org/bson/Document.html" >}}) object.
356356

@@ -359,7 +359,7 @@ which provides information about the operation including the number of documents
359359

360360
### Delete a Single Person That Matches a Filter
361361

362-
To delete at most a single `Person` that matches a filter, use the [`deleteOne`]({{< apiref "com/mongodb/client/MongoCollection.html#deleteOne-org.bson.conversions.Bson-">}}) method:
362+
To delete at most a single `Person` that matches a filter, use the [`deleteOne`]({{< apiref "com/mongodb/client/MongoCollection.html#deleteOne(org.bson.conversions.Bson)">}}) method:
363363

364364
The following example deletes at most one `Person` who lives in `Wimborne`:
365365

@@ -376,7 +376,7 @@ collection.deleteOne(eq("address.city", "Wimborne"), printDeletedCount);
376376

377377
### Delete All Persons That Match a Filter
378378

379-
To delete multiple Persons matching a filter use the [`deleteMany`]({{< apiref "com/mongodb/client/MongoCollection.html#deleteMany-org.bson.conversions.Bson-">}}) method.
379+
To delete multiple Persons matching a filter use the [`deleteMany`]({{< apiref "com/mongodb/client/MongoCollection.html#deleteMany(org.bson.conversions.Bson)">}}) method.
380380

381381
The following example deletes all Persons that live in `London`:
382382

0 commit comments

Comments
 (0)