Skip to content

Commit 772e8ac

Browse files
kdombeckmp911de
authored andcommitted
DATAMONGO-1577 - Fix Reference and JavaDoc spelling issues.
Replaced invalid class name MongoMappingConverter with actual class name of MappingMongoConverter. Fix typos. Original pull request: #425.
1 parent 2bbffed commit 772e8ac

File tree

4 files changed

+59
-59
lines changed

4 files changed

+59
-59
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
/**
127127
* Primary implementation of {@link MongoOperations}.
128-
*
128+
*
129129
* @author Thomas Risberg
130130
* @author Graeme Rocher
131131
* @author Mark Pollack
@@ -174,7 +174,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
174174

175175
/**
176176
* Constructor used for a basic template configuration
177-
*
177+
*
178178
* @param mongo must not be {@literal null}.
179179
* @param databaseName must not be {@literal null} or empty.
180180
*/
@@ -185,7 +185,7 @@ public MongoTemplate(Mongo mongo, String databaseName) {
185185
/**
186186
* Constructor used for a template configuration with user credentials in the form of
187187
* {@link org.springframework.data.authentication.UserCredentials}
188-
*
188+
*
189189
* @param mongo must not be {@literal null}.
190190
* @param databaseName must not be {@literal null} or empty.
191191
* @param userCredentials
@@ -196,7 +196,7 @@ public MongoTemplate(Mongo mongo, String databaseName, UserCredentials userCrede
196196

197197
/**
198198
* Constructor used for a basic template configuration.
199-
*
199+
*
200200
* @param mongoDbFactory must not be {@literal null}.
201201
*/
202202
public MongoTemplate(MongoDbFactory mongoDbFactory) {
@@ -205,7 +205,7 @@ public MongoTemplate(MongoDbFactory mongoDbFactory) {
205205

206206
/**
207207
* Constructor used for a basic template configuration.
208-
*
208+
*
209209
* @param mongoDbFactory must not be {@literal null}.
210210
* @param mongoConverter
211211
*/
@@ -234,7 +234,7 @@ public MongoTemplate(MongoDbFactory mongoDbFactory, MongoConverter mongoConverte
234234
/**
235235
* Configures the {@link WriteResultChecking} to be used with the template. Setting {@literal null} will reset the
236236
* default of {@value #DEFAULT_WRITE_RESULT_CHECKING}.
237-
*
237+
*
238238
* @param resultChecking
239239
*/
240240
public void setWriteResultChecking(WriteResultChecking resultChecking) {
@@ -245,7 +245,7 @@ public void setWriteResultChecking(WriteResultChecking resultChecking) {
245245
* Configures the {@link WriteConcern} to be used with the template. If none is configured the {@link WriteConcern}
246246
* configured on the {@link MongoDbFactory} will apply. If you configured a {@link Mongo} instance no
247247
* {@link WriteConcern} will be used.
248-
*
248+
*
249249
* @param writeConcern
250250
*/
251251
public void setWriteConcern(WriteConcern writeConcern) {
@@ -254,7 +254,7 @@ public void setWriteConcern(WriteConcern writeConcern) {
254254

255255
/**
256256
* Configures the {@link WriteConcernResolver} to be used with the template.
257-
*
257+
*
258258
* @param writeConcernResolver
259259
*/
260260
public void setWriteConcernResolver(WriteConcernResolver writeConcernResolver) {
@@ -264,7 +264,7 @@ public void setWriteConcernResolver(WriteConcernResolver writeConcernResolver) {
264264
/**
265265
* Used by @{link {@link #prepareCollection(DBCollection)} to set the {@link ReadPreference} before any operations are
266266
* performed.
267-
*
267+
*
268268
* @param readPreference
269269
*/
270270
public void setReadPreference(ReadPreference readPreference) {
@@ -291,7 +291,7 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
291291
* they were registered for the current {@link MappingContext}. If no creator for the current {@link MappingContext}
292292
* can be found we manually add the internally created one as {@link ApplicationListener} to make sure indexes get
293293
* created appropriately for entity types persisted through this {@link MongoTemplate} instance.
294-
*
294+
*
295295
* @param context must not be {@literal null}.
296296
*/
297297
private void prepareIndexCreator(ApplicationContext context) {
@@ -311,15 +311,15 @@ private void prepareIndexCreator(ApplicationContext context) {
311311
}
312312

313313
/**
314-
* Returns the default {@link org.springframework.data.mongodb.core.core.convert.MongoConverter}.
315-
*
314+
* Returns the default {@link org.springframework.data.mongodb.core.convert.MongoConverter}.
315+
*
316316
* @return
317317
*/
318318
public MongoConverter getConverter() {
319319
return this.mongoConverter;
320320
}
321321

322-
/*
322+
/*
323323
* (non-Javadoc)
324324
* @see org.springframework.data.mongodb.core.MongoOperations#executeAsStream(org.springframework.data.mongodb.core.query.Query, java.lang.Class)
325325
*/
@@ -412,7 +412,7 @@ public void executeQuery(Query query, String collectionName, DocumentCallbackHan
412412
/**
413413
* Execute a MongoDB query and iterate over the query results on a per-document basis with a
414414
* {@link DocumentCallbackHandler} using the provided CursorPreparer.
415-
*
415+
*
416416
* @param query the query class that specifies the criteria used to find a record and also an optional fields
417417
* specification, must not be {@literal null}.
418418
* @param collectionName name of the collection to retrieve the objects from
@@ -683,7 +683,7 @@ public <T> GeoResults<T> geoNear(NearQuery near, Class<T> entityClass, String co
683683
/*
684684
* As MongoDB currently (2.4.4) doesn't support the skipping of elements in near queries
685685
* we skip the elements ourselves to avoid at least the document 2 object mapping overhead.
686-
*
686+
*
687687
* @see https://jira.mongodb.org/browse/SERVER-3925
688688
*/
689689
if (index >= elementsToSkip) {
@@ -788,7 +788,7 @@ protected void ensureNotIterable(Object o) {
788788
/**
789789
* Prepare the collection before any processing is done using it. This allows a convenient way to apply settings like
790790
* slaveOk() etc. Can be overridden in sub-classes.
791-
*
791+
*
792792
* @param collection
793793
*/
794794
protected void prepareCollection(DBCollection collection) {
@@ -802,7 +802,7 @@ protected void prepareCollection(DBCollection collection) {
802802
* settings in sub-classes. <br />
803803
* In case of using MongoDB Java driver version 3 the returned {@link WriteConcern} will be defaulted to
804804
* {@link WriteConcern#ACKNOWLEDGED} when {@link WriteResultChecking} is set to {@link WriteResultChecking#EXCEPTION}.
805-
*
805+
*
806806
* @param writeConcern any WriteConcern already configured or null
807807
* @return The prepared WriteConcern or null
808808
*/
@@ -1212,7 +1212,7 @@ public WriteResult remove(Object object, String collection) {
12121212
/**
12131213
* Returns {@link Entry} containing the field name of the id property as {@link Entry#getKey()} and the {@link Id}s
12141214
* property value as its {@link Entry#getValue()}.
1215-
*
1215+
*
12161216
* @param object
12171217
* @return
12181218
*/
@@ -1239,7 +1239,7 @@ private Entry<String, Object> extractIdPropertyAndValue(Object object) {
12391239

12401240
/**
12411241
* Returns a {@link Query} for the given entity by its id.
1242-
*
1242+
*
12431243
* @param object must not be {@literal null}.
12441244
* @return
12451245
*/
@@ -1251,7 +1251,7 @@ private Query getIdQueryFor(Object object) {
12511251

12521252
/**
12531253
* Returns a {@link Query} for the given entities by their ids.
1254-
*
1254+
*
12551255
* @param objects must not be {@literal null} or {@literal empty}.
12561256
* @return
12571257
*/
@@ -1522,7 +1522,7 @@ public <T> List<T> findAllAndRemove(Query query, Class<T> entityClass, String co
15221522
* Retrieve and remove all documents matching the given {@code query} by calling {@link #find(Query, Class, String)}
15231523
* and {@link #remove(Query, Class, String)}, whereas the {@link Query} for {@link #remove(Query, Class, String)} is
15241524
* constructed out of the find result.
1525-
*
1525+
*
15261526
* @param collectionName
15271527
* @param query
15281528
* @param entityClass
@@ -1562,7 +1562,7 @@ protected <O> AggregationResults<O> aggregate(Aggregation aggregation, String co
15621562

15631563
/**
15641564
* Returns the potentially mapped results of the given {@commandResult} contained some.
1565-
*
1565+
*
15661566
* @param outputType
15671567
* @param commandResult
15681568
* @return
@@ -1674,7 +1674,7 @@ protected <T> void maybeEmitEvent(MongoMappingEvent<T> event) {
16741674

16751675
/**
16761676
* Create the specified collection using the provided options
1677-
*
1677+
*
16781678
* @param collectionName
16791679
* @param collectionOptions
16801680
* @return the collection that was created
@@ -1695,7 +1695,7 @@ public DBCollection doInDB(DB db) throws MongoException, DataAccessException {
16951695
/**
16961696
* Map the results of an ad-hoc query on the default MongoDB collection to an object using the template's converter.
16971697
* The query document is specified as a standard {@link DBObject} and so is the fields specification.
1698-
*
1698+
*
16991699
* @param collectionName name of the collection to retrieve the objects from.
17001700
* @param query the query document that specifies the criteria used to find a record.
17011701
* @param fields the document that specifies the fields to be returned.
@@ -1720,7 +1720,7 @@ protected <T> T doFindOne(String collectionName, DBObject query, DBObject fields
17201720
/**
17211721
* Map the results of an ad-hoc query on the default MongoDB collection to a List using the template's converter. The
17221722
* query document is specified as a standard DBObject and so is the fields specification.
1723-
*
1723+
*
17241724
* @param collectionName name of the collection to retrieve the objects from
17251725
* @param query the query document that specifies the criteria used to find a record
17261726
* @param fields the document that specifies the fields to be returned
@@ -1736,7 +1736,7 @@ protected <T> List<T> doFind(String collectionName, DBObject query, DBObject fie
17361736
* Map the results of an ad-hoc query on the default MongoDB collection to a List of the specified type. The object is
17371737
* converted from the MongoDB native representation using an instance of {@see MongoConverter}. The query document is
17381738
* specified as a standard DBObject and so is the fields specification.
1739-
*
1739+
*
17401740
* @param collectionName name of the collection to retrieve the objects from.
17411741
* @param query the query document that specifies the criteria used to find a record.
17421742
* @param fields the document that specifies the fields to be returned.
@@ -1789,7 +1789,7 @@ protected DBObject convertToDbObject(CollectionOptions collectionOptions) {
17891789
* The first document that matches the query is returned and also removed from the collection in the database.
17901790
* <p/>
17911791
* The query document is specified as a standard DBObject and so is the fields specification.
1792-
*
1792+
*
17931793
* @param collectionName name of the collection to retrieve the objects from
17941794
* @param query the query document that specifies the criteria used to find a record
17951795
* @param entityClass the parameterized type of the returned list.
@@ -1840,7 +1840,7 @@ protected <T> T doFindAndModify(String collectionName, DBObject query, DBObject
18401840

18411841
/**
18421842
* Populates the id property of the saved object, if it's not set already.
1843-
*
1843+
*
18441844
* @param savedObject
18451845
* @param id
18461846
*/
@@ -1890,7 +1890,7 @@ private DBCollection getAndPrepareCollection(DB db, String collectionName) {
18901890
* <li>Execute the given {@link ConnectionCallback} for a {@link DBObject}.</li>
18911891
* <li>Apply the given {@link DbObjectCallback} to each of the {@link DBObject}s to obtain the result.</li>
18921892
* <ol>
1893-
*
1893+
*
18941894
* @param <T>
18951895
* @param collectionCallback the callback to retrieve the {@link DBObject} with
18961896
* @param objectCallback the {@link DbObjectCallback} to transform {@link DBObject}s into the actual domain type
@@ -1919,7 +1919,7 @@ private <T> T executeFindOneInternal(CollectionCallback<DBObject> collectionCall
19191919
* <li>Iterate over the {@link DBCursor} and applies the given {@link DbObjectCallback} to each of the
19201920
* {@link DBObject}s collecting the actual result {@link List}.</li>
19211921
* <ol>
1922-
*
1922+
*
19231923
* @param <T>
19241924
* @param collectionCallback the callback to retrieve the {@link DBCursor} with
19251925
* @param preparer the {@link CursorPreparer} to potentially modify the {@link DBCursor} before ireating over it
@@ -2026,7 +2026,7 @@ String determineCollectionName(Class<?> entityClass) {
20262026

20272027
/**
20282028
* Handles {@link WriteResult} errors based on the configured {@link WriteResultChecking}.
2029-
*
2029+
*
20302030
* @param writeResult
20312031
* @param query
20322032
* @param operation
@@ -2070,7 +2070,7 @@ protected void handleAnyWriteResultErrors(WriteResult writeResult, DBObject quer
20702070
/**
20712071
* Inspects the given {@link CommandResult} for erros and potentially throws an
20722072
* {@link InvalidDataAccessApiUsageException} for that error.
2073-
*
2073+
*
20742074
* @param result must not be {@literal null}.
20752075
* @param source must not be {@literal null}.
20762076
*/
@@ -2108,7 +2108,7 @@ private DBObject getMappedSortObject(Query query, Class<?> type) {
21082108
/**
21092109
* Tries to convert the given {@link RuntimeException} into a {@link DataAccessException} but returns the original
21102110
* exception if the conversation failed. Thus allows safe re-throwing of the return value.
2111-
*
2111+
*
21122112
* @param ex the exception to translate
21132113
* @param exceptionTranslator the {@link PersistenceExceptionTranslator} to be used for translation
21142114
* @return
@@ -2146,7 +2146,7 @@ private static List<Object> consolidateIdentifiers(List<ObjectId> ids, List<DBOb
21462146
/**
21472147
* Simple {@link CollectionCallback} that takes a query {@link DBObject} plus an optional fields specification
21482148
* {@link DBObject} and executes that against the {@link DBCollection}.
2149-
*
2149+
*
21502150
* @author Oliver Gierke
21512151
* @author Thomas Risberg
21522152
*/
@@ -2180,7 +2180,7 @@ public DBObject doInCollection(DBCollection collection) throws MongoException, D
21802180
/**
21812181
* Simple {@link CollectionCallback} that takes a query {@link DBObject} plus an optional fields specification
21822182
* {@link DBObject} and executes that against the {@link DBCollection}.
2183-
*
2183+
*
21842184
* @author Oliver Gierke
21852185
* @author Thomas Risberg
21862186
*/
@@ -2211,7 +2211,7 @@ public DBCursor doInCollection(DBCollection collection) throws MongoException, D
22112211
/**
22122212
* Simple {@link CollectionCallback} that takes a query {@link DBObject} plus an optional fields specification
22132213
* {@link DBObject} and executes that against the {@link DBCollection}.
2214-
*
2214+
*
22152215
* @author Thomas Risberg
22162216
*/
22172217
private static class FindAndRemoveCallback implements CollectionCallback<DBObject> {
@@ -2256,7 +2256,7 @@ public DBObject doInCollection(DBCollection collection) throws MongoException, D
22562256

22572257
/**
22582258
* Simple internal callback to allow operations on a {@link DBObject}.
2259-
*
2259+
*
22602260
* @author Oliver Gierke
22612261
* @author Thomas Darimont
22622262
*/
@@ -2269,7 +2269,7 @@ static interface DbObjectCallback<T> {
22692269
/**
22702270
* Simple {@link DbObjectCallback} that will transform {@link DBObject} into the given target type using the given
22712271
* {@link MongoReader}.
2272-
*
2272+
*
22732273
* @author Oliver Gierke
22742274
* @author Christoph Strobl
22752275
*/
@@ -2389,7 +2389,7 @@ public DBCursor prepare(DBCursor cursor) {
23892389
/**
23902390
* {@link DbObjectCallback} that assumes a {@link GeoResult} to be created, delegates actual content unmarshalling to
23912391
* a delegate and creates a {@link GeoResult} from the result.
2392-
*
2392+
*
23932393
* @author Oliver Gierke
23942394
*/
23952395
static class GeoNearResultDbObjectCallback<T> implements DbObjectCallback<GeoResult<T>> {
@@ -2400,7 +2400,7 @@ static class GeoNearResultDbObjectCallback<T> implements DbObjectCallback<GeoRes
24002400
/**
24012401
* Creates a new {@link GeoNearResultDbObjectCallback} using the given {@link DbObjectCallback} delegate for
24022402
* {@link GeoResult} content unmarshalling.
2403-
*
2403+
*
24042404
* @param delegate must not be {@literal null}.
24052405
*/
24062406
public GeoNearResultDbObjectCallback(DbObjectCallback<T> delegate, Metric metric) {
@@ -2422,7 +2422,7 @@ public GeoResult<T> doWith(DBObject object) {
24222422

24232423
/**
24242424
* A {@link CloseableIterator} that is backed by a MongoDB {@link Cursor}.
2425-
*
2425+
*
24262426
* @since 1.7
24272427
* @author Thomas Darimont
24282428
*/
@@ -2434,7 +2434,7 @@ static class CloseableIterableCursorAdapter<T> implements CloseableIterator<T> {
24342434

24352435
/**
24362436
* Creates a new {@link CloseableIterableCursorAdapter} backed by the given {@link Cursor}.
2437-
*
2437+
*
24382438
* @param cursor
24392439
* @param exceptionTranslator
24402440
* @param objectReadCallback

0 commit comments

Comments
 (0)