Skip to content

Commit e838662

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 e784e58 commit e838662

File tree

4 files changed

+60
-60
lines changed

4 files changed

+60
-60
lines changed

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

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
/**
128128
* Primary implementation of {@link MongoOperations}.
129-
*
129+
*
130130
* @author Thomas Risberg
131131
* @author Graeme Rocher
132132
* @author Mark Pollack
@@ -177,7 +177,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
177177

178178
/**
179179
* Constructor used for a basic template configuration
180-
*
180+
*
181181
* @param mongo must not be {@literal null}.
182182
* @param databaseName must not be {@literal null} or empty.
183183
*/
@@ -188,7 +188,7 @@ public MongoTemplate(Mongo mongo, String databaseName) {
188188
/**
189189
* Constructor used for a template configuration with user credentials in the form of
190190
* {@link org.springframework.data.authentication.UserCredentials}
191-
*
191+
*
192192
* @param mongo must not be {@literal null}.
193193
* @param databaseName must not be {@literal null} or empty.
194194
* @param userCredentials
@@ -199,7 +199,7 @@ public MongoTemplate(Mongo mongo, String databaseName, UserCredentials userCrede
199199

200200
/**
201201
* Constructor used for a basic template configuration.
202-
*
202+
*
203203
* @param mongoDbFactory must not be {@literal null}.
204204
*/
205205
public MongoTemplate(MongoDbFactory mongoDbFactory) {
@@ -208,7 +208,7 @@ public MongoTemplate(MongoDbFactory mongoDbFactory) {
208208

209209
/**
210210
* Constructor used for a basic template configuration.
211-
*
211+
*
212212
* @param mongoDbFactory must not be {@literal null}.
213213
* @param mongoConverter
214214
*/
@@ -237,7 +237,7 @@ public MongoTemplate(MongoDbFactory mongoDbFactory, MongoConverter mongoConverte
237237
/**
238238
* Configures the {@link WriteResultChecking} to be used with the template. Setting {@literal null} will reset the
239239
* default of {@value #DEFAULT_WRITE_RESULT_CHECKING}.
240-
*
240+
*
241241
* @param resultChecking
242242
*/
243243
public void setWriteResultChecking(WriteResultChecking resultChecking) {
@@ -248,7 +248,7 @@ public void setWriteResultChecking(WriteResultChecking resultChecking) {
248248
* Configures the {@link WriteConcern} to be used with the template. If none is configured the {@link WriteConcern}
249249
* configured on the {@link MongoDbFactory} will apply. If you configured a {@link Mongo} instance no
250250
* {@link WriteConcern} will be used.
251-
*
251+
*
252252
* @param writeConcern
253253
*/
254254
public void setWriteConcern(WriteConcern writeConcern) {
@@ -257,7 +257,7 @@ public void setWriteConcern(WriteConcern writeConcern) {
257257

258258
/**
259259
* Configures the {@link WriteConcernResolver} to be used with the template.
260-
*
260+
*
261261
* @param writeConcernResolver
262262
*/
263263
public void setWriteConcernResolver(WriteConcernResolver writeConcernResolver) {
@@ -267,7 +267,7 @@ public void setWriteConcernResolver(WriteConcernResolver writeConcernResolver) {
267267
/**
268268
* Used by @{link {@link #prepareCollection(DBCollection)} to set the {@link ReadPreference} before any operations are
269269
* performed.
270-
*
270+
*
271271
* @param readPreference
272272
*/
273273
public void setReadPreference(ReadPreference readPreference) {
@@ -294,7 +294,7 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
294294
* they were registered for the current {@link MappingContext}. If no creator for the current {@link MappingContext}
295295
* can be found we manually add the internally created one as {@link ApplicationListener} to make sure indexes get
296296
* created appropriately for entity types persisted through this {@link MongoTemplate} instance.
297-
*
297+
*
298298
* @param context must not be {@literal null}.
299299
*/
300300
private void prepareIndexCreator(ApplicationContext context) {
@@ -314,15 +314,15 @@ private void prepareIndexCreator(ApplicationContext context) {
314314
}
315315

316316
/**
317-
* Returns the default {@link org.springframework.data.mongodb.core.core.convert.MongoConverter}.
318-
*
317+
* Returns the default {@link org.springframework.data.mongodb.core.convert.MongoConverter}.
318+
*
319319
* @return
320320
*/
321321
public MongoConverter getConverter() {
322322
return this.mongoConverter;
323323
}
324324

325-
/*
325+
/*
326326
* (non-Javadoc)
327327
* @see org.springframework.data.mongodb.core.MongoOperations#executeAsStream(org.springframework.data.mongodb.core.query.Query, java.lang.Class)
328328
*/
@@ -332,7 +332,7 @@ public <T> CloseableIterator<T> stream(final Query query, final Class<T> entityT
332332
return stream(query, entityType, determineCollectionName(entityType));
333333
}
334334

335-
/*
335+
/*
336336
* (non-Javadoc)
337337
* @see org.springframework.data.mongodb.core.MongoOperations#stream(org.springframework.data.mongodb.core.query.Query, java.lang.Class, java.lang.String)
338338
*/
@@ -428,7 +428,7 @@ public void executeQuery(Query query, String collectionName, DocumentCallbackHan
428428
/**
429429
* Execute a MongoDB query and iterate over the query results on a per-document basis with a
430430
* {@link DocumentCallbackHandler} using the provided CursorPreparer.
431-
*
431+
*
432432
* @param query the query class that specifies the criteria used to find a record and also an optional fields
433433
* specification, must not be {@literal null}.
434434
* @param collectionName name of the collection to retrieve the objects from
@@ -699,7 +699,7 @@ public <T> GeoResults<T> geoNear(NearQuery near, Class<T> entityClass, String co
699699
/*
700700
* As MongoDB currently (2.4.4) doesn't support the skipping of elements in near queries
701701
* we skip the elements ourselves to avoid at least the document 2 object mapping overhead.
702-
*
702+
*
703703
* @see https://jira.mongodb.org/browse/SERVER-3925
704704
*/
705705
if (index >= elementsToSkip) {
@@ -804,7 +804,7 @@ protected void ensureNotIterable(Object o) {
804804
/**
805805
* Prepare the collection before any processing is done using it. This allows a convenient way to apply settings like
806806
* slaveOk() etc. Can be overridden in sub-classes.
807-
*
807+
*
808808
* @param collection
809809
*/
810810
protected void prepareCollection(DBCollection collection) {
@@ -818,7 +818,7 @@ protected void prepareCollection(DBCollection collection) {
818818
* settings in sub-classes. <br />
819819
* In case of using MongoDB Java driver version 3 the returned {@link WriteConcern} will be defaulted to
820820
* {@link WriteConcern#ACKNOWLEDGED} when {@link WriteResultChecking} is set to {@link WriteResultChecking#EXCEPTION}.
821-
*
821+
*
822822
* @param writeConcern any WriteConcern already configured or null
823823
* @return The prepared WriteConcern or null
824824
*/
@@ -1228,7 +1228,7 @@ public WriteResult remove(Object object, String collection) {
12281228
/**
12291229
* Returns {@link Entry} containing the field name of the id property as {@link Entry#getKey()} and the {@link Id}s
12301230
* property value as its {@link Entry#getValue()}.
1231-
*
1231+
*
12321232
* @param object
12331233
* @return
12341234
*/
@@ -1255,7 +1255,7 @@ private Entry<String, Object> extractIdPropertyAndValue(Object object) {
12551255

12561256
/**
12571257
* Returns a {@link Query} for the given entity by its id.
1258-
*
1258+
*
12591259
* @param object must not be {@literal null}.
12601260
* @return
12611261
*/
@@ -1267,7 +1267,7 @@ private Query getIdQueryFor(Object object) {
12671267

12681268
/**
12691269
* Returns a {@link Query} for the given entities by their ids.
1270-
*
1270+
*
12711271
* @param objects must not be {@literal null} or {@literal empty}.
12721272
* @return
12731273
*/
@@ -1538,7 +1538,7 @@ public <T> List<T> findAllAndRemove(Query query, Class<T> entityClass, String co
15381538
* Retrieve and remove all documents matching the given {@code query} by calling {@link #find(Query, Class, String)}
15391539
* and {@link #remove(Query, Class, String)}, whereas the {@link Query} for {@link #remove(Query, Class, String)} is
15401540
* constructed out of the find result.
1541-
*
1541+
*
15421542
* @param collectionName
15431543
* @param query
15441544
* @param entityClass
@@ -1578,7 +1578,7 @@ protected <O> AggregationResults<O> aggregate(Aggregation aggregation, String co
15781578

15791579
/**
15801580
* Returns the potentially mapped results of the given {@commandResult} contained some.
1581-
*
1581+
*
15821582
* @param outputType
15831583
* @param commandResult
15841584
* @return
@@ -1690,7 +1690,7 @@ protected <T> void maybeEmitEvent(MongoMappingEvent<T> event) {
16901690

16911691
/**
16921692
* Create the specified collection using the provided options
1693-
*
1693+
*
16941694
* @param collectionName
16951695
* @param collectionOptions
16961696
* @return the collection that was created
@@ -1711,7 +1711,7 @@ public DBCollection doInDB(DB db) throws MongoException, DataAccessException {
17111711
/**
17121712
* Map the results of an ad-hoc query on the default MongoDB collection to an object using the template's converter.
17131713
* The query document is specified as a standard {@link DBObject} and so is the fields specification.
1714-
*
1714+
*
17151715
* @param collectionName name of the collection to retrieve the objects from.
17161716
* @param query the query document that specifies the criteria used to find a record.
17171717
* @param fields the document that specifies the fields to be returned.
@@ -1736,7 +1736,7 @@ protected <T> T doFindOne(String collectionName, DBObject query, DBObject fields
17361736
/**
17371737
* Map the results of an ad-hoc query on the default MongoDB collection to a List using the template's converter. The
17381738
* query document is 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
@@ -1752,7 +1752,7 @@ protected <T> List<T> doFind(String collectionName, DBObject query, DBObject fie
17521752
* Map the results of an ad-hoc query on the default MongoDB collection to a List of the specified type. The object is
17531753
* converted from the MongoDB native representation using an instance of {@see MongoConverter}. The query document is
17541754
* specified as a standard DBObject and so is the fields specification.
1755-
*
1755+
*
17561756
* @param collectionName name of the collection to retrieve the objects from.
17571757
* @param query the query document that specifies the criteria used to find a record.
17581758
* @param fields the document that specifies the fields to be returned.
@@ -1805,7 +1805,7 @@ protected DBObject convertToDbObject(CollectionOptions collectionOptions) {
18051805
* The first document that matches the query is returned and also removed from the collection in the database.
18061806
* <p/>
18071807
* The query document is specified as a standard DBObject and so is the fields specification.
1808-
*
1808+
*
18091809
* @param collectionName name of the collection to retrieve the objects from
18101810
* @param query the query document that specifies the criteria used to find a record
18111811
* @param entityClass the parameterized type of the returned list.
@@ -1856,7 +1856,7 @@ protected <T> T doFindAndModify(String collectionName, DBObject query, DBObject
18561856

18571857
/**
18581858
* Populates the id property of the saved object, if it's not set already.
1859-
*
1859+
*
18601860
* @param savedObject
18611861
* @param id
18621862
*/
@@ -1906,7 +1906,7 @@ private DBCollection getAndPrepareCollection(DB db, String collectionName) {
19061906
* <li>Execute the given {@link ConnectionCallback} for a {@link DBObject}.</li>
19071907
* <li>Apply the given {@link DbObjectCallback} to each of the {@link DBObject}s to obtain the result.</li>
19081908
* <ol>
1909-
*
1909+
*
19101910
* @param <T>
19111911
* @param collectionCallback the callback to retrieve the {@link DBObject} with
19121912
* @param objectCallback the {@link DbObjectCallback} to transform {@link DBObject}s into the actual domain type
@@ -1935,7 +1935,7 @@ private <T> T executeFindOneInternal(CollectionCallback<DBObject> collectionCall
19351935
* <li>Iterate over the {@link DBCursor} and applies the given {@link DbObjectCallback} to each of the
19361936
* {@link DBObject}s collecting the actual result {@link List}.</li>
19371937
* <ol>
1938-
*
1938+
*
19391939
* @param <T>
19401940
* @param collectionCallback the callback to retrieve the {@link DBCursor} with
19411941
* @param preparer the {@link CursorPreparer} to potentially modify the {@link DBCursor} before ireating over it
@@ -2042,7 +2042,7 @@ String determineCollectionName(Class<?> entityClass) {
20422042

20432043
/**
20442044
* Handles {@link WriteResult} errors based on the configured {@link WriteResultChecking}.
2045-
*
2045+
*
20462046
* @param writeResult
20472047
* @param query
20482048
* @param operation
@@ -2086,7 +2086,7 @@ protected void handleAnyWriteResultErrors(WriteResult writeResult, DBObject quer
20862086
/**
20872087
* Inspects the given {@link CommandResult} for erros and potentially throws an
20882088
* {@link InvalidDataAccessApiUsageException} for that error.
2089-
*
2089+
*
20902090
* @param result must not be {@literal null}.
20912091
* @param source must not be {@literal null}.
20922092
*/
@@ -2124,7 +2124,7 @@ private DBObject getMappedSortObject(Query query, Class<?> type) {
21242124
/**
21252125
* Tries to convert the given {@link RuntimeException} into a {@link DataAccessException} but returns the original
21262126
* exception if the conversation failed. Thus allows safe re-throwing of the return value.
2127-
*
2127+
*
21282128
* @param ex the exception to translate
21292129
* @param exceptionTranslator the {@link PersistenceExceptionTranslator} to be used for translation
21302130
* @return
@@ -2162,7 +2162,7 @@ private static List<Object> consolidateIdentifiers(List<ObjectId> ids, List<DBOb
21622162
/**
21632163
* Simple {@link CollectionCallback} that takes a query {@link DBObject} plus an optional fields specification
21642164
* {@link DBObject} and executes that against the {@link DBCollection}.
2165-
*
2165+
*
21662166
* @author Oliver Gierke
21672167
* @author Thomas Risberg
21682168
*/
@@ -2196,7 +2196,7 @@ public DBObject doInCollection(DBCollection collection) throws MongoException, D
21962196
/**
21972197
* Simple {@link CollectionCallback} that takes a query {@link DBObject} plus an optional fields specification
21982198
* {@link DBObject} and executes that against the {@link DBCollection}.
2199-
*
2199+
*
22002200
* @author Oliver Gierke
22012201
* @author Thomas Risberg
22022202
*/
@@ -2227,7 +2227,7 @@ public DBCursor doInCollection(DBCollection collection) throws MongoException, D
22272227
/**
22282228
* Simple {@link CollectionCallback} that takes a query {@link DBObject} plus an optional fields specification
22292229
* {@link DBObject} and executes that against the {@link DBCollection}.
2230-
*
2230+
*
22312231
* @author Thomas Risberg
22322232
*/
22332233
private static class FindAndRemoveCallback implements CollectionCallback<DBObject> {
@@ -2272,7 +2272,7 @@ public DBObject doInCollection(DBCollection collection) throws MongoException, D
22722272

22732273
/**
22742274
* Simple internal callback to allow operations on a {@link DBObject}.
2275-
*
2275+
*
22762276
* @author Oliver Gierke
22772277
* @author Thomas Darimont
22782278
*/
@@ -2285,7 +2285,7 @@ interface DbObjectCallback<T> {
22852285
/**
22862286
* Simple {@link DbObjectCallback} that will transform {@link DBObject} into the given target type using the given
22872287
* {@link MongoReader}.
2288-
*
2288+
*
22892289
* @author Oliver Gierke
22902290
* @author Christoph Strobl
22912291
*/
@@ -2431,7 +2431,7 @@ public DBCursor prepare(DBCursor cursor) {
24312431
/**
24322432
* {@link DbObjectCallback} that assumes a {@link GeoResult} to be created, delegates actual content unmarshalling to
24332433
* a delegate and creates a {@link GeoResult} from the result.
2434-
*
2434+
*
24352435
* @author Oliver Gierke
24362436
*/
24372437
static class GeoNearResultDbObjectCallback<T> implements DbObjectCallback<GeoResult<T>> {
@@ -2442,7 +2442,7 @@ static class GeoNearResultDbObjectCallback<T> implements DbObjectCallback<GeoRes
24422442
/**
24432443
* Creates a new {@link GeoNearResultDbObjectCallback} using the given {@link DbObjectCallback} delegate for
24442444
* {@link GeoResult} content unmarshalling.
2445-
*
2445+
*
24462446
* @param delegate must not be {@literal null}.
24472447
*/
24482448
public GeoNearResultDbObjectCallback(DbObjectCallback<T> delegate, Metric metric) {
@@ -2464,7 +2464,7 @@ public GeoResult<T> doWith(DBObject object) {
24642464

24652465
/**
24662466
* A {@link CloseableIterator} that is backed by a MongoDB {@link Cursor}.
2467-
*
2467+
*
24682468
* @since 1.7
24692469
* @author Thomas Darimont
24702470
*/
@@ -2476,7 +2476,7 @@ static class CloseableIterableCursorAdapter<T> implements CloseableIterator<T> {
24762476

24772477
/**
24782478
* Creates a new {@link CloseableIterableCursorAdapter} backed by the given {@link Cursor}.
2479-
*
2479+
*
24802480
* @param cursor
24812481
* @param exceptionTranslator
24822482
* @param objectReadCallback

0 commit comments

Comments
 (0)