Browse Source

Fix javadoc errors and warnings

Closes: #3835
pull/3844/head
Christoph Strobl 4 years ago
parent
commit
2f98a6656b
  1. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/BindableMongoExpression.java
  2. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoCollectionUtils.java
  3. 10
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoDatabaseUtils.java
  4. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoExpression.java
  5. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoResourceHolder.java
  6. 16
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoTransactionManager.java
  7. 10
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/ReactiveMongoDatabaseUtils.java
  8. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/ReactiveMongoResourceHolder.java
  9. 12
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/ReactiveMongoTransactionManager.java
  10. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SessionAwareMethodInterceptor.java
  11. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SpringDataMongoDB.java
  12. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/MongoConfigurationSupport.java
  13. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ChangeStreamOptions.java
  14. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/CollectionOptions.java
  15. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ExecutableFindOperation.java
  16. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ExecutableUpdateOperation.java
  17. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/FindAndReplaceOptions.java
  18. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoDatabaseFactorySupport.java
  19. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoDbFactorySupport.java
  20. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoJsonSchemaCreator.java
  21. 129
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java
  22. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java
  23. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveChangeStreamOperation.java
  24. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveFindOperation.java
  25. 181
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java
  26. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoTemplate.java
  27. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveSessionCallback.java
  28. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveSessionScoped.java
  29. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ScriptOperations.java
  30. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/SessionCallback.java
  31. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/SessionScoped.java
  32. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/Aggregation.java
  33. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationSpELExpression.java
  34. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationUpdate.java
  35. 34
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java
  36. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/BucketAutoOperation.java
  37. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/BucketOperation.java
  38. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ConvertOperators.java
  39. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/CountOperation.java
  40. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/DateOperators.java
  41. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/GraphLookupOperation.java
  42. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/GroupOperation.java
  43. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/PrefixingDelegatingAggregationOperationContext.java
  44. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RedactOperation.java
  45. 36
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ScriptOperators.java
  46. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/SetWindowFieldsOperation.java
  47. 7
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/SortByCountOperation.java
  48. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/UnionWithOperation.java
  49. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/MappingMongoConverter.java
  50. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/QueryMapper.java
  51. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/geo/GeoJsonModule.java
  52. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/CompoundIndex.java
  53. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/DurationStyle.java
  54. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/HashIndexed.java
  55. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/WildcardIndex.java
  56. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Encrypted.java
  57. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Field.java
  58. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/FieldType.java
  59. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/ShardKey.java
  60. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Sharded.java
  61. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/TimeSeries.java
  62. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Unwrapped.java
  63. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/event/AfterDeleteEvent.java
  64. 14
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/ChangeStreamRequest.java
  65. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/DefaultMessageListenerContainer.java
  66. 24
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/MessageListenerContainer.java
  67. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/Subscription.java
  68. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/TailableCursorRequest.java
  69. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Collation.java
  70. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Criteria.java
  71. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/NearQuery.java
  72. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/schema/JsonSchemaObject.java
  73. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/script/NamedMongoScript.java
  74. 26
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Aggregation.java
  75. 12
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Query.java
  76. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/MongoQueryCreator.java

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/BindableMongoExpression.java

@ -31,7 +31,7 @@ import org.springframework.util.StringUtils;
* expression. The expression will be wrapped within <code>{ ... }</code> if necessary. The actual parsing and parameter * expression. The expression will be wrapped within <code>{ ... }</code> if necessary. The actual parsing and parameter
* binding of placeholders like {@code ?0} is delayed upon first call on the the target {@link Document} via * binding of placeholders like {@code ?0} is delayed upon first call on the the target {@link Document} via
* {@link #toDocument()}. * {@link #toDocument()}.
* <p /> * <br />
* *
* <pre class="code"> * <pre class="code">
* $toUpper : $name -> { '$toUpper' : '$name' } * $toUpper : $name -> { '$toUpper' : '$name' }

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoCollectionUtils.java

@ -20,8 +20,8 @@ import org.springframework.util.StringUtils;
/** /**
* Helper class featuring helper methods for working with MongoDb collections. * Helper class featuring helper methods for working with MongoDb collections.
* <p/> * <br />
* <p/> * <br />
* Mainly intended for internal use within the framework. * Mainly intended for internal use within the framework.
* *
* @author Thomas Risberg * @author Thomas Risberg

10
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoDatabaseUtils.java

@ -30,7 +30,7 @@ import com.mongodb.client.MongoDatabase;
* Helper class for managing a {@link MongoDatabase} instances via {@link MongoDatabaseFactory}. Used for obtaining * Helper class for managing a {@link MongoDatabase} instances via {@link MongoDatabaseFactory}. Used for obtaining
* {@link ClientSession session bound} resources, such as {@link MongoDatabase} and * {@link ClientSession session bound} resources, such as {@link MongoDatabase} and
* {@link com.mongodb.client.MongoCollection} suitable for transactional usage. * {@link com.mongodb.client.MongoCollection} suitable for transactional usage.
* <p /> * <br />
* <strong>Note:</strong> Intended for internal usage only. * <strong>Note:</strong> Intended for internal usage only.
* *
* @author Christoph Strobl * @author Christoph Strobl
@ -43,7 +43,7 @@ public class MongoDatabaseUtils {
/** /**
* Obtain the default {@link MongoDatabase database} form the given {@link MongoDatabaseFactory factory} using * Obtain the default {@link MongoDatabase database} form the given {@link MongoDatabaseFactory factory} using
* {@link SessionSynchronization#ON_ACTUAL_TRANSACTION native session synchronization}. * {@link SessionSynchronization#ON_ACTUAL_TRANSACTION native session synchronization}.
* <p /> * <br />
* Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the current * Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the current
* {@link Thread} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}. * {@link Thread} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}.
* *
@ -56,7 +56,7 @@ public class MongoDatabaseUtils {
/** /**
* Obtain the default {@link MongoDatabase database} form the given {@link MongoDatabaseFactory factory}. * Obtain the default {@link MongoDatabase database} form the given {@link MongoDatabaseFactory factory}.
* <p /> * <br />
* Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the current * Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the current
* {@link Thread} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}. * {@link Thread} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}.
* *
@ -71,7 +71,7 @@ public class MongoDatabaseUtils {
/** /**
* Obtain the {@link MongoDatabase database} with given name form the given {@link MongoDatabaseFactory factory} using * Obtain the {@link MongoDatabase database} with given name form the given {@link MongoDatabaseFactory factory} using
* {@link SessionSynchronization#ON_ACTUAL_TRANSACTION native session synchronization}. * {@link SessionSynchronization#ON_ACTUAL_TRANSACTION native session synchronization}.
* <p /> * <br />
* Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the current * Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the current
* {@link Thread} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}. * {@link Thread} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}.
* *
@ -85,7 +85,7 @@ public class MongoDatabaseUtils {
/** /**
* Obtain the {@link MongoDatabase database} with given name form the given {@link MongoDatabaseFactory factory}. * Obtain the {@link MongoDatabase database} with given name form the given {@link MongoDatabaseFactory factory}.
* <p /> * <br />
* Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the current * Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the current
* {@link Thread} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}. * {@link Thread} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}.
* *

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoExpression.java

@ -18,7 +18,7 @@ package org.springframework.data.mongodb;
/** /**
* Wrapper object for MongoDB expressions like {@code $toUpper : $name} that manifest as {@link org.bson.Document} when * Wrapper object for MongoDB expressions like {@code $toUpper : $name} that manifest as {@link org.bson.Document} when
* passed on to the driver. * passed on to the driver.
* <p /> * <br />
* A set of predefined {@link MongoExpression expressions}, including a * A set of predefined {@link MongoExpression expressions}, including a
* {@link org.springframework.data.mongodb.core.aggregation.AggregationSpELExpression SpEL based variant} for method * {@link org.springframework.data.mongodb.core.aggregation.AggregationSpELExpression SpEL based variant} for method
* like expressions (eg. {@code toUpper(name)}) are available via the * like expressions (eg. {@code toUpper(name)}) are available via the

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoResourceHolder.java

@ -24,7 +24,7 @@ import com.mongodb.client.ClientSession;
/** /**
* MongoDB specific {@link ResourceHolderSupport resource holder}, wrapping a {@link ClientSession}. * MongoDB specific {@link ResourceHolderSupport resource holder}, wrapping a {@link ClientSession}.
* {@link MongoTransactionManager} binds instances of this class to the thread. * {@link MongoTransactionManager} binds instances of this class to the thread.
* <p /> * <br />
* <strong>Note:</strong> Intended for internal usage only. * <strong>Note:</strong> Intended for internal usage only.
* *
* @author Christoph Strobl * @author Christoph Strobl

16
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoTransactionManager.java

@ -37,18 +37,18 @@ import com.mongodb.client.ClientSession;
/** /**
* A {@link org.springframework.transaction.PlatformTransactionManager} implementation that manages * A {@link org.springframework.transaction.PlatformTransactionManager} implementation that manages
* {@link ClientSession} based transactions for a single {@link MongoDatabaseFactory}. * {@link ClientSession} based transactions for a single {@link MongoDatabaseFactory}.
* <p /> * <br />
* Binds a {@link ClientSession} from the specified {@link MongoDatabaseFactory} to the thread. * Binds a {@link ClientSession} from the specified {@link MongoDatabaseFactory} to the thread.
* <p /> * <br />
* {@link TransactionDefinition#isReadOnly() Readonly} transactions operate on a {@link ClientSession} and enable causal * {@link TransactionDefinition#isReadOnly() Readonly} transactions operate on a {@link ClientSession} and enable causal
* consistency, and also {@link ClientSession#startTransaction() start}, {@link ClientSession#commitTransaction() * consistency, and also {@link ClientSession#startTransaction() start}, {@link ClientSession#commitTransaction()
* commit} or {@link ClientSession#abortTransaction() abort} a transaction. * commit} or {@link ClientSession#abortTransaction() abort} a transaction.
* <p /> * <br />
* Application code is required to retrieve the {@link com.mongodb.client.MongoDatabase} via * Application code is required to retrieve the {@link com.mongodb.client.MongoDatabase} via
* {@link MongoDatabaseUtils#getDatabase(MongoDatabaseFactory)} instead of a standard * {@link MongoDatabaseUtils#getDatabase(MongoDatabaseFactory)} instead of a standard
* {@link MongoDatabaseFactory#getMongoDatabase()} call. Spring classes such as * {@link MongoDatabaseFactory#getMongoDatabase()} call. Spring classes such as
* {@link org.springframework.data.mongodb.core.MongoTemplate} use this strategy implicitly. * {@link org.springframework.data.mongodb.core.MongoTemplate} use this strategy implicitly.
* <p /> * <br />
* By default failure of a {@literal commit} operation raises a {@link TransactionSystemException}. One may override * By default failure of a {@literal commit} operation raises a {@link TransactionSystemException}. One may override
* {@link #doCommit(MongoTransactionObject)} to implement the * {@link #doCommit(MongoTransactionObject)} to implement the
* <a href="https://docs.mongodb.com/manual/core/transactions/#retry-commit-operation">Retry Commit Operation</a> * <a href="https://docs.mongodb.com/manual/core/transactions/#retry-commit-operation">Retry Commit Operation</a>
@ -69,11 +69,11 @@ public class MongoTransactionManager extends AbstractPlatformTransactionManager
/** /**
* Create a new {@link MongoTransactionManager} for bean-style usage. * Create a new {@link MongoTransactionManager} for bean-style usage.
* <p /> * <br />
* <strong>Note:</strong>The {@link MongoDatabaseFactory db factory} has to be * <strong>Note:</strong>The {@link MongoDatabaseFactory db factory} has to be
* {@link #setDbFactory(MongoDatabaseFactory) set} before using the instance. Use this constructor to prepare a * {@link #setDbFactory(MongoDatabaseFactory) set} before using the instance. Use this constructor to prepare a
* {@link MongoTransactionManager} via a {@link org.springframework.beans.factory.BeanFactory}. * {@link MongoTransactionManager} via a {@link org.springframework.beans.factory.BeanFactory}.
* <p /> * <br />
* Optionally it is possible to set default {@link TransactionOptions transaction options} defining * Optionally it is possible to set default {@link TransactionOptions transaction options} defining
* {@link com.mongodb.ReadConcern} and {@link com.mongodb.WriteConcern}. * {@link com.mongodb.ReadConcern} and {@link com.mongodb.WriteConcern}.
* *
@ -212,8 +212,8 @@ public class MongoTransactionManager extends AbstractPlatformTransactionManager
* By default those labels are ignored, nevertheless one might check for * By default those labels are ignored, nevertheless one might check for
* {@link MongoException#UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL transient commit errors labels} and retry the the * {@link MongoException#UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL transient commit errors labels} and retry the the
* commit. <br /> * commit. <br />
* <code>
* <pre> * <pre>
* <code>
* int retries = 3; * int retries = 3;
* do { * do {
* try { * try {
@ -226,8 +226,8 @@ public class MongoTransactionManager extends AbstractPlatformTransactionManager
* } * }
* Thread.sleep(500); * Thread.sleep(500);
* } while (--retries > 0); * } while (--retries > 0);
* </pre>
* </code> * </code>
* </pre>
* *
* @param transactionObject never {@literal null}. * @param transactionObject never {@literal null}.
* @throws Exception in case of transaction errors. * @throws Exception in case of transaction errors.

10
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/ReactiveMongoDatabaseUtils.java

@ -36,7 +36,7 @@ import com.mongodb.reactivestreams.client.MongoDatabase;
* Helper class for managing reactive {@link MongoDatabase} instances via {@link ReactiveMongoDatabaseFactory}. Used for * Helper class for managing reactive {@link MongoDatabase} instances via {@link ReactiveMongoDatabaseFactory}. Used for
* obtaining {@link ClientSession session bound} resources, such as {@link MongoDatabase} and {@link MongoCollection} * obtaining {@link ClientSession session bound} resources, such as {@link MongoDatabase} and {@link MongoCollection}
* suitable for transactional usage. * suitable for transactional usage.
* <p /> * <br />
* <strong>Note:</strong> Intended for internal usage only. * <strong>Note:</strong> Intended for internal usage only.
* *
* @author Mark Paluch * @author Mark Paluch
@ -75,7 +75,7 @@ public class ReactiveMongoDatabaseUtils {
/** /**
* Obtain the default {@link MongoDatabase database} form the given {@link ReactiveMongoDatabaseFactory factory} using * Obtain the default {@link MongoDatabase database} form the given {@link ReactiveMongoDatabaseFactory factory} using
* {@link SessionSynchronization#ON_ACTUAL_TRANSACTION native session synchronization}. * {@link SessionSynchronization#ON_ACTUAL_TRANSACTION native session synchronization}.
* <p /> * <br />
* Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the subscriber * Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the subscriber
* {@link Context} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}. * {@link Context} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}.
* *
@ -88,7 +88,7 @@ public class ReactiveMongoDatabaseUtils {
/** /**
* Obtain the default {@link MongoDatabase database} form the given {@link ReactiveMongoDatabaseFactory factory}. * Obtain the default {@link MongoDatabase database} form the given {@link ReactiveMongoDatabaseFactory factory}.
* <p /> * <br />
* Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the subscriber * Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the subscriber
* {@link Context} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}. * {@link Context} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}.
* *
@ -104,7 +104,7 @@ public class ReactiveMongoDatabaseUtils {
/** /**
* Obtain the {@link MongoDatabase database} with given name form the given {@link ReactiveMongoDatabaseFactory * Obtain the {@link MongoDatabase database} with given name form the given {@link ReactiveMongoDatabaseFactory
* factory} using {@link SessionSynchronization#ON_ACTUAL_TRANSACTION native session synchronization}. * factory} using {@link SessionSynchronization#ON_ACTUAL_TRANSACTION native session synchronization}.
* <p /> * <br />
* Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the subscriber * Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the subscriber
* {@link Context} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}. * {@link Context} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}.
* *
@ -119,7 +119,7 @@ public class ReactiveMongoDatabaseUtils {
/** /**
* Obtain the {@link MongoDatabase database} with given name form the given {@link ReactiveMongoDatabaseFactory * Obtain the {@link MongoDatabase database} with given name form the given {@link ReactiveMongoDatabaseFactory
* factory}. * factory}.
* <p /> * <br />
* Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the subscriber * Registers a {@link MongoSessionSynchronization MongoDB specific transaction synchronization} within the subscriber
* {@link Context} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}. * {@link Context} if {@link TransactionSynchronizationManager#isSynchronizationActive() synchronization is active}.
* *

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/ReactiveMongoResourceHolder.java

@ -24,7 +24,7 @@ import com.mongodb.reactivestreams.client.ClientSession;
/** /**
* MongoDB specific resource holder, wrapping a {@link ClientSession}. {@link ReactiveMongoTransactionManager} binds * MongoDB specific resource holder, wrapping a {@link ClientSession}. {@link ReactiveMongoTransactionManager} binds
* instances of this class to the subscriber context. * instances of this class to the subscriber context.
* <p /> * <br />
* <strong>Note:</strong> Intended for internal usage only. * <strong>Note:</strong> Intended for internal usage only.
* *
* @author Mark Paluch * @author Mark Paluch

12
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/ReactiveMongoTransactionManager.java

@ -38,21 +38,21 @@ import com.mongodb.reactivestreams.client.ClientSession;
* A {@link org.springframework.transaction.ReactiveTransactionManager} implementation that manages * A {@link org.springframework.transaction.ReactiveTransactionManager} implementation that manages
* {@link com.mongodb.reactivestreams.client.ClientSession} based transactions for a single * {@link com.mongodb.reactivestreams.client.ClientSession} based transactions for a single
* {@link org.springframework.data.mongodb.ReactiveMongoDatabaseFactory}. * {@link org.springframework.data.mongodb.ReactiveMongoDatabaseFactory}.
* <p /> * <br />
* Binds a {@link ClientSession} from the specified * Binds a {@link ClientSession} from the specified
* {@link org.springframework.data.mongodb.ReactiveMongoDatabaseFactory} to the subscriber * {@link org.springframework.data.mongodb.ReactiveMongoDatabaseFactory} to the subscriber
* {@link reactor.util.context.Context}. * {@link reactor.util.context.Context}.
* <p /> * <br />
* {@link org.springframework.transaction.TransactionDefinition#isReadOnly() Readonly} transactions operate on a * {@link org.springframework.transaction.TransactionDefinition#isReadOnly() Readonly} transactions operate on a
* {@link ClientSession} and enable causal consistency, and also {@link ClientSession#startTransaction() start}, * {@link ClientSession} and enable causal consistency, and also {@link ClientSession#startTransaction() start},
* {@link com.mongodb.reactivestreams.client.ClientSession#commitTransaction() commit} or * {@link com.mongodb.reactivestreams.client.ClientSession#commitTransaction() commit} or
* {@link ClientSession#abortTransaction() abort} a transaction. * {@link ClientSession#abortTransaction() abort} a transaction.
* <p /> * <br />
* Application code is required to retrieve the {@link com.mongodb.reactivestreams.client.MongoDatabase} via * Application code is required to retrieve the {@link com.mongodb.reactivestreams.client.MongoDatabase} via
* {@link org.springframework.data.mongodb.ReactiveMongoDatabaseUtils#getDatabase(ReactiveMongoDatabaseFactory)} instead * {@link org.springframework.data.mongodb.ReactiveMongoDatabaseUtils#getDatabase(ReactiveMongoDatabaseFactory)} instead
* of a standard {@link org.springframework.data.mongodb.ReactiveMongoDatabaseFactory#getMongoDatabase()} call. Spring * of a standard {@link org.springframework.data.mongodb.ReactiveMongoDatabaseFactory#getMongoDatabase()} call. Spring
* classes such as {@link org.springframework.data.mongodb.core.ReactiveMongoTemplate} use this strategy implicitly. * classes such as {@link org.springframework.data.mongodb.core.ReactiveMongoTemplate} use this strategy implicitly.
* <p /> * <br />
* By default failure of a {@literal commit} operation raises a {@link TransactionSystemException}. You can override * By default failure of a {@literal commit} operation raises a {@link TransactionSystemException}. You can override
* {@link #doCommit(TransactionSynchronizationManager, ReactiveMongoTransactionObject)} to implement the * {@link #doCommit(TransactionSynchronizationManager, ReactiveMongoTransactionObject)} to implement the
* <a href="https://docs.mongodb.com/manual/core/transactions/#retry-commit-operation">Retry Commit Operation</a> * <a href="https://docs.mongodb.com/manual/core/transactions/#retry-commit-operation">Retry Commit Operation</a>
@ -71,11 +71,11 @@ public class ReactiveMongoTransactionManager extends AbstractReactiveTransaction
/** /**
* Create a new {@link ReactiveMongoTransactionManager} for bean-style usage. * Create a new {@link ReactiveMongoTransactionManager} for bean-style usage.
* <p /> * <br />
* <strong>Note:</strong>The {@link org.springframework.data.mongodb.ReactiveMongoDatabaseFactory db factory} has to * <strong>Note:</strong>The {@link org.springframework.data.mongodb.ReactiveMongoDatabaseFactory db factory} has to
* be {@link #setDatabaseFactory(ReactiveMongoDatabaseFactory)} set} before using the instance. Use this constructor * be {@link #setDatabaseFactory(ReactiveMongoDatabaseFactory)} set} before using the instance. Use this constructor
* to prepare a {@link ReactiveMongoTransactionManager} via a {@link org.springframework.beans.factory.BeanFactory}. * to prepare a {@link ReactiveMongoTransactionManager} via a {@link org.springframework.beans.factory.BeanFactory}.
* <p /> * <br />
* Optionally it is possible to set default {@link TransactionOptions transaction options} defining * Optionally it is possible to set default {@link TransactionOptions transaction options} defining
* {@link com.mongodb.ReadConcern} and {@link com.mongodb.WriteConcern}. * {@link com.mongodb.ReadConcern} and {@link com.mongodb.WriteConcern}.
* *

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SessionAwareMethodInterceptor.java

@ -35,7 +35,7 @@ import com.mongodb.session.ClientSession;
/** /**
* {@link MethodInterceptor} implementation looking up and invoking an alternative target method having * {@link MethodInterceptor} implementation looking up and invoking an alternative target method having
* {@link ClientSession} as its first argument. This allows seamless integration with the existing code base. * {@link ClientSession} as its first argument. This allows seamless integration with the existing code base.
* <p /> * <br />
* The {@link MethodInterceptor} is aware of methods on {@code MongoCollection} that my return new instances of itself * The {@link MethodInterceptor} is aware of methods on {@code MongoCollection} that my return new instances of itself
* like (eg. {@link com.mongodb.reactivestreams.client.MongoCollection#withWriteConcern(WriteConcern)} and decorate them * like (eg. {@link com.mongodb.reactivestreams.client.MongoCollection#withWriteConcern(WriteConcern)} and decorate them
* if not already proxied. * if not already proxied.

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SpringDataMongoDB.java

@ -48,7 +48,7 @@ public class SpringDataMongoDB {
/** /**
* Fetches the "Implementation-Version" manifest attribute from the jar file. * Fetches the "Implementation-Version" manifest attribute from the jar file.
* <p /> * <br />
* Note that some ClassLoaders do not expose the package metadata, hence this class might not be able to determine the * Note that some ClassLoaders do not expose the package metadata, hence this class might not be able to determine the
* version in all environments. In this case the current Major version is returned as a fallback. * version in all environments. In this case the current Major version is returned as a fallback.
* *

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/MongoConfigurationSupport.java

@ -172,8 +172,7 @@ public abstract class MongoConfigurationSupport {
/** /**
* Configures whether to abbreviate field names for domain objects by configuring a * Configures whether to abbreviate field names for domain objects by configuring a
* {@link CamelCaseAbbreviatingFieldNamingStrategy} on the {@link MongoMappingContext} instance created. For advanced * {@link CamelCaseAbbreviatingFieldNamingStrategy} on the {@link MongoMappingContext} instance created.
* customization needs, consider overriding {@link #mappingMongoConverter()}.
* *
* @return * @return
*/ */

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

@ -242,13 +242,13 @@ public class ChangeStreamOptions {
/** /**
* Set the filter to apply. * Set the filter to apply.
* <p/> * <br />
* Fields on aggregation expression root level are prefixed to map to fields contained in * Fields on aggregation expression root level are prefixed to map to fields contained in
* {@link ChangeStreamDocument#getFullDocument() fullDocument}. However {@literal operationType}, {@literal ns}, * {@link ChangeStreamDocument#getFullDocument() fullDocument}. However {@literal operationType}, {@literal ns},
* {@literal documentKey} and {@literal fullDocument} are reserved words that will be omitted, and therefore taken * {@literal documentKey} and {@literal fullDocument} are reserved words that will be omitted, and therefore taken
* as given, during the mapping procedure. You may want to have a look at the * as given, during the mapping procedure. You may want to have a look at the
* <a href="https://docs.mongodb.com/manual/reference/change-events/">structure of Change Events</a>. * <a href="https://docs.mongodb.com/manual/reference/change-events/">structure of Change Events</a>.
* <p/> * <br />
* Use {@link org.springframework.data.mongodb.core.aggregation.TypedAggregation} to ensure filter expressions are * Use {@link org.springframework.data.mongodb.core.aggregation.TypedAggregation} to ensure filter expressions are
* mapped to domain type fields. * mapped to domain type fields.
* *

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

@ -428,7 +428,7 @@ public class CollectionOptions {
/** /**
* Get the {@code validationAction} to perform. * Get the {@code validationAction} to perform.
* *
* @return @return {@link Optional#empty()} if not set. * @return {@link Optional#empty()} if not set.
*/ */
public Optional<ValidationAction> getValidationAction() { public Optional<ValidationAction> getValidationAction() {
return Optional.ofNullable(validationAction); return Optional.ofNullable(validationAction);

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

@ -125,7 +125,7 @@ public interface ExecutableFindOperation {
/** /**
* Get the number of matching elements. * Get the number of matching elements.
* <p /> * <br />
* This method uses an {@link com.mongodb.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) aggregation * This method uses an {@link com.mongodb.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) aggregation
* execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees shard, * execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees shard,
* session and transaction compliance. In case an inaccurate count satisfies the applications needs use * session and transaction compliance. In case an inaccurate count satisfies the applications needs use

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

@ -89,7 +89,7 @@ public interface ExecutableUpdateOperation {
/** /**
* Trigger * Trigger
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* execution by calling one of the terminating methods. * execution by calling one of the terminating methods.
* *
* @author Mark Paluch * @author Mark Paluch

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

@ -17,7 +17,7 @@ package org.springframework.data.mongodb.core;
/** /**
* Options for * Options for
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/>. * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>.
* <br /> * <br />
* Defaults to * Defaults to
* <dl> * <dl>

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

@ -33,7 +33,7 @@ import com.mongodb.client.MongoDatabase;
/** /**
* Common base class for usage with both {@link com.mongodb.client.MongoClients} defining common properties such as * Common base class for usage with both {@link com.mongodb.client.MongoClients} defining common properties such as
* database name and exception translator. * database name and exception translator.
* <p/> * <br />
* Not intended to be used directly. * Not intended to be used directly.
* *
* @author Christoph Strobl * @author Christoph Strobl

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

@ -20,7 +20,7 @@ import org.springframework.dao.support.PersistenceExceptionTranslator;
/** /**
* Common base class for usage with both {@link com.mongodb.client.MongoClients} defining common properties such as * Common base class for usage with both {@link com.mongodb.client.MongoClients} defining common properties such as
* database name and exception translator. * database name and exception translator.
* <p/> * <br />
* Not intended to be used directly. * Not intended to be used directly.
* *
* @author Christoph Strobl * @author Christoph Strobl

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

@ -40,6 +40,7 @@ import org.springframework.util.Assert;
* following mapping rules. * following mapping rules.
* <p> * <p>
* <strong>Required Properties</strong> * <strong>Required Properties</strong>
* </p>
* <ul> * <ul>
* <li>Properties of primitive type</li> * <li>Properties of primitive type</li>
* </ul> * </ul>
@ -61,7 +62,7 @@ import org.springframework.util.Assert;
* {@link org.springframework.data.annotation.Id _id} properties using types that can be converted into * {@link org.springframework.data.annotation.Id _id} properties using types that can be converted into
* {@link org.bson.types.ObjectId} like {@link String} will be mapped to {@code type : 'object'} unless there is more * {@link org.bson.types.ObjectId} like {@link String} will be mapped to {@code type : 'object'} unless there is more
* specific information available via the {@link org.springframework.data.mongodb.core.mapping.MongoId} annotation. * specific information available via the {@link org.springframework.data.mongodb.core.mapping.MongoId} annotation.
* </p>
* {@link Encrypted} properties will contain {@literal encrypt} information. * {@link Encrypted} properties will contain {@literal encrypt} information.
* *
* @author Christoph Strobl * @author Christoph Strobl

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

@ -58,7 +58,7 @@ import com.mongodb.client.result.UpdateResult;
* Interface that specifies a basic set of MongoDB operations. Implemented by {@link MongoTemplate}. Not often used but * Interface that specifies a basic set of MongoDB operations. Implemented by {@link MongoTemplate}. Not often used but
* a useful option for extensibility and testability (as it can be easily mocked, stubbed, or be the target of a JDK * a useful option for extensibility and testability (as it can be easily mocked, stubbed, or be the target of a JDK
* proxy). * proxy).
* <p/> * <br />
* <strong>NOTE:</strong> Some operations cannot be executed within a MongoDB transaction. Please refer to the MongoDB * <strong>NOTE:</strong> Some operations cannot be executed within a MongoDB transaction. Please refer to the MongoDB
* specific documentation to learn more about <a href="https://docs.mongodb.com/manual/core/transactions/">Multi * specific documentation to learn more about <a href="https://docs.mongodb.com/manual/core/transactions/">Multi
* Document Transactions</a>. * Document Transactions</a>.
@ -125,7 +125,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Executes a {@link DbCallback} translating any exceptions as necessary. * Executes a {@link DbCallback} translating any exceptions as necessary.
* <p/> * <br />
* Allows for returning a result object, that is a domain object or a collection of domain objects. * Allows for returning a result object, that is a domain object or a collection of domain objects.
* *
* @param action callback object that specifies the MongoDB actions to perform on the passed in DB instance. Must not * @param action callback object that specifies the MongoDB actions to perform on the passed in DB instance. Must not
@ -138,7 +138,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Executes the given {@link CollectionCallback} on the entity collection of the specified class. * Executes the given {@link CollectionCallback} on the entity collection of the specified class.
* <p/> * <br />
* Allows for returning a result object, that is a domain object or a collection of domain objects. * Allows for returning a result object, that is a domain object or a collection of domain objects.
* *
* @param entityClass class that determines the collection to use. Must not be {@literal null}. * @param entityClass class that determines the collection to use. Must not be {@literal null}.
@ -151,7 +151,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Executes the given {@link CollectionCallback} on the collection of the given name. * Executes the given {@link CollectionCallback} on the collection of the given name.
* <p/> * <br />
* Allows for returning a result object, that is a domain object or a collection of domain objects. * Allows for returning a result object, that is a domain object or a collection of domain objects.
* *
* @param collectionName the name of the collection that specifies which {@link MongoCollection} instance will be * @param collectionName the name of the collection that specifies which {@link MongoCollection} instance will be
@ -176,7 +176,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Obtain a {@link ClientSession session} bound instance of {@link SessionScoped} binding the {@link ClientSession} * Obtain a {@link ClientSession session} bound instance of {@link SessionScoped} binding the {@link ClientSession}
* provided by the given {@link Supplier} to each and every command issued against MongoDB. * provided by the given {@link Supplier} to each and every command issued against MongoDB.
* <p/> * <br />
* <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. Use the * <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. Use the
* {@link SessionScoped#execute(SessionCallback, Consumer)} hook to potentially close the {@link ClientSession}. * {@link SessionScoped#execute(SessionCallback, Consumer)} hook to potentially close the {@link ClientSession}.
* *
@ -212,7 +212,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Obtain a {@link ClientSession} bound instance of {@link MongoOperations}. * Obtain a {@link ClientSession} bound instance of {@link MongoOperations}.
* <p/> * <br />
* <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. * <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle.
* *
* @param session must not be {@literal null}. * @param session must not be {@literal null}.
@ -300,7 +300,7 @@ public interface MongoOperations extends FluentMongoOperations {
* is created on first interaction with the server. Collections can be explicitly created via * is created on first interaction with the server. Collections can be explicitly created via
* {@link #createCollection(Class)}. Please make sure to check if the collection {@link #collectionExists(Class) * {@link #createCollection(Class)}. Please make sure to check if the collection {@link #collectionExists(Class)
* exists} first. * exists} first.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param collectionName name of the collection. Must not be {@literal null}. * @param collectionName name of the collection. Must not be {@literal null}.
@ -310,7 +310,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Check to see if a collection with a name indicated by the entity class exists. * Check to see if a collection with a name indicated by the entity class exists.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param entityClass class that determines the name of the collection. Must not be {@literal null}. * @param entityClass class that determines the name of the collection. Must not be {@literal null}.
@ -320,7 +320,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Check to see if a collection with a given name exists. * Check to see if a collection with a given name exists.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param collectionName name of the collection. Must not be {@literal null}. * @param collectionName name of the collection. Must not be {@literal null}.
@ -330,7 +330,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Drop the collection with the name indicated by the entity class. * Drop the collection with the name indicated by the entity class.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param entityClass class that determines the collection to drop/delete. Must not be {@literal null}. * @param entityClass class that determines the collection to drop/delete. Must not be {@literal null}.
@ -339,7 +339,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Drop the collection with the given name. * Drop the collection with the given name.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param collectionName name of the collection to drop/delete. * @param collectionName name of the collection to drop/delete.
@ -403,10 +403,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Query for a list of objects of type T from the collection used by the entity class. * Query for a list of objects of type T from the collection used by the entity class.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your collection does not contain a homogeneous collection of types, this operation will not be an efficient way * If your collection does not contain a homogeneous collection of types, this operation will not be an efficient way
* to map objects since the test for class type is done in the client and not on the server. * to map objects since the test for class type is done in the client and not on the server.
* *
@ -417,10 +417,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Query for a list of objects of type T from the specified collection. * Query for a list of objects of type T from the specified collection.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your collection does not contain a homogeneous collection of types, this operation will not be an efficient way * If your collection does not contain a homogeneous collection of types, this operation will not be an efficient way
* to map objects since the test for class type is done in the client and not on the server. * to map objects since the test for class type is done in the client and not on the server.
* *
@ -539,11 +539,11 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Execute an aggregation operation backed by a Mongo DB {@link com.mongodb.client.AggregateIterable}. * Execute an aggregation operation backed by a Mongo DB {@link com.mongodb.client.AggregateIterable}.
* <p/> * <br />
* Returns a {@link CloseableIterator} that wraps the a Mongo DB {@link com.mongodb.client.AggregateIterable} that * Returns a {@link CloseableIterator} that wraps the a Mongo DB {@link com.mongodb.client.AggregateIterable} that
* needs to be closed. The raw results will be mapped to the given entity class and are returned as stream. The name * needs to be closed. The raw results will be mapped to the given entity class and are returned as stream. The name
* of the inputCollection is derived from the inputType of the aggregation. * of the inputCollection is derived from the inputType of the aggregation.
* <p/> * <br />
* Aggregation streaming can't be used with {@link AggregationOptions#isExplain() aggregation explain}. Enabling * Aggregation streaming can't be used with {@link AggregationOptions#isExplain() aggregation explain}. Enabling
* explanation mode will throw an {@link IllegalArgumentException}. * explanation mode will throw an {@link IllegalArgumentException}.
* *
@ -557,10 +557,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Execute an aggregation operation backed by a Mongo DB {@link com.mongodb.client.AggregateIterable}. * Execute an aggregation operation backed by a Mongo DB {@link com.mongodb.client.AggregateIterable}.
* <p/> * <br />
* Returns a {@link CloseableIterator} that wraps the a Mongo DB {@link com.mongodb.client.AggregateIterable} that * Returns a {@link CloseableIterator} that wraps the a Mongo DB {@link com.mongodb.client.AggregateIterable} that
* needs to be closed. The raw results will be mapped to the given entity class. * needs to be closed. The raw results will be mapped to the given entity class.
* <p/> * <br />
* Aggregation streaming can't be used with {@link AggregationOptions#isExplain() aggregation explain}. Enabling * Aggregation streaming can't be used with {@link AggregationOptions#isExplain() aggregation explain}. Enabling
* explanation mode will throw an {@link IllegalArgumentException}. * explanation mode will throw an {@link IllegalArgumentException}.
* *
@ -576,10 +576,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Execute an aggregation operation backed by a Mongo DB {@link com.mongodb.client.AggregateIterable}. * Execute an aggregation operation backed by a Mongo DB {@link com.mongodb.client.AggregateIterable}.
* <p/> * <br />
* Returns a {@link CloseableIterator} that wraps the a Mongo DB {@link com.mongodb.client.AggregateIterable} that * Returns a {@link CloseableIterator} that wraps the a Mongo DB {@link com.mongodb.client.AggregateIterable} that
* needs to be closed. The raw results will be mapped to the given entity class. * needs to be closed. The raw results will be mapped to the given entity class.
* <p/> * <br />
* Aggregation streaming can't be used with {@link AggregationOptions#isExplain() aggregation explain}. Enabling * Aggregation streaming can't be used with {@link AggregationOptions#isExplain() aggregation explain}. Enabling
* explanation mode will throw an {@link IllegalArgumentException}. * explanation mode will throw an {@link IllegalArgumentException}.
* *
@ -702,10 +702,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the collection for the entity class to a single instance of an object of the * Map the results of an ad-hoc query on the collection for the entity class to a single instance of an object of the
* specified type. * specified type.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -720,10 +720,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified * Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified
* type. * type.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -768,10 +768,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the collection for the entity class to a List of the specified type. * Map the results of an ad-hoc query on the collection for the entity class to a List of the specified type.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -784,10 +784,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the specified collection to a List of the specified type. * Map the results of an ad-hoc query on the specified collection to a List of the specified type.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -881,7 +881,7 @@ public interface MongoOperations extends FluentMongoOperations {
} }
/** /**
* Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify <a/> * Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify </a>
* to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query}. * to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query}.
* *
* @param query the {@link Query} class that specifies the {@link Criteria} used to find a record and also an optional * @param query the {@link Query} class that specifies the {@link Criteria} used to find a record and also an optional
@ -897,7 +897,7 @@ public interface MongoOperations extends FluentMongoOperations {
<T> T findAndModify(Query query, UpdateDefinition update, Class<T> entityClass); <T> T findAndModify(Query query, UpdateDefinition update, Class<T> entityClass);
/** /**
* Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify <a/> * Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify </a>
* to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query}. * to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query}.
* *
* @param query the {@link Query} class that specifies the {@link Criteria} used to find a record and also an optional * @param query the {@link Query} class that specifies the {@link Criteria} used to find a record and also an optional
@ -914,7 +914,7 @@ public interface MongoOperations extends FluentMongoOperations {
<T> T findAndModify(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName); <T> T findAndModify(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName);
/** /**
* Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify <a/> * Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify </a>
* to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query} taking * to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query} taking
* {@link FindAndModifyOptions} into account. * {@link FindAndModifyOptions} into account.
* *
@ -934,7 +934,7 @@ public interface MongoOperations extends FluentMongoOperations {
<T> T findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass); <T> T findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass);
/** /**
* Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify <a/> * Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify </a>
* to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query} taking * to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query} taking
* {@link FindAndModifyOptions} into account. * {@link FindAndModifyOptions} into account.
* *
@ -957,7 +957,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement}
* document. <br /> * document. <br />
* The collection name is derived from the {@literal replacement} type. <br /> * The collection name is derived from the {@literal replacement} type. <br />
@ -977,7 +977,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement}
* document.<br /> * document.<br />
* Options are defaulted to {@link FindAndReplaceOptions#empty()}. <br /> * Options are defaulted to {@link FindAndReplaceOptions#empty()}. <br />
@ -997,7 +997,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account.<br /> * taking {@link FindAndReplaceOptions} into account.<br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -1018,7 +1018,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account.<br /> * taking {@link FindAndReplaceOptions} into account.<br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -1041,7 +1041,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account.<br /> * taking {@link FindAndReplaceOptions} into account.<br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -1066,7 +1066,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account.<br /> * taking {@link FindAndReplaceOptions} into account.<br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -1094,7 +1094,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account.<br /> * taking {@link FindAndReplaceOptions} into account.<br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -1120,9 +1120,9 @@ public interface MongoOperations extends FluentMongoOperations {
* Map the results of an ad-hoc query on the collection for the entity type to a single instance of an object of the * Map the results of an ad-hoc query on the collection for the entity type to a single instance of an object of the
* specified type. The first document that matches the query is returned and also removed from the collection in the * specified type. The first document that matches the query is returned and also removed from the collection in the
* database. * database.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -1137,10 +1137,10 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified * Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified
* type. The first document that matches the query is returned and also removed from the collection in the database. * type. The first document that matches the query is returned and also removed from the collection in the database.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -1160,7 +1160,7 @@ public interface MongoOperations extends FluentMongoOperations {
* influence on the resulting number of documents found as those values are passed on to the server and potentially * influence on the resulting number of documents found as those values are passed on to the server and potentially
* limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to * limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to
* count all matches. * count all matches.
* <p /> * <br />
* This method uses an * This method uses an
* {@link com.mongodb.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) * {@link com.mongodb.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions)
* aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees * aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees
@ -1182,7 +1182,7 @@ public interface MongoOperations extends FluentMongoOperations {
* influence on the resulting number of documents found as those values are passed on to the server and potentially * influence on the resulting number of documents found as those values are passed on to the server and potentially
* limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to * limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to
* count all matches. * count all matches.
* <p /> * <br />
* This method uses an * This method uses an
* {@link com.mongodb.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) * {@link com.mongodb.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions)
* aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees * aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees
@ -1199,7 +1199,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Estimate the number of documents, in the collection {@link #getCollectionName(Class) identified by the given type}, * Estimate the number of documents, in the collection {@link #getCollectionName(Class) identified by the given type},
* based on collection statistics. * based on collection statistics.
* <p /> * <br />
* Please make sure to read the MongoDB reference documentation about limitations on eg. sharded cluster or inside * Please make sure to read the MongoDB reference documentation about limitations on eg. sharded cluster or inside
* transactions. * transactions.
* *
@ -1215,7 +1215,7 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Estimate the number of documents in the given collection based on collection statistics. * Estimate the number of documents in the given collection based on collection statistics.
* <p /> * <br />
* Please make sure to read the MongoDB reference documentation about limitations on eg. sharded cluster or inside * Please make sure to read the MongoDB reference documentation about limitations on eg. sharded cluster or inside
* transactions. * transactions.
* *
@ -1232,7 +1232,7 @@ public interface MongoOperations extends FluentMongoOperations {
* influence on the resulting number of documents found as those values are passed on to the server and potentially * influence on the resulting number of documents found as those values are passed on to the server and potentially
* limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to * limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to
* count all matches. * count all matches.
* <p /> * <br />
* This method uses an * This method uses an
* {@link com.mongodb.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) * {@link com.mongodb.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions)
* aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees * aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees
@ -1249,17 +1249,17 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Insert the object into the collection for the entity type of the object to save. * Insert the object into the collection for the entity type of the object to save.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's * <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's
* Type Conversion"</a> for more details. * Type Conversion"</a> for more details.
* <p/> * <br />
* Insert is used to initially store the object into the database. To update an existing object use the save method. * Insert is used to initially store the object into the database. To update an existing object use the save method.
* <p/> * <br />
* The {@code objectToSave} must not be collection-like. * The {@code objectToSave} must not be collection-like.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1270,12 +1270,12 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Insert the object into the specified collection. * Insert the object into the specified collection.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* Insert is used to initially store the object into the database. To update an existing object use the save method. * Insert is used to initially store the object into the database. To update an existing object use the save method.
* <p/> * <br />
* The {@code objectToSave} must not be collection-like. * The {@code objectToSave} must not be collection-like.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1315,16 +1315,16 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Save the object to the collection for the entity type of the object to save. This will perform an insert if the * Save the object to the collection for the entity type of the object to save. This will perform an insert if the
* object is not already present, that is an 'upsert'. * object is not already present, that is an 'upsert'.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's * <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's
* Type Conversion"</a> for more details. * Type Conversion"</a> for more details.
* <p /> * <br />
* The {@code objectToSave} must not be collection-like. * The {@code objectToSave} must not be collection-like.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1336,16 +1336,15 @@ public interface MongoOperations extends FluentMongoOperations {
/** /**
* Save the object to the specified collection. This will perform an insert if the object is not already present, that * Save the object to the specified collection. This will perform an insert if the object is not already present, that
* is an 'upsert'. * is an 'upsert'.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See <a * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API.
* https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type * See <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type Conversion</a> for more details.
* Conversion"</a> for more details. * <br />
* <p />
* The {@code objectToSave} must not be collection-like. * The {@code objectToSave} must not be collection-like.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.

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

@ -338,7 +338,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware,
/** /**
* Set the {@link EntityCallbacks} instance to use when invoking * Set the {@link EntityCallbacks} instance to use when invoking
* {@link org.springframework.data.mapping.callback.EntityCallback callbacks} like the {@link BeforeSaveCallback}. * {@link org.springframework.data.mapping.callback.EntityCallback callbacks} like the {@link BeforeSaveCallback}.
* <p /> * <br />
* Overrides potentially existing {@link EntityCallbacks}. * Overrides potentially existing {@link EntityCallbacks}.
* *
* @param entityCallbacks must not be {@literal null}. * @param entityCallbacks must not be {@literal null}.
@ -2664,7 +2664,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware,
/** /**
* Map the results of an ad-hoc query on the default MongoDB collection to an object using the template's converter. * Map the results of an ad-hoc query on the default MongoDB collection to an object using the template's converter.
* The first document that matches the query is returned and also removed from the collection in the database. * The first document that matches the query is returned and also removed from the collection in the database.
* <p/> * <br />
* The query document is specified as a standard Document and so is the fields specification. * The query document is specified as a standard Document and so is the fields specification.
* *
* @param collectionName name of the collection to retrieve the objects from * @param collectionName name of the collection to retrieve the objects from
@ -3493,7 +3493,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware,
/** /**
* {@link MongoTemplate} extension bound to a specific {@link ClientSession} that is applied when interacting with the * {@link MongoTemplate} extension bound to a specific {@link ClientSession} that is applied when interacting with the
* server through the driver API. * server through the driver API.
* <p /> * <br />
* The prepare steps for {@link MongoDatabase} and {@link MongoCollection} proxy the target and invoke the desired * The prepare steps for {@link MongoDatabase} and {@link MongoCollection} proxy the target and invoke the desired
* target method matching the actual arguments plus a {@link ClientSession}. * target method matching the actual arguments plus a {@link ClientSession}.
* *

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

@ -71,7 +71,7 @@ public interface ReactiveChangeStreamOperation {
/** /**
* Start listening to changes. The stream will not be completed unless the {@link org.reactivestreams.Subscription} * Start listening to changes. The stream will not be completed unless the {@link org.reactivestreams.Subscription}
* is {@link org.reactivestreams.Subscription#cancel() canceled}. * is {@link org.reactivestreams.Subscription#cancel() canceled}.
* <p /> * <br />
* However, the stream may become dead, or invalid, if all watched collections, databases are dropped. * However, the stream may become dead, or invalid, if all watched collections, databases are dropped.
*/ */
Flux<ChangeStreamEvent<T>> listen(); Flux<ChangeStreamEvent<T>> listen();

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

@ -91,10 +91,10 @@ public interface ReactiveFindOperation {
* Get all matching elements using a {@link com.mongodb.CursorType#TailableAwait tailable cursor}. The stream will * Get all matching elements using a {@link com.mongodb.CursorType#TailableAwait tailable cursor}. The stream will
* not be completed unless the {@link org.reactivestreams.Subscription} is * not be completed unless the {@link org.reactivestreams.Subscription} is
* {@link org.reactivestreams.Subscription#cancel() canceled}. * {@link org.reactivestreams.Subscription#cancel() canceled}.
* <p /> * <br />
* However, the stream may become dead, or invalid, if either the query returns no match or the cursor returns the * However, the stream may become dead, or invalid, if either the query returns no match or the cursor returns the
* document at the "end" of the collection and then the application deletes that document. * document at the "end" of the collection and then the application deletes that document.
* <p /> * <br />
* A stream that is no longer in use must be {@link reactor.core.Disposable#dispose()} disposed} otherwise the * A stream that is no longer in use must be {@link reactor.core.Disposable#dispose()} disposed} otherwise the
* streams will linger and exhaust resources. <br/> * streams will linger and exhaust resources. <br/>
* <strong>NOTE:</strong> Requires a capped collection. * <strong>NOTE:</strong> Requires a capped collection.
@ -106,7 +106,7 @@ public interface ReactiveFindOperation {
/** /**
* Get the number of matching elements. * Get the number of matching elements.
* <p /> * <br />
* This method uses an * This method uses an
* {@link com.mongodb.reactivestreams.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) * {@link com.mongodb.reactivestreams.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions)
* aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but * aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but

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

@ -59,7 +59,7 @@ import com.mongodb.reactivestreams.client.MongoCollection;
* Implemented by {@link ReactiveMongoTemplate}. Not often used but a useful option for extensibility and testability * Implemented by {@link ReactiveMongoTemplate}. Not often used but a useful option for extensibility and testability
* (as it can be easily mocked, stubbed, or be the target of a JDK proxy). Command execution using * (as it can be easily mocked, stubbed, or be the target of a JDK proxy). Command execution using
* {@link ReactiveMongoOperations} is deferred until subscriber subscribes to the {@link Publisher}. * {@link ReactiveMongoOperations} is deferred until subscriber subscribes to the {@link Publisher}.
* <p /> * <br />
* <strong>NOTE:</strong> Some operations cannot be executed within a MongoDB transaction. Please refer to the MongoDB * <strong>NOTE:</strong> Some operations cannot be executed within a MongoDB transaction. Please refer to the MongoDB
* specific documentation to learn more about <a href="https://docs.mongodb.com/manual/core/transactions/">Multi * specific documentation to learn more about <a href="https://docs.mongodb.com/manual/core/transactions/">Multi
* Document Transactions</a>. * Document Transactions</a>.
@ -121,7 +121,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Executes a {@link ReactiveDatabaseCallback} translating any exceptions as necessary. * Executes a {@link ReactiveDatabaseCallback} translating any exceptions as necessary.
* <p/> * <br />
* Allows for returning a result object, that is a domain object or a collection of domain objects. * Allows for returning a result object, that is a domain object or a collection of domain objects.
* *
* @param action callback object that specifies the MongoDB actions to perform on the passed in DB instance. Must not * @param action callback object that specifies the MongoDB actions to perform on the passed in DB instance. Must not
@ -133,7 +133,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Executes the given {@link ReactiveCollectionCallback} on the entity collection of the specified class. * Executes the given {@link ReactiveCollectionCallback} on the entity collection of the specified class.
* <p/> * <br />
* Allows for returning a result object, that is a domain object or a collection of domain objects. * Allows for returning a result object, that is a domain object or a collection of domain objects.
* *
* @param entityClass class that determines the collection to use. Must not be {@literal null}. * @param entityClass class that determines the collection to use. Must not be {@literal null}.
@ -145,7 +145,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Executes the given {@link ReactiveCollectionCallback} on the collection of the given name. * Executes the given {@link ReactiveCollectionCallback} on the collection of the given name.
* <p/> * <br />
* Allows for returning a result object, that is a domain object or a collection of domain objects. * Allows for returning a result object, that is a domain object or a collection of domain objects.
* *
* @param collectionName the name of the collection that specifies which {@link MongoCollection} instance will be * @param collectionName the name of the collection that specifies which {@link MongoCollection} instance will be
@ -159,7 +159,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Obtain a {@link ClientSession session} bound instance of {@link SessionScoped} binding the {@link ClientSession} * Obtain a {@link ClientSession session} bound instance of {@link SessionScoped} binding the {@link ClientSession}
* provided by the given {@link Supplier} to each and every command issued against MongoDB. * provided by the given {@link Supplier} to each and every command issued against MongoDB.
* <p /> * <br />
* <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. Use * <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. Use
* {@link ReactiveSessionScoped#execute(ReactiveSessionCallback, Consumer)} to provide a hook for processing the * {@link ReactiveSessionScoped#execute(ReactiveSessionCallback, Consumer)} to provide a hook for processing the
* {@link ClientSession} when done. * {@link ClientSession} when done.
@ -178,7 +178,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Obtain a {@link ClientSession session} bound instance of {@link SessionScoped} binding a new {@link ClientSession} * Obtain a {@link ClientSession session} bound instance of {@link SessionScoped} binding a new {@link ClientSession}
* with given {@literal sessionOptions} to each and every command issued against MongoDB. * with given {@literal sessionOptions} to each and every command issued against MongoDB.
* <p /> * <br />
* <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. Use * <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. Use
* {@link ReactiveSessionScoped#execute(ReactiveSessionCallback, Consumer)} to provide a hook for processing the * {@link ReactiveSessionScoped#execute(ReactiveSessionCallback, Consumer)} to provide a hook for processing the
* {@link ClientSession} when done. * {@link ClientSession} when done.
@ -192,7 +192,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Obtain a {@link ClientSession session} bound instance of {@link ReactiveSessionScoped} binding the * Obtain a {@link ClientSession session} bound instance of {@link ReactiveSessionScoped} binding the
* {@link ClientSession} provided by the given {@link Publisher} to each and every command issued against MongoDB. * {@link ClientSession} provided by the given {@link Publisher} to each and every command issued against MongoDB.
* <p /> * <br />
* <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. Use * <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. Use
* {@link ReactiveSessionScoped#execute(ReactiveSessionCallback, Consumer)} to provide a hook for processing the * {@link ReactiveSessionScoped#execute(ReactiveSessionCallback, Consumer)} to provide a hook for processing the
* {@link ClientSession} when done. * {@link ClientSession} when done.
@ -205,7 +205,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Obtain a {@link ClientSession} bound instance of {@link ReactiveMongoOperations}. * Obtain a {@link ClientSession} bound instance of {@link ReactiveMongoOperations}.
* <p /> * <br />
* <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle. * <strong>Note:</strong> It is up to the caller to manage the {@link ClientSession} lifecycle.
* *
* @param session must not be {@literal null}. * @param session must not be {@literal null}.
@ -218,7 +218,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* Initiate a new {@link ClientSession} and obtain a {@link ClientSession session} bound instance of * Initiate a new {@link ClientSession} and obtain a {@link ClientSession session} bound instance of
* {@link ReactiveSessionScoped}. Starts the transaction and adds the {@link ClientSession} to each and every command * {@link ReactiveSessionScoped}. Starts the transaction and adds the {@link ClientSession} to each and every command
* issued against MongoDB. * issued against MongoDB.
* <p/> * <br />
* Each {@link ReactiveSessionScoped#execute(ReactiveSessionCallback) execution} initiates a new managed transaction * Each {@link ReactiveSessionScoped#execute(ReactiveSessionCallback) execution} initiates a new managed transaction
* that is {@link ClientSession#commitTransaction() committed} on success. Transactions are * that is {@link ClientSession#commitTransaction() committed} on success. Transactions are
* {@link ClientSession#abortTransaction() rolled back} upon errors. * {@link ClientSession#abortTransaction() rolled back} upon errors.
@ -233,7 +233,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* Obtain a {@link ClientSession session} bound instance of {@link ReactiveSessionScoped}, start the transaction and * Obtain a {@link ClientSession session} bound instance of {@link ReactiveSessionScoped}, start the transaction and
* bind the {@link ClientSession} provided by the given {@link Publisher} to each and every command issued against * bind the {@link ClientSession} provided by the given {@link Publisher} to each and every command issued against
* MongoDB. * MongoDB.
* <p/> * <br />
* Each {@link ReactiveSessionScoped#execute(ReactiveSessionCallback) execution} initiates a new managed transaction * Each {@link ReactiveSessionScoped#execute(ReactiveSessionCallback) execution} initiates a new managed transaction
* that is {@link ClientSession#commitTransaction() committed} on success. Transactions are * that is {@link ClientSession#commitTransaction() committed} on success. Transactions are
* {@link ClientSession#abortTransaction() rolled back} upon errors. * {@link ClientSession#abortTransaction() rolled back} upon errors.
@ -293,7 +293,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* created on first interaction with the server. Collections can be explicitly created via * created on first interaction with the server. Collections can be explicitly created via
* {@link #createCollection(Class)}. Please make sure to check if the collection {@link #collectionExists(Class) * {@link #createCollection(Class)}. Please make sure to check if the collection {@link #collectionExists(Class)
* exists} first. * exists} first.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param collectionName name of the collection. * @param collectionName name of the collection.
@ -303,7 +303,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Check to see if a collection with a name indicated by the entity class exists. * Check to see if a collection with a name indicated by the entity class exists.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param entityClass class that determines the name of the collection. Must not be {@literal null}. * @param entityClass class that determines the name of the collection. Must not be {@literal null}.
@ -313,7 +313,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Check to see if a collection with a given name exists. * Check to see if a collection with a given name exists.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param collectionName name of the collection. Must not be {@literal null}. * @param collectionName name of the collection. Must not be {@literal null}.
@ -323,7 +323,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Drop the collection with the name indicated by the entity class. * Drop the collection with the name indicated by the entity class.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param entityClass class that determines the collection to drop/delete. Must not be {@literal null}. * @param entityClass class that determines the collection to drop/delete. Must not be {@literal null}.
@ -332,7 +332,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Drop the collection with the given name. * Drop the collection with the given name.
* <p/> * <br />
* Translate any exceptions as necessary. * Translate any exceptions as necessary.
* *
* @param collectionName name of the collection to drop/delete. * @param collectionName name of the collection to drop/delete.
@ -341,10 +341,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Query for a {@link Flux} of objects of type T from the collection used by the entity class. * Query for a {@link Flux} of objects of type T from the collection used by the entity class.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your collection does not contain a homogeneous collection of types, this operation will not be an efficient way * If your collection does not contain a homogeneous collection of types, this operation will not be an efficient way
* to map objects since the test for class type is done in the client and not on the server. * to map objects since the test for class type is done in the client and not on the server.
* *
@ -355,10 +355,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Query for a {@link Flux} of objects of type T from the specified collection. * Query for a {@link Flux} of objects of type T from the specified collection.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your collection does not contain a homogeneous collection of types, this operation will not be an efficient way * If your collection does not contain a homogeneous collection of types, this operation will not be an efficient way
* to map objects since the test for class type is done in the client and not on the server. * to map objects since the test for class type is done in the client and not on the server.
* *
@ -371,10 +371,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the collection for the entity class to a single instance of an object of the * Map the results of an ad-hoc query on the collection for the entity class to a single instance of an object of the
* specified type. * specified type.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -388,10 +388,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified * Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified
* type. * type.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -435,10 +435,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the collection for the entity class to a {@link Flux} of the specified type. * Map the results of an ad-hoc query on the collection for the entity class to a {@link Flux} of the specified type.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -451,10 +451,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the specified collection to a {@link Flux} of the specified type. * Map the results of an ad-hoc query on the specified collection to a {@link Flux} of the specified type.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -566,10 +566,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Execute an aggregation operation. * Execute an aggregation operation.
* <p/> * <br />
* The raw results will be mapped to the given entity class and are returned as stream. The name of the * The raw results will be mapped to the given entity class and are returned as stream. The name of the
* inputCollection is derived from the {@link TypedAggregation#getInputType() aggregation input type}. * inputCollection is derived from the {@link TypedAggregation#getInputType() aggregation input type}.
* <p/> * <br />
* Aggregation streaming cannot be used with {@link AggregationOptions#isExplain() aggregation explain} nor with * Aggregation streaming cannot be used with {@link AggregationOptions#isExplain() aggregation explain} nor with
* {@link AggregationOptions#getCursorBatchSize()}. Enabling explanation mode or setting batch size cause * {@link AggregationOptions#getCursorBatchSize()}. Enabling explanation mode or setting batch size cause
* {@link IllegalArgumentException}. * {@link IllegalArgumentException}.
@ -584,10 +584,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Execute an aggregation operation. * Execute an aggregation operation.
* <p/> * <br />
* The raw results will be mapped to the given {@code ouputType}. The name of the inputCollection is derived from the * The raw results will be mapped to the given {@code ouputType}. The name of the inputCollection is derived from the
* {@code inputType}. * {@code inputType}.
* <p/> * <br />
* Aggregation streaming cannot be used with {@link AggregationOptions#isExplain() aggregation explain} nor with * Aggregation streaming cannot be used with {@link AggregationOptions#isExplain() aggregation explain} nor with
* {@link AggregationOptions#getCursorBatchSize()}. Enabling explanation mode or setting batch size cause * {@link AggregationOptions#getCursorBatchSize()}. Enabling explanation mode or setting batch size cause
* {@link IllegalArgumentException}. * {@link IllegalArgumentException}.
@ -604,9 +604,9 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Execute an aggregation operation. * Execute an aggregation operation.
* <p/> * <br />
* The raw results will be mapped to the given entity class. * The raw results will be mapped to the given entity class.
* <p/> * <br />
* Aggregation streaming cannot be used with {@link AggregationOptions#isExplain() aggregation explain} nor with * Aggregation streaming cannot be used with {@link AggregationOptions#isExplain() aggregation explain} nor with
* {@link AggregationOptions#getCursorBatchSize()}. Enabling explanation mode or setting batch size cause * {@link AggregationOptions#getCursorBatchSize()}. Enabling explanation mode or setting batch size cause
* {@link IllegalArgumentException}. * {@link IllegalArgumentException}.
@ -676,7 +676,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
<T> Flux<GeoResult<T>> geoNear(NearQuery near, Class<T> entityClass, String collectionName); <T> Flux<GeoResult<T>> geoNear(NearQuery near, Class<T> entityClass, String collectionName);
/** /**
* Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify<a/> * Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify</a>
* to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query}. * to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query}.
* *
* @param query the {@link Query} class that specifies the {@link Criteria} used to find a record and also an optional * @param query the {@link Query} class that specifies the {@link Criteria} used to find a record and also an optional
@ -691,7 +691,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
<T> Mono<T> findAndModify(Query query, UpdateDefinition update, Class<T> entityClass); <T> Mono<T> findAndModify(Query query, UpdateDefinition update, Class<T> entityClass);
/** /**
* Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify<a/> * Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify</a>
* to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query}. * to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query}.
* *
* @param query the {@link Query} class that specifies the {@link Criteria} used to find a record and also an optional * @param query the {@link Query} class that specifies the {@link Criteria} used to find a record and also an optional
@ -707,7 +707,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
<T> Mono<T> findAndModify(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName); <T> Mono<T> findAndModify(Query query, UpdateDefinition update, Class<T> entityClass, String collectionName);
/** /**
* Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify<a/> * Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify</a>
* to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query} taking * to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query} taking
* {@link FindAndModifyOptions} into account. * {@link FindAndModifyOptions} into account.
* *
@ -725,7 +725,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
<T> Mono<T> findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass); <T> Mono<T> findAndModify(Query query, UpdateDefinition update, FindAndModifyOptions options, Class<T> entityClass);
/** /**
* Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify<a/> * Triggers <a href="https://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/">findAndModify</a>
* to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query} taking * to apply provided {@link Update} on documents matching {@link Criteria} of given {@link Query} taking
* {@link FindAndModifyOptions} into account. * {@link FindAndModifyOptions} into account.
* *
@ -746,7 +746,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement}
* document. <br /> * document. <br />
* Options are defaulted to {@link FindAndReplaceOptions#empty()}. <br /> * Options are defaulted to {@link FindAndReplaceOptions#empty()}. <br />
@ -764,7 +764,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement}
* document. <br /> * document. <br />
* Options are defaulted to {@link FindAndReplaceOptions#empty()}. <br /> * Options are defaulted to {@link FindAndReplaceOptions#empty()}. <br />
@ -783,7 +783,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account. <br /> * taking {@link FindAndReplaceOptions} into account. <br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -803,7 +803,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account. <br /> * taking {@link FindAndReplaceOptions} into account. <br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -825,7 +825,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account. <br /> * taking {@link FindAndReplaceOptions} into account. <br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -849,7 +849,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account. <br /> * taking {@link FindAndReplaceOptions} into account. <br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -876,7 +876,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Triggers * Triggers
* <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace<a/> * <a href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/">findOneAndReplace</a>
* to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document * to replace a single document matching {@link Criteria} of given {@link Query} with the {@code replacement} document
* taking {@link FindAndReplaceOptions} into account. <br /> * taking {@link FindAndReplaceOptions} into account. <br />
* <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}. * <strong>NOTE:</strong> The replacement entity must not hold an {@literal id}.
@ -902,9 +902,9 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* Map the results of an ad-hoc query on the collection for the entity type to a single instance of an object of the * Map the results of an ad-hoc query on the collection for the entity type to a single instance of an object of the
* specified type. The first document that matches the query is returned and also removed from the collection in the * specified type. The first document that matches the query is returned and also removed from the collection in the
* database. * database.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -918,10 +918,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified * Map the results of an ad-hoc query on the specified collection to a single instance of an object of the specified
* type. The first document that matches the query is returned and also removed from the collection in the database. * type. The first document that matches the query is returned and also removed from the collection in the database.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -940,7 +940,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* influence on the resulting number of documents found as those values are passed on to the server and potentially * influence on the resulting number of documents found as those values are passed on to the server and potentially
* limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to * limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to
* count all matches. * count all matches.
* <p /> * <br />
* This method uses an * This method uses an
* {@link com.mongodb.reactivestreams.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) * {@link com.mongodb.reactivestreams.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions)
* aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees * aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees
@ -962,7 +962,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* influence on the resulting number of documents found as those values are passed on to the server and potentially * influence on the resulting number of documents found as those values are passed on to the server and potentially
* limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to * limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to
* count all matches. * count all matches.
* <p /> * <br />
* This method uses an * This method uses an
* {@link com.mongodb.reactivestreams.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) * {@link com.mongodb.reactivestreams.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions)
* aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees * aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees
@ -983,7 +983,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* influence on the resulting number of documents found as those values are passed on to the server and potentially * influence on the resulting number of documents found as those values are passed on to the server and potentially
* limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to * limit the range and order within which the server performs the count operation. Use an {@literal unpaged} query to
* count all matches. * count all matches.
* <p /> * <br />
* This method uses an * This method uses an
* {@link com.mongodb.reactivestreams.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions) * {@link com.mongodb.reactivestreams.client.MongoCollection#countDocuments(org.bson.conversions.Bson, com.mongodb.client.model.CountOptions)
* aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees * aggregation execution} even for empty {@link Query queries} which may have an impact on performance, but guarantees
@ -1001,7 +1001,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Estimate the number of documents, in the collection {@link #getCollectionName(Class) identified by the given type}, * Estimate the number of documents, in the collection {@link #getCollectionName(Class) identified by the given type},
* based on collection statistics. * based on collection statistics.
* <p /> * <br />
* Please make sure to read the MongoDB reference documentation about limitations on eg. sharded cluster or inside * Please make sure to read the MongoDB reference documentation about limitations on eg. sharded cluster or inside
* transactions. * transactions.
* *
@ -1017,7 +1017,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Estimate the number of documents in the given collection based on collection statistics. * Estimate the number of documents in the given collection based on collection statistics.
* <p /> * <br />
* Please make sure to read the MongoDB reference documentation about limitations on eg. sharded cluster or inside * Please make sure to read the MongoDB reference documentation about limitations on eg. sharded cluster or inside
* transactions. * transactions.
* *
@ -1029,17 +1029,17 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Insert the object into the collection for the entity type of the object to save. * Insert the object into the collection for the entity type of the object to save.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's * <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's
* Type Conversion"</a> for more details. * Type Conversion"</a> for more details.
* <p/> * <br />
* Insert is used to initially store the object into the database. To update an existing object use the save method. * Insert is used to initially store the object into the database. To update an existing object use the save method.
* <p /> * <br />
* The {@code objectToSave} must not be collection-like. * The {@code objectToSave} must not be collection-like.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1050,12 +1050,12 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Insert the object into the specified collection. * Insert the object into the specified collection.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* Insert is used to initially store the object into the database. To update an existing object use the save method. * Insert is used to initially store the object into the database. To update an existing object use the save method.
* <p /> * <br />
* The {@code objectToSave} must not be collection-like. * The {@code objectToSave} must not be collection-like.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1094,15 +1094,15 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Insert the object into the collection for the entity type of the object to save. * Insert the object into the collection for the entity type of the object to save.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's * <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's
* Type Conversion"</a> for more details. * Type Conversion"</a> for more details.
* <p/> * <br />
* Insert is used to initially store the object into the database. To update an existing object use the save method. * Insert is used to initially store the object into the database. To update an existing object use the save method.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1140,16 +1140,16 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Save the object to the collection for the entity type of the object to save. This will perform an insert if the * Save the object to the collection for the entity type of the object to save. This will perform an insert if the
* object is not already present, that is an 'upsert'. * object is not already present, that is an 'upsert'.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's * <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's
* Type Conversion"</a> for more details. * Type Conversion"</a> for more details.
* <p /> * <br />
* The {@code objectToSave} must not be collection-like. * The {@code objectToSave} must not be collection-like.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1161,15 +1161,14 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Save the object to the specified collection. This will perform an insert if the object is not already present, that * Save the object to the specified collection. This will perform an insert if the object is not already present, that
* is an 'upsert'. * is an 'upsert'.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See <a * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API.
* https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type * See <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type Conversion</a> for more details.
* Conversion"</a> for more details.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
* @param collectionName name of the collection to store the object in. Must not be {@literal null}. * @param collectionName name of the collection to store the object in. Must not be {@literal null}.
@ -1181,15 +1180,14 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Save the object to the collection for the entity type of the object to save. This will perform an insert if the * Save the object to the collection for the entity type of the object to save. This will perform an insert if the
* object is not already present, that is an 'upsert'. * object is not already present, that is an 'upsert'.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API.
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's * See <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation"> Spring's Type Conversion</a> for more details.
* Type Conversion"</a> for more details.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collection. Must not be {@literal null}.
* @return the saved object. * @return the saved object.
@ -1199,17 +1197,16 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
/** /**
* Save the object to the specified collection. This will perform an insert if the object is not already present, that * Save the object to the specified collection. This will perform an insert if the object is not already present, that
* is an 'upsert'. * is an 'upsert'.
* <p/> * <br />
* The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted to the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a * If your object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your * String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See <a * property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API.
* https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type * See <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type Conversion</a> for more details.
* Conversion"</a> for more details.
* *
* @param objectToSave the object to store in the collection. Must not be {@literal null}. * @param objectToSave the object to store in the collReactiveMongoOperationsection. Must not be {@literal null}.
* @param collectionName name of the collection to store the object in. Must not be {@literal null}. * @param collectionName name of the collection to store the object in. Must not be {@literal null}.
* @return the saved object. * @return the saved object.
*/ */
@ -1481,10 +1478,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* type. The stream uses a {@link com.mongodb.CursorType#TailableAwait tailable} cursor that may be an infinite * type. The stream uses a {@link com.mongodb.CursorType#TailableAwait tailable} cursor that may be an infinite
* stream. The stream will not be completed unless the {@link org.reactivestreams.Subscription} is * stream. The stream will not be completed unless the {@link org.reactivestreams.Subscription} is
* {@link Subscription#cancel() canceled}. * {@link Subscription#cancel() canceled}.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -1500,10 +1497,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* type. The stream uses a {@link com.mongodb.CursorType#TailableAwait tailable} cursor that may be an infinite * type. The stream uses a {@link com.mongodb.CursorType#TailableAwait tailable} cursor that may be an infinite
* stream. The stream will not be completed unless the {@link org.reactivestreams.Subscription} is * stream. The stream will not be completed unless the {@link org.reactivestreams.Subscription} is
* {@link Subscription#cancel() canceled}. * {@link Subscription#cancel() canceled}.
* <p/> * <br />
* The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless * The object is converted from the MongoDB native representation using an instance of {@see MongoConverter}. Unless
* configured otherwise, an instance of {@link MappingMongoConverter} will be used. * configured otherwise, an instance of {@link MappingMongoConverter} will be used.
* <p/> * <br />
* The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more * The query is specified as a {@link Query} which can be created either using the {@link BasicQuery} or the more
* feature rich {@link Query}. * feature rich {@link Query}.
* *
@ -1520,10 +1517,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* the configured default database via the reactive infrastructure. Use the optional provided {@link Aggregation} to * the configured default database via the reactive infrastructure. Use the optional provided {@link Aggregation} to
* filter events. The stream will not be completed unless the {@link org.reactivestreams.Subscription} is * filter events. The stream will not be completed unless the {@link org.reactivestreams.Subscription} is
* {@link Subscription#cancel() canceled}. * {@link Subscription#cancel() canceled}.
* <p /> * <br />
* The {@link ChangeStreamEvent#getBody()} is mapped to the {@literal resultType} while the * The {@link ChangeStreamEvent#getBody()} is mapped to the {@literal resultType} while the
* {@link ChangeStreamEvent#getRaw()} contains the unmodified payload. * {@link ChangeStreamEvent#getRaw()} contains the unmodified payload.
* <p /> * <br />
* Use {@link ChangeStreamOptions} to set arguments like {@link ChangeStreamOptions#getResumeToken() the resumseToken} * Use {@link ChangeStreamOptions} to set arguments like {@link ChangeStreamOptions#getResumeToken() the resumseToken}
* for resuming change streams. * for resuming change streams.
* *
@ -1544,10 +1541,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* the given collection via the reactive infrastructure. Use the optional provided {@link Aggregation} to filter * the given collection via the reactive infrastructure. Use the optional provided {@link Aggregation} to filter
* events. The stream will not be completed unless the {@link org.reactivestreams.Subscription} is * events. The stream will not be completed unless the {@link org.reactivestreams.Subscription} is
* {@link Subscription#cancel() canceled}. * {@link Subscription#cancel() canceled}.
* <p /> * <br />
* The {@link ChangeStreamEvent#getBody()} is mapped to the {@literal resultType} while the * The {@link ChangeStreamEvent#getBody()} is mapped to the {@literal resultType} while the
* {@link ChangeStreamEvent#getRaw()} contains the unmodified payload. * {@link ChangeStreamEvent#getRaw()} contains the unmodified payload.
* <p /> * <br />
* Use {@link ChangeStreamOptions} to set arguments like {@link ChangeStreamOptions#getResumeToken() the resumseToken} * Use {@link ChangeStreamOptions} to set arguments like {@link ChangeStreamOptions#getResumeToken() the resumseToken}
* for resuming change streams. * for resuming change streams.
* *
@ -1569,10 +1566,10 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* Subscribe to a MongoDB <a href="https://docs.mongodb.com/manual/changeStreams/">Change Stream</a> via the reactive * Subscribe to a MongoDB <a href="https://docs.mongodb.com/manual/changeStreams/">Change Stream</a> via the reactive
* infrastructure. Use the optional provided {@link Aggregation} to filter events. The stream will not be completed * infrastructure. Use the optional provided {@link Aggregation} to filter events. The stream will not be completed
* unless the {@link org.reactivestreams.Subscription} is {@link Subscription#cancel() canceled}. * unless the {@link org.reactivestreams.Subscription} is {@link Subscription#cancel() canceled}.
* <p /> * <br />
* The {@link ChangeStreamEvent#getBody()} is mapped to the {@literal resultType} while the * The {@link ChangeStreamEvent#getBody()} is mapped to the {@literal resultType} while the
* {@link ChangeStreamEvent#getRaw()} contains the unmodified payload. * {@link ChangeStreamEvent#getRaw()} contains the unmodified payload.
* <p /> * <br />
* Use {@link ChangeStreamOptions} to set arguments like {@link ChangeStreamOptions#getResumeToken() the resumseToken} * Use {@link ChangeStreamOptions} to set arguments like {@link ChangeStreamOptions#getResumeToken() the resumseToken}
* for resuming change streams. * for resuming change streams.
* *

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

@ -362,7 +362,7 @@ public class ReactiveMongoTemplate implements ReactiveMongoOperations, Applicati
* Set the {@link ReactiveEntityCallbacks} instance to use when invoking * Set the {@link ReactiveEntityCallbacks} instance to use when invoking
* {@link org.springframework.data.mapping.callback.EntityCallback callbacks} like the * {@link org.springframework.data.mapping.callback.EntityCallback callbacks} like the
* {@link ReactiveBeforeSaveCallback}. * {@link ReactiveBeforeSaveCallback}.
* <p /> * <br />
* Overrides potentially existing {@link ReactiveEntityCallbacks}. * Overrides potentially existing {@link ReactiveEntityCallbacks}.
* *
* @param entityCallbacks must not be {@literal null}. * @param entityCallbacks must not be {@literal null}.
@ -2537,7 +2537,7 @@ public class ReactiveMongoTemplate implements ReactiveMongoOperations, Applicati
/** /**
* Map the results of an ad-hoc query on the default MongoDB collection to an object using the template's converter. * Map the results of an ad-hoc query on the default MongoDB collection to an object using the template's converter.
* The first document that matches the query is returned and also removed from the collection in the database. * The first document that matches the query is returned and also removed from the collection in the database.
* <p/> * <br />
* The query document is specified as a standard Document and so is the fields specification. * The query document is specified as a standard Document and so is the fields specification.
* *
* @param collectionName name of the collection to retrieve the objects from * @param collectionName name of the collection to retrieve the objects from
@ -3390,7 +3390,7 @@ public class ReactiveMongoTemplate implements ReactiveMongoOperations, Applicati
/** /**
* {@link MongoTemplate} extension bound to a specific {@link ClientSession} that is applied when interacting with the * {@link MongoTemplate} extension bound to a specific {@link ClientSession} that is applied when interacting with the
* server through the driver API. * server through the driver API.
* <p /> * <br />
* The prepare steps for {@link MongoDatabase} and {@link MongoCollection} proxy the target and invoke the desired * The prepare steps for {@link MongoDatabase} and {@link MongoCollection} proxy the target and invoke the desired
* target method matching the actual arguments plus a {@link ClientSession}. * target method matching the actual arguments plus a {@link ClientSession}.
* *

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

@ -32,7 +32,7 @@ public interface ReactiveSessionCallback<T> {
/** /**
* Execute operations against a MongoDB instance via session bound {@link ReactiveMongoOperations}. The session is * Execute operations against a MongoDB instance via session bound {@link ReactiveMongoOperations}. The session is
* inferred directly into the operation so that no further interaction is necessary. * inferred directly into the operation so that no further interaction is necessary.
* <p /> * <br />
* Please note that only Spring Data-specific abstractions like {@link ReactiveMongoOperations#find(Query, Class)} and * Please note that only Spring Data-specific abstractions like {@link ReactiveMongoOperations#find(Query, Class)} and
* others are enhanced with the {@link com.mongodb.session.ClientSession}. When obtaining plain MongoDB gateway * others are enhanced with the {@link com.mongodb.session.ClientSession}. When obtaining plain MongoDB gateway
* objects like {@link com.mongodb.reactivestreams.client.MongoCollection} or * objects like {@link com.mongodb.reactivestreams.client.MongoCollection} or

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

@ -33,7 +33,7 @@ public interface ReactiveSessionScoped {
/** /**
* Executes the given {@link ReactiveSessionCallback} within the {@link com.mongodb.session.ClientSession}. * Executes the given {@link ReactiveSessionCallback} within the {@link com.mongodb.session.ClientSession}.
* <p/> * <br />
* It is up to the caller to make sure the {@link com.mongodb.session.ClientSession} is {@link ClientSession#close() * It is up to the caller to make sure the {@link com.mongodb.session.ClientSession} is {@link ClientSession#close()
* closed} when done. * closed} when done.
* *
@ -47,7 +47,7 @@ public interface ReactiveSessionScoped {
/** /**
* Executes the given {@link ReactiveSessionCallback} within the {@link com.mongodb.session.ClientSession}. * Executes the given {@link ReactiveSessionCallback} within the {@link com.mongodb.session.ClientSession}.
* <p/> * <br />
* It is up to the caller to make sure the {@link com.mongodb.session.ClientSession} is {@link ClientSession#close() * It is up to the caller to make sure the {@link com.mongodb.session.ClientSession} is {@link ClientSession#close()
* closed} when done. * closed} when done.
* *

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

@ -23,7 +23,7 @@ import org.springframework.lang.Nullable;
/** /**
* Script operations on {@link com.mongodb.DB} level. Allows interaction with server side JavaScript functions. * Script operations on {@link com.mongodb.client.MongoDatabase} level. Allows interaction with server side JavaScript functions.
* *
* @author Christoph Strobl * @author Christoph Strobl
* @author Oliver Gierke * @author Oliver Gierke
@ -72,10 +72,10 @@ public interface ScriptOperations {
Object call(String scriptName, Object... args); Object call(String scriptName, Object... args);
/** /**
* Checks {@link DB} for existence of {@link ServerSideJavaScript} with given name. * Checks {@link com.mongodb.client.MongoDatabase} for existence of {@literal ServerSideJavaScript} with given name.
* *
* @param scriptName must not be {@literal null} or empty. * @param scriptName must not be {@literal null} or empty.
* @return false if no {@link ServerSideJavaScript} with given name exists. * @return false if no {@literal ServerSideJavaScript} with given name exists.
*/ */
boolean exists(String scriptName); boolean exists(String scriptName);

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

@ -31,7 +31,7 @@ public interface SessionCallback<T> {
/** /**
* Execute operations against a MongoDB instance via session bound {@link MongoOperations}. The session is inferred * Execute operations against a MongoDB instance via session bound {@link MongoOperations}. The session is inferred
* directly into the operation so that no further interaction is necessary. * directly into the operation so that no further interaction is necessary.
* <p /> * <br />
* Please note that only Spring Data-specific abstractions like {@link MongoOperations#find(Query, Class)} and others * Please note that only Spring Data-specific abstractions like {@link MongoOperations#find(Query, Class)} and others
* are enhanced with the {@link com.mongodb.session.ClientSession}. When obtaining plain MongoDB gateway objects like * are enhanced with the {@link com.mongodb.session.ClientSession}. When obtaining plain MongoDB gateway objects like
* {@link com.mongodb.client.MongoCollection} or {@link com.mongodb.client.MongoDatabase} via eg. * {@link com.mongodb.client.MongoCollection} or {@link com.mongodb.client.MongoDatabase} via eg.

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

@ -23,7 +23,7 @@ import com.mongodb.client.ClientSession;
/** /**
* Gateway interface to execute {@link ClientSession} bound operations against MongoDB via a {@link SessionCallback}. * Gateway interface to execute {@link ClientSession} bound operations against MongoDB via a {@link SessionCallback}.
* <p /> * <br />
* The very same bound {@link ClientSession} is used for all invocations of {@code execute} on the instance. * The very same bound {@link ClientSession} is used for all invocations of {@code execute} on the instance.
* *
* @author Christoph Strobl * @author Christoph Strobl
@ -34,7 +34,7 @@ public interface SessionScoped {
/** /**
* Executes the given {@link SessionCallback} within the {@link com.mongodb.session.ClientSession}. * Executes the given {@link SessionCallback} within the {@link com.mongodb.session.ClientSession}.
* <p/> * <br />
* It is up to the caller to make sure the {@link com.mongodb.session.ClientSession} is {@link ClientSession#close() * It is up to the caller to make sure the {@link com.mongodb.session.ClientSession} is {@link ClientSession#close()
* closed} when done. * closed} when done.
* *
@ -49,7 +49,7 @@ public interface SessionScoped {
/** /**
* Executes the given {@link SessionCallback} within the {@link com.mongodb.session.ClientSession}. * Executes the given {@link SessionCallback} within the {@link com.mongodb.session.ClientSession}.
* <p/> * <br />
* It is up to the caller to make sure the {@link com.mongodb.session.ClientSession} is {@link ClientSession#close() * It is up to the caller to make sure the {@link com.mongodb.session.ClientSession} is {@link ClientSession#close()
* closed} when done. * closed} when done.
* *

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/Aggregation.java

@ -227,7 +227,7 @@ public class Aggregation {
/** /**
* Obtain an {@link AddFieldsOperationBuilder builder} instance to create a new {@link AddFieldsOperation}. * Obtain an {@link AddFieldsOperationBuilder builder} instance to create a new {@link AddFieldsOperation}.
* <p/> * <br />
* Starting in version 4.2, MongoDB adds a new aggregation pipeline stage {@link AggregationUpdate#set $set} that is * Starting in version 4.2, MongoDB adds a new aggregation pipeline stage {@link AggregationUpdate#set $set} that is
* an alias for {@code $addFields}. * an alias for {@code $addFields}.
* *
@ -726,7 +726,7 @@ public class Aggregation {
/** /**
* Converts this {@link Aggregation} specification to a {@link Document}. * Converts this {@link Aggregation} specification to a {@link Document}.
* <p/> * <br />
* MongoDB requires as of 3.6 cursor-based aggregation. Use {@link #toPipeline(AggregationOperationContext)} to render * MongoDB requires as of 3.6 cursor-based aggregation. Use {@link #toPipeline(AggregationOperationContext)} to render
* an aggregation pipeline. * an aggregation pipeline.
* *

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationSpELExpression.java

@ -24,15 +24,15 @@ import org.springframework.util.Assert;
* expression</a>. <br /> * expression</a>. <br />
* <br /> * <br />
* <strong>Samples:</strong> <br /> * <strong>Samples:</strong> <br />
* <code>
* <pre> * <pre>
* <code>
* // { $and: [ { $gt: [ "$qty", 100 ] }, { $lt: [ "$qty", 250 ] } ] } * // { $and: [ { $gt: [ "$qty", 100 ] }, { $lt: [ "$qty", 250 ] } ] }
* expressionOf("qty > 100 && qty < 250); * expressionOf("qty > 100 && qty < 250);
* *
* // { $cond : { if : { $gte : [ "$a", 42 ]}, then : "answer", else : "no-answer" } } * // { $cond : { if : { $gte : [ "$a", 42 ]}, then : "answer", else : "no-answer" } }
* expressionOf("cond(a >= 42, 'answer', 'no-answer')"); * expressionOf("cond(a >= 42, 'answer', 'no-answer')");
* </pre>
* </code> * </code>
* </pre>
* *
* @author Christoph Strobl * @author Christoph Strobl
* @author Mark Paluch * @author Mark Paluch

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationUpdate.java

@ -71,8 +71,7 @@ import org.springframework.util.Assert;
* *
* @author Christoph Strobl * @author Christoph Strobl
* @author Mark Paluch * @author Mark Paluch
* @see <a href= * @see <a href="https://docs.mongodb.com/manual/reference/method/db.collection.update/#update-with-aggregation-pipeline">MongoDB
* "https://docs.mongodb.com/manual/reference/method/db.collection.update/#update-with-aggregation-pipeline">MongoDB
* Reference Documentation</a> * Reference Documentation</a>
* @since 3.0 * @since 3.0
*/ */

34
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java

@ -825,7 +825,7 @@ public class ArithmeticOperators {
* Creates new {@link AggregationExpression} that calculates the inverse tangent of the the numeric value divided by * Creates new {@link AggregationExpression} that calculates the inverse tangent of the the numeric value divided by
* the given numeric value in the argument. * the given numeric value in the argument.
* *
* @param the numeric value * @param value the numeric value
* @return new instance of {@link ATan2}. * @return new instance of {@link ATan2}.
* @since 3.3 * @since 3.3
*/ */
@ -839,7 +839,7 @@ public class ArithmeticOperators {
* Creates new {@link AggregationExpression} that calculates the inverse tangent of the the numeric value divided by * Creates new {@link AggregationExpression} that calculates the inverse tangent of the the numeric value divided by
* the given field reference in the argument. * the given field reference in the argument.
* *
* @param the numeric value * @param fieldReference the numeric value
* @return new instance of {@link ATan2}. * @return new instance of {@link ATan2}.
* @since 3.3 * @since 3.3
*/ */
@ -853,7 +853,7 @@ public class ArithmeticOperators {
* Creates new {@link AggregationExpression} that calculates the inverse tangent of the the numeric value divided by * Creates new {@link AggregationExpression} that calculates the inverse tangent of the the numeric value divided by
* the given {@link AggregationExpression} in the argument. * the given {@link AggregationExpression} in the argument.
* *
* @param the numeric value * @param expression the expression evaluating to a numeric value
* @return new instance of {@link ATan2}. * @return new instance of {@link ATan2}.
* @since 3.3 * @since 3.3
*/ */
@ -2169,7 +2169,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the sine of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the sine of a value that is measured in
* {@link AngularUnit#RADIANS radians}. * {@link AngularUnit#RADIANS radians}.
* <p /> * <br />
* Use {@code sinhOf("angle", DEGREES)} as shortcut for * Use {@code sinhOf("angle", DEGREES)} as shortcut for
* *
* <pre> * <pre>
@ -2282,7 +2282,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the hyperbolic sine of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the hyperbolic sine of a value that is measured in
* the given {@link AngularUnit unit}. * the given {@link AngularUnit unit}.
* <p /> * <br />
* Use {@code sinhOf("angle", DEGREES)} as shortcut for * Use {@code sinhOf("angle", DEGREES)} as shortcut for
* *
* <pre> * <pre>
@ -2302,7 +2302,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the hyperbolic sine of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the hyperbolic sine of a value that is measured in
* {@link AngularUnit#RADIANS}. * {@link AngularUnit#RADIANS}.
* <p /> * <br />
* Use {@code sinhOf("angle", DEGREES)} as shortcut for eg. * Use {@code sinhOf("angle", DEGREES)} as shortcut for eg.
* {@code sinhOf(ConvertOperators.valueOf("angle").degreesToRadians())}. * {@code sinhOf(ConvertOperators.valueOf("angle").degreesToRadians())}.
* *
@ -2386,7 +2386,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the inverse sine of a value. * Creates a new {@link AggregationExpression} that calculates the inverse sine of a value.
* <p /> * <br />
* *
* @param expression the {@link AggregationExpression expression} that resolves to a numeric value. * @param expression the {@link AggregationExpression expression} that resolves to a numeric value.
* @return new instance of {@link ASin}. * @return new instance of {@link ASin}.
@ -2436,7 +2436,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the inverse hyperbolic sine of a value. * Creates a new {@link AggregationExpression} that calculates the inverse hyperbolic sine of a value.
* <p /> * <br />
* *
* @param expression the {@link AggregationExpression expression} that resolves to a numeric value. * @param expression the {@link AggregationExpression expression} that resolves to a numeric value.
* @return new instance of {@link ASinh}. * @return new instance of {@link ASinh}.
@ -2478,7 +2478,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the cosine of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the cosine of a value that is measured in
* {@link AngularUnit#RADIANS radians}. * {@link AngularUnit#RADIANS radians}.
* <p /> * <br />
* Use {@code cosOf("angle", DEGREES)} as shortcut for * Use {@code cosOf("angle", DEGREES)} as shortcut for
* *
* <pre> * <pre>
@ -2589,7 +2589,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the hyperbolic cosine of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the hyperbolic cosine of a value that is measured in
* the given {@link AngularUnit unit}. * the given {@link AngularUnit unit}.
* <p /> * <br />
* Use {@code coshOf("angle", DEGREES)} as shortcut for * Use {@code coshOf("angle", DEGREES)} as shortcut for
* *
* <pre> * <pre>
@ -2607,7 +2607,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the hyperbolic cosine of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the hyperbolic cosine of a value that is measured in
* {@link AngularUnit#RADIANS}. * {@link AngularUnit#RADIANS}.
* <p /> * <br />
* Use {@code sinhOf("angle", DEGREES)} as shortcut for eg. * Use {@code sinhOf("angle", DEGREES)} as shortcut for eg.
* {@code sinhOf(ConvertOperators.valueOf("angle").degreesToRadians())}. * {@code sinhOf(ConvertOperators.valueOf("angle").degreesToRadians())}.
* *
@ -2680,7 +2680,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the tangent of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the tangent of a value that is measured in
* {@link AngularUnit#RADIANS radians}. * {@link AngularUnit#RADIANS radians}.
* <p /> * <br />
* Use {@code tanOf("angle", DEGREES)} as shortcut for * Use {@code tanOf("angle", DEGREES)} as shortcut for
* *
* <pre> * <pre>
@ -2859,7 +2859,7 @@ public class ArithmeticOperators {
* Creates a new {@link AggregationExpression} that calculates the inverse tangent of of y / x, where y and x are * Creates a new {@link AggregationExpression} that calculates the inverse tangent of of y / x, where y and x are
* the first and second values passed to the expression respectively. * the first and second values passed to the expression respectively.
* *
* @param value anything ({@link Field field}, {@link AggregationExpression expression}, ...) that resolves to a * @param fieldReference anything ({@link Field field}, {@link AggregationExpression expression}, ...) that resolves to a
* numeric value. * numeric value.
* @return new instance of {@link ATan2}. * @return new instance of {@link ATan2}.
*/ */
@ -2873,7 +2873,7 @@ public class ArithmeticOperators {
* Creates a new {@link AggregationExpression} that calculates the hyperbolic tangent of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the hyperbolic tangent of a value that is measured in
* {@link AngularUnit#RADIANS}. * {@link AngularUnit#RADIANS}.
* *
* @param value anything ({@link Field field}, {@link AggregationExpression expression}, ...) that resolves to a * @param expression anything ({@link Field field}, {@link AggregationExpression expression}, ...) that resolves to a
* numeric value. * numeric value.
* @return new instance of {@link ATan2}. * @return new instance of {@link ATan2}.
*/ */
@ -2927,7 +2927,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the hyperbolic tangent of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the hyperbolic tangent of a value that is measured in
* the given {@link AngularUnit unit}. * the given {@link AngularUnit unit}.
* <p /> * <br />
* Use {@code tanhOf("angle", DEGREES)} as shortcut for * Use {@code tanhOf("angle", DEGREES)} as shortcut for
* *
* <pre> * <pre>
@ -2945,7 +2945,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the hyperbolic tangent of a value that is measured in * Creates a new {@link AggregationExpression} that calculates the hyperbolic tangent of a value that is measured in
* {@link AngularUnit#RADIANS}. * {@link AngularUnit#RADIANS}.
* <p /> * <br />
* Use {@code sinhOf("angle", DEGREES)} as shortcut for eg. * Use {@code sinhOf("angle", DEGREES)} as shortcut for eg.
* {@code sinhOf(ConvertOperators.valueOf("angle").degreesToRadians())}. * {@code sinhOf(ConvertOperators.valueOf("angle").degreesToRadians())}.
* *
@ -3029,7 +3029,7 @@ public class ArithmeticOperators {
/** /**
* Creates a new {@link AggregationExpression} that calculates the inverse hyperbolic tangent of a value. * Creates a new {@link AggregationExpression} that calculates the inverse hyperbolic tangent of a value.
* <p /> * <br />
* *
* @param expression the {@link AggregationExpression expression} that resolves to a numeric value. * @param expression the {@link AggregationExpression expression} that resolves to a numeric value.
* @return new instance of {@link ATanh}. * @return new instance of {@link ATanh}.

6
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/BucketAutoOperation.java

@ -28,8 +28,7 @@ import org.springframework.util.Assert;
* We recommend to use the static factory method {@link Aggregation#bucketAuto(String, int)} instead of creating * We recommend to use the static factory method {@link Aggregation#bucketAuto(String, int)} instead of creating
* instances of this class directly. * instances of this class directly.
* *
* @see <a href= * @see <a href="https://docs.mongodb.org/manual/reference/aggregation/bucketAuto/">https://docs.mongodb.org/manual/reference/aggregation/bucketAuto/</a>
* "https://docs.mongodb.org/manual/reference/aggregation/bucketAuto/">https://docs.mongodb.org/manual/reference/aggregation/bucketAuto/</a>
* @see BucketOperationSupport * @see BucketOperationSupport
* @author Mark Paluch * @author Mark Paluch
* @author Christoph Strobl * @author Christoph Strobl
@ -248,8 +247,7 @@ public class BucketAutoOperation extends BucketOperationSupport<BucketAutoOperat
/** /**
* Supported MongoDB granularities. * Supported MongoDB granularities.
* *
* @see <a * @see <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/#granularity">https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/#granularity</a>
* href="https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/#granularity>https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/#granularity</a>
* @author Mark Paluch * @author Mark Paluch
*/ */
public enum Granularities implements Granularity { public enum Granularities implements Granularity {

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/BucketOperation.java

@ -31,8 +31,7 @@ import org.springframework.util.Assert;
* We recommend to use the static factory method {@link Aggregation#bucket(String)} instead of creating instances of * We recommend to use the static factory method {@link Aggregation#bucket(String)} instead of creating instances of
* this class directly. * this class directly.
* *
* @see <a href= * @see <a href="https://docs.mongodb.org/manual/reference/aggregation/bucket/">https://docs.mongodb.org/manual/reference/aggregation/bucket/</a>
* "https://docs.mongodb.org/manual/reference/aggregation/bucket/">https://docs.mongodb.org/manual/reference/aggregation/bucket/</a>
* @see BucketOperationSupport * @see BucketOperationSupport
* @author Mark Paluch * @author Mark Paluch
* @since 1.10 * @since 1.10

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ConvertOperators.java

@ -328,9 +328,9 @@ public class ConvertOperators {
* <dt>1</dt> * <dt>1</dt>
* <dd>double</dd> * <dd>double</dd>
* <dt>2</dt> * <dt>2</dt>
* <dd>string</li> * <dd>string</dd>
* <dt>7</dt> * <dt>7</dt>
* <dd>objectId</li> * <dd>objectId</dd>
* <dt>8</dt> * <dt>8</dt>
* <dd>bool</dd> * <dd>bool</dd>
* <dt>9</dt> * <dt>9</dt>

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/CountOperation.java

@ -24,8 +24,7 @@ import org.springframework.util.Assert;
* We recommend to use the static factory method {@link Aggregation#count()} instead of creating instances of this class * We recommend to use the static factory method {@link Aggregation#count()} instead of creating instances of this class
* directly. * directly.
* *
* @see <a href= * @see <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/count/#pipe._S_count">https://docs.mongodb.com/manual/reference/operator/aggregation/count/</a>
* "https://docs.mongodb.com/manual/reference/operator/aggregation/count/#pipe._S_count">https://docs.mongodb.com/manual/reference/operator/aggregation/count/</a>
* @author Mark Paluch * @author Mark Paluch
* @since 1.10 * @since 1.10
*/ */

6
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/DateOperators.java

@ -92,7 +92,7 @@ public class DateOperators {
/** /**
* Take the given value as date. * Take the given value as date.
* <p/> * <br />
* This can be one of: * This can be one of:
* <ul> * <ul>
* <li>{@link java.util.Date}</li> * <li>{@link java.util.Date}</li>
@ -142,7 +142,7 @@ public class DateOperators {
* Timezone represents a MongoDB timezone abstraction which can be represented with a timezone ID or offset as a * Timezone represents a MongoDB timezone abstraction which can be represented with a timezone ID or offset as a
* {@link String}. Also accepts a {@link AggregationExpression} or {@link Field} that resolves to a {@link String} of * {@link String}. Also accepts a {@link AggregationExpression} or {@link Field} that resolves to a {@link String} of
* either Olson Timezone Identifier or a UTC Offset.<br /> * either Olson Timezone Identifier or a UTC Offset.<br />
* <table valign="top"> * <table>
* <tr> * <tr>
* <th>Format</th> * <th>Format</th>
* <th>Example</th> * <th>Example</th>
@ -334,7 +334,7 @@ public class DateOperators {
/** /**
* Creates new {@link DateOperatorFactory} for given {@code value} that resolves to a Date. * Creates new {@link DateOperatorFactory} for given {@code value} that resolves to a Date.
* <p/> * <br />
* <ul> * <ul>
* <li>{@link java.util.Date}</li> * <li>{@link java.util.Date}</li>
* <li>{@link java.util.Calendar}</li> * <li>{@link java.util.Calendar}</li>

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/GraphLookupOperation.java

@ -36,8 +36,7 @@ import org.springframework.util.ClassUtils;
* We recommend to use the static factory method {@link Aggregation#graphLookup(String)} instead of creating instances * We recommend to use the static factory method {@link Aggregation#graphLookup(String)} instead of creating instances
* of this class directly. * of this class directly.
* *
* @see <a href= * @see <a href="https://docs.mongodb.org/manual/reference/aggregation/graphLookup/">https://docs.mongodb.org/manual/reference/aggregation/graphLookup/</a>
* "https://docs.mongodb.org/manual/reference/aggregation/graphLookup/">https://docs.mongodb.org/manual/reference/aggregation/graphLookup/</a>
* @author Mark Paluch * @author Mark Paluch
* @author Christoph Strobl * @author Christoph Strobl
* @since 1.10 * @since 1.10

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/GroupOperation.java

@ -139,7 +139,7 @@ public class GroupOperation implements FieldsExposingAggregationOperation {
* Generates an {@link GroupOperationBuilder} for a {@code $sum}-expression. * Generates an {@link GroupOperationBuilder} for a {@code $sum}-expression.
* <p> * <p>
* Count expressions are emulated via {@code $sum: 1}. * Count expressions are emulated via {@code $sum: 1}.
* <p> * </p>
* *
* @return * @return
*/ */

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/PrefixingDelegatingAggregationOperationContext.java

@ -30,7 +30,7 @@ import org.springframework.lang.Nullable;
/** /**
* {@link AggregationOperationContext} implementation prefixing non-command keys on root level with the given prefix. * {@link AggregationOperationContext} implementation prefixing non-command keys on root level with the given prefix.
* Useful when mapping fields to domain specific types while having to prefix keys for query purpose. * Useful when mapping fields to domain specific types while having to prefix keys for query purpose.
* <p /> * <br />
* Fields to be excluded from prefixing my be added to a {@literal denylist}. * Fields to be excluded from prefixing my be added to a {@literal denylist}.
* *
* @author Christoph Strobl * @author Christoph Strobl

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RedactOperation.java

@ -33,8 +33,7 @@ import org.springframework.util.Assert;
* </pre> * </pre>
* *
* @author Christoph Strobl * @author Christoph Strobl
* @see <a href= * @see <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/redact/">https://docs.mongodb.com/manual/reference/operator/aggregation/redact/</a>
* "https://docs.mongodb.com/manual/reference/operator/aggregation/redact/">https://docs.mongodb.com/manual/reference/operator/aggregation/redact/</a>
* @since 3.0 * @since 3.0
*/ */
public class RedactOperation implements AggregationOperation { public class RedactOperation implements AggregationOperation {

36
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ScriptOperators.java

@ -30,7 +30,7 @@ import org.springframework.util.CollectionUtils;
/** /**
* Gateway to {@literal $function} and {@literal $accumulator} aggregation operations. * Gateway to {@literal $function} and {@literal $accumulator} aggregation operations.
* <p /> * <br />
* Using {@link ScriptOperators} as part of the {@link Aggregation} requires MongoDB server to have * Using {@link ScriptOperators} as part of the {@link Aggregation} requires MongoDB server to have
* <a href="https://docs.mongodb.com/master/core/server-side-javascript/">server-side JavaScript</a> execution * <a href="https://docs.mongodb.com/master/core/server-side-javascript/">server-side JavaScript</a> execution
* <a href="https://docs.mongodb.com/master/reference/configuration-options/#security.javascriptEnabled">enabled</a>. * <a href="https://docs.mongodb.com/master/reference/configuration-options/#security.javascriptEnabled">enabled</a>.
@ -43,7 +43,7 @@ public class ScriptOperators {
/** /**
* Create a custom aggregation * Create a custom aggregation
* <a href="https://docs.mongodb.com/master/reference/operator/aggregation/function/">$function<a /> in JavaScript. * <a href="https://docs.mongodb.com/master/reference/operator/aggregation/function/">$function</a> in JavaScript.
* *
* @param body The function definition. Must not be {@literal null}. * @param body The function definition. Must not be {@literal null}.
* @return new instance of {@link Function}. * @return new instance of {@link Function}.
@ -53,8 +53,8 @@ public class ScriptOperators {
} }
/** /**
* Create a custom <a href="https://docs.mongodb.com/master/reference/operator/aggregation/accumulator/">$accumulator * Create a custom <a href="https://docs.mongodb.com/master/reference/operator/aggregation/accumulator/">$accumulator operator</a>
* operator</a> in Javascript. * in Javascript.
* *
* @return new instance of {@link AccumulatorInitBuilder}. * @return new instance of {@link AccumulatorInitBuilder}.
*/ */
@ -65,7 +65,7 @@ public class ScriptOperators {
/** /**
* {@link Function} defines a custom aggregation * {@link Function} defines a custom aggregation
* <a href="https://docs.mongodb.com/master/reference/operator/aggregation/function/">$function</a> in JavaScript. * <a href="https://docs.mongodb.com/master/reference/operator/aggregation/function/">$function</a> in JavaScript.
* <p /> * <br />
* <code class="java"> * <code class="java">
* { * {
* $function: { * $function: {
@ -75,7 +75,7 @@ public class ScriptOperators {
* } * }
* } * }
* </code> * </code>
* <p /> * <br />
* {@link Function} cannot be used as part of {@link org.springframework.data.mongodb.core.schema.MongoJsonSchema * {@link Function} cannot be used as part of {@link org.springframework.data.mongodb.core.schema.MongoJsonSchema
* schema} validation query expression. <br /> * schema} validation query expression. <br />
* <b>NOTE:</b> <a href="https://docs.mongodb.com/master/core/server-side-javascript/">Server-Side JavaScript</a> * <b>NOTE:</b> <a href="https://docs.mongodb.com/master/core/server-side-javascript/">Server-Side JavaScript</a>
@ -179,7 +179,7 @@ public class ScriptOperators {
* <a href="https://docs.mongodb.com/master/reference/operator/aggregation/accumulator/">$accumulator operator</a>, * <a href="https://docs.mongodb.com/master/reference/operator/aggregation/accumulator/">$accumulator operator</a>,
* one that maintains its state (e.g. totals, maximums, minimums, and related data) as documents progress through the * one that maintains its state (e.g. totals, maximums, minimums, and related data) as documents progress through the
* pipeline, in JavaScript. * pipeline, in JavaScript.
* <p /> * <br />
* <code class="java"> * <code class="java">
* { * {
* $accumulator: { * $accumulator: {
@ -193,7 +193,7 @@ public class ScriptOperators {
* } * }
* } * }
* </code> * </code>
* <p /> * <br />
* {@link Accumulator} can be used as part of {@link GroupOperation $group}, {@link BucketOperation $bucket} and * {@link Accumulator} can be used as part of {@link GroupOperation $group}, {@link BucketOperation $bucket} and
* {@link BucketAutoOperation $bucketAuto} pipeline stages. <br /> * {@link BucketAutoOperation $bucketAuto} pipeline stages. <br />
* <b>NOTE:</b> <a href="https://docs.mongodb.com/master/core/server-side-javascript/">Server-Side JavaScript</a> * <b>NOTE:</b> <a href="https://docs.mongodb.com/master/core/server-side-javascript/">Server-Side JavaScript</a>
@ -241,7 +241,7 @@ public class ScriptOperators {
/** /**
* Define the {@code init} {@link Function} for the {@link Accumulator accumulators} initial state. The function * Define the {@code init} {@link Function} for the {@link Accumulator accumulators} initial state. The function
* receives its arguments from the {@link Function#args(Object...) initArgs} array expression. * receives its arguments from the {@link Function#args(Object...) initArgs} array expression.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(initArg1, initArg2, ...) { * function(initArg1, initArg2, ...) {
* ... * ...
@ -259,7 +259,7 @@ public class ScriptOperators {
/** /**
* Define the {@code init} function for the {@link Accumulator accumulators} initial state. The function receives * Define the {@code init} function for the {@link Accumulator accumulators} initial state. The function receives
* its arguments from the {@link AccumulatorInitArgsBuilder#initArgs(Object...)} array expression. * its arguments from the {@link AccumulatorInitArgsBuilder#initArgs(Object...)} array expression.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(initArg1, initArg2, ...) { * function(initArg1, initArg2, ...) {
* ... * ...
@ -308,7 +308,7 @@ public class ScriptOperators {
* Set the {@code accumulate} {@link Function} that updates the state for each document. The functions first * Set the {@code accumulate} {@link Function} that updates the state for each document. The functions first
* argument is the current {@code state}, additional arguments can be defined via {@link Function#args(Object...) * argument is the current {@code state}, additional arguments can be defined via {@link Function#args(Object...)
* accumulateArgs}. * accumulateArgs}.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(state, accumArg1, accumArg2, ...) { * function(state, accumArg1, accumArg2, ...) {
* ... * ...
@ -327,7 +327,7 @@ public class ScriptOperators {
* Set the {@code accumulate} function that updates the state for each document. The functions first argument is * Set the {@code accumulate} function that updates the state for each document. The functions first argument is
* the current {@code state}, additional arguments can be defined via * the current {@code state}, additional arguments can be defined via
* {@link AccumulatorAccumulateArgsBuilder#accumulateArgs(Object...)}. * {@link AccumulatorAccumulateArgsBuilder#accumulateArgs(Object...)}.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(state, accumArg1, accumArg2, ...) { * function(state, accumArg1, accumArg2, ...) {
* ... * ...
@ -370,7 +370,7 @@ public class ScriptOperators {
* Set the {@code merge} function used to merge two internal states. <br /> * Set the {@code merge} function used to merge two internal states. <br />
* This might be required because the operation is run on a sharded cluster or when the operator exceeds its * This might be required because the operation is run on a sharded cluster or when the operator exceeds its
* memory limit. * memory limit.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(state1, state2) { * function(state1, state2) {
* ... * ...
@ -389,7 +389,7 @@ public class ScriptOperators {
/** /**
* Set the {@code finalize} function used to update the result of the accumulation when all documents have been * Set the {@code finalize} function used to update the result of the accumulation when all documents have been
* processed. * processed.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(state) { * function(state) {
* ... * ...
@ -425,7 +425,7 @@ public class ScriptOperators {
/** /**
* Define the {@code init} function for the {@link Accumulator accumulators} initial state. The function receives * Define the {@code init} function for the {@link Accumulator accumulators} initial state. The function receives
* its arguments from the {@link #initArgs(Object...)} array expression. * its arguments from the {@link #initArgs(Object...)} array expression.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(initArg1, initArg2, ...) { * function(initArg1, initArg2, ...) {
* ... * ...
@ -461,7 +461,7 @@ public class ScriptOperators {
/** /**
* Set the {@code accumulate} function that updates the state for each document. The functions first argument is * Set the {@code accumulate} function that updates the state for each document. The functions first argument is
* the current {@code state}, additional arguments can be defined via {@link #accumulateArgs(Object...)}. * the current {@code state}, additional arguments can be defined via {@link #accumulateArgs(Object...)}.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(state, accumArg1, accumArg2, ...) { * function(state, accumArg1, accumArg2, ...) {
* ... * ...
@ -500,7 +500,7 @@ public class ScriptOperators {
* Set the {@code merge} function used to merge two internal states. <br /> * Set the {@code merge} function used to merge two internal states. <br />
* This might be required because the operation is run on a sharded cluster or when the operator exceeds its * This might be required because the operation is run on a sharded cluster or when the operator exceeds its
* memory limit. * memory limit.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(state1, state2) { * function(state1, state2) {
* ... * ...
@ -537,7 +537,7 @@ public class ScriptOperators {
/** /**
* Set the {@code finalize} function used to update the result of the accumulation when all documents have been * Set the {@code finalize} function used to update the result of the accumulation when all documents have been
* processed. * processed.
* <p /> * <br />
* <code class="java"> * <code class="java">
* function(state) { * function(state) {
* ... * ...

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/SetWindowFieldsOperation.java

@ -31,8 +31,7 @@ import org.springframework.util.Assert;
* *
* @author Christoph Strobl * @author Christoph Strobl
* @since 3.3 * @since 3.3
* @see <a href= * @see <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/setWindowFields/">https://docs.mongodb.com/manual/reference/operator/aggregation/setWindowFields/</a>
* "https://docs.mongodb.com/manual/reference/operator/aggregation/setWindowFields/">https://docs.mongodb.com/manual/reference/operator/aggregation/setWindowFields/</a>
*/ */
public class SetWindowFieldsOperation public class SetWindowFieldsOperation
implements AggregationOperation, FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation { implements AggregationOperation, FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation {

7
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/SortByCountOperation.java

@ -21,17 +21,16 @@ import org.springframework.util.Assert;
/** /**
* Encapsulates the aggregation framework {@code $sortByCount}-operation. * Encapsulates the aggregation framework {@code $sortByCount}-operation.
* <p/> * <br />
* {@code $sortByCount} stage is typically used with {@link Aggregation} and {@code $facet}. Groups incoming documents * {@code $sortByCount} stage is typically used with {@link Aggregation} and {@code $facet}. Groups incoming documents
* based on the value of a specified expression and computes the count of documents in each distinct group. * based on the value of a specified expression and computes the count of documents in each distinct group.
* {@link SortByCountOperation} is equivalent to {@code { $group: { _id: <expression>, count: { $sum: 1 } } }, { $sort: * {@link SortByCountOperation} is equivalent to {@code { $group: { _id: <expression>, count: { $sum: 1 } } }, { $sort:
* { count: -1 } }}. * { count: -1 } }}.
* <p/> * <br />
* We recommend to use the static factory method {@link Aggregation#sortByCount(String)} instead of creating instances * We recommend to use the static factory method {@link Aggregation#sortByCount(String)} instead of creating instances
* of this class directly. * of this class directly.
* *
* @see <a href= * @see <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/">https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/</a>
* "https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/">https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/</a>
* @author Jérôme Guyon * @author Jérôme Guyon
* @author Mark Paluch * @author Mark Paluch
* @since 2.1 * @since 2.1

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/UnionWithOperation.java

@ -28,7 +28,7 @@ import org.springframework.util.Assert;
* containing duplicates, into a single result set that is handed over to the next stage. <br /> * containing duplicates, into a single result set that is handed over to the next stage. <br />
* In order to remove duplicates it is possible to append a {@link GroupOperation} right after * In order to remove duplicates it is possible to append a {@link GroupOperation} right after
* {@link UnionWithOperation}. * {@link UnionWithOperation}.
* <p /> * <br />
* If the {@link UnionWithOperation} uses a * If the {@link UnionWithOperation} uses a
* <a href="https://docs.mongodb.com/master/reference/operator/aggregation/unionWith/#unionwith-pipeline">pipeline</a> * <a href="https://docs.mongodb.com/master/reference/operator/aggregation/unionWith/#unionwith-pipeline">pipeline</a>
* to process documents, field names within the pipeline will be treated as is. In order to map domain type property * to process documents, field names within the pipeline will be treated as is. In order to map domain type property

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/MappingMongoConverter.java

@ -262,7 +262,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
/** /**
* Set the {@link EntityCallbacks} instance to use when invoking * Set the {@link EntityCallbacks} instance to use when invoking
* {@link org.springframework.data.mapping.callback.EntityCallback callbacks} like the {@link AfterConvertCallback}. * {@link org.springframework.data.mapping.callback.EntityCallback callbacks} like the {@link AfterConvertCallback}.
* <p /> * <br />
* Overrides potentially existing {@link EntityCallbacks}. * Overrides potentially existing {@link EntityCallbacks}.
* *
* @param entityCallbacks must not be {@literal null}. * @param entityCallbacks must not be {@literal null}.

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/QueryMapper.java

@ -765,7 +765,7 @@ public class QueryMapper {
/** /**
* Returns whether the given {@link String} is a MongoDB keyword. The default implementation will check against the * Returns whether the given {@link String} is a MongoDB keyword. The default implementation will check against the
* set of registered keywords returned by {@link #getKeywords()}. * set of registered keywords.
* *
* @param candidate * @param candidate
* @return * @return

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/geo/GeoJsonModule.java

@ -35,7 +35,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
/** /**
* A Jackson {@link Module} to register custom {@link JsonDeserializer}s for GeoJSON types. * A Jackson {@link Module} to register custom {@link JsonDeserializer}s for GeoJSON types.
* <p /> * <br />
* Use {@link #geoJsonModule()} to obtain a {@link Module} containing both {@link JsonSerializer serializers} and * Use {@link #geoJsonModule()} to obtain a {@link Module} containing both {@link JsonSerializer serializers} and
* {@link JsonDeserializer deserializers}. * {@link JsonDeserializer deserializers}.
* *

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/CompoundIndex.java

@ -24,7 +24,7 @@ import java.lang.annotation.Target;
/** /**
* Mark a class to use compound indexes. * Mark a class to use compound indexes.
* <p /> * <br />
* <p> * <p>
* <b>NOTE: This annotation is repeatable according to Java 8 conventions using {@link CompoundIndexes#value()} as * <b>NOTE: This annotation is repeatable according to Java 8 conventions using {@link CompoundIndexes#value()} as
* container.</b> * container.</b>

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/DurationStyle.java

@ -27,7 +27,7 @@ import org.springframework.util.StringUtils;
/** /**
* Duration format styles. * Duration format styles.
* <p/> * <br />
* Fork of {@code org.springframework.boot.convert.DurationStyle}. * Fork of {@code org.springframework.boot.convert.DurationStyle}.
* *
* @author Phillip Webb * @author Phillip Webb

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/HashIndexed.java

@ -25,7 +25,7 @@ import java.lang.annotation.Target;
* <a href="https://docs.mongodb.com/manual/core/index-hashed/">Hashed Index</a>. If used on a simple property, the * <a href="https://docs.mongodb.com/manual/core/index-hashed/">Hashed Index</a>. If used on a simple property, the
* index uses a hashing function to compute the hash of the value of the index field. Added to a property of complex * index uses a hashing function to compute the hash of the value of the index field. Added to a property of complex
* type the embedded document is collapsed and the hash computed for the entire object. * type the embedded document is collapsed and the hash computed for the entire object.
* <p /> * <br />
* *
* <pre class="code"> * <pre class="code">
* &#64;Document * &#64;Document

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/WildcardIndex.java

@ -31,11 +31,11 @@ import org.springframework.util.StringUtils;
* {@link org.springframework.data.mongodb.core.mapping.Document} annotation). On those it is possible to use * {@link org.springframework.data.mongodb.core.mapping.Document} annotation). On those it is possible to use
* {@link #wildcardProjectionInclude(String...)} and {@link #wildcardProjectionExclude(String...)} to define specific * {@link #wildcardProjectionInclude(String...)} and {@link #wildcardProjectionExclude(String...)} to define specific
* paths for in-/exclusion. * paths for in-/exclusion.
* <p /> * <br />
* It can also be used to define an index on a specific field path and its subfields, e.g. * It can also be used to define an index on a specific field path and its subfields, e.g.
* {@code "path.to.field.$**" : 1}. <br /> * {@code "path.to.field.$**" : 1}. <br />
* Note that {@literal wildcardProjections} are not allowed in this case. * Note that {@literal wildcardProjections} are not allowed in this case.
* <p /> * <br />
* <strong>LIMITATIONS</strong><br /> * <strong>LIMITATIONS</strong><br />
* <ul> * <ul>
* <li>{@link #unique() Unique} and {@link #expire(long) ttl} options are not supported.</li> * <li>{@link #unique() Unique} and {@link #expire(long) ttl} options are not supported.</li>

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Encrypted.java

@ -88,7 +88,7 @@ public @interface Encrypted {
/** /**
* Get the {@code keyId} to use. The value must resolve to either the UUID representation of the key or a base64 * Get the {@code keyId} to use. The value must resolve to either the UUID representation of the key or a base64
* encoded value representing the UUID value. * encoded value representing the UUID value.
* <p /> * <br />
* On {@link ElementType#TYPE} level the {@link #keyId()} can be left empty if explicitly set for fields. <br /> * On {@link ElementType#TYPE} level the {@link #keyId()} can be left empty if explicitly set for fields. <br />
* On {@link ElementType#FIELD} level the {@link #keyId()} can be left empty if inherited from * On {@link ElementType#FIELD} level the {@link #keyId()} can be left empty if inherited from
* {@literal encryptMetadata}. * {@literal encryptMetadata}.
@ -100,7 +100,7 @@ public @interface Encrypted {
/** /**
* Set the algorithm to use. * Set the algorithm to use.
* <p /> * <br />
* On {@link ElementType#TYPE} level the {@link #algorithm()} can be left empty if explicitly set for fields. <br /> * On {@link ElementType#TYPE} level the {@link #algorithm()} can be left empty if explicitly set for fields. <br />
* On {@link ElementType#FIELD} level the {@link #algorithm()} can be left empty if inherited from * On {@link ElementType#FIELD} level the {@link #algorithm()} can be left empty if inherited from
* {@literal encryptMetadata}. * {@literal encryptMetadata}.

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Field.java

@ -71,7 +71,7 @@ public @interface Field {
* Write rules when to include a property value upon conversion. If set to {@link Write#NON_NULL} (default) * Write rules when to include a property value upon conversion. If set to {@link Write#NON_NULL} (default)
* {@literal null} values are not written to the target {@code Document}. Setting the value to {@link Write#ALWAYS} * {@literal null} values are not written to the target {@code Document}. Setting the value to {@link Write#ALWAYS}
* explicitly adds an entry for the given field holding {@literal null} as a value {@code 'fieldName' : null }. * explicitly adds an entry for the given field holding {@literal null} as a value {@code 'fieldName' : null }.
* <p /> * <br />
* <strong>NOTE</strong>Setting the value to {@link Write#ALWAYS} may lead to increased document size. * <strong>NOTE</strong>Setting the value to {@link Write#ALWAYS} may lead to increased document size.
* *
* @return {@link Write#NON_NULL} by default. * @return {@link Write#NON_NULL} by default.

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/FieldType.java

@ -28,7 +28,7 @@ import org.bson.types.ObjectId;
* Enumeration of field value types that can be used to represent a {@link org.bson.Document} field value. This * Enumeration of field value types that can be used to represent a {@link org.bson.Document} field value. This
* enumeration contains a subset of {@link org.bson.BsonType} that is supported by the mapping and conversion * enumeration contains a subset of {@link org.bson.BsonType} that is supported by the mapping and conversion
* components. * components.
* <p/> * <br />
* Bson types are identified by a {@code byte} {@link #getBsonType() value}. This enumeration typically returns the * Bson types are identified by a {@code byte} {@link #getBsonType() value}. This enumeration typically returns the
* according bson type value except for {@link #IMPLICIT} which is a marker to derive the field type from a property. * according bson type value except for {@link #IMPLICIT} which is a marker to derive the field type from a property.
* *

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/ShardKey.java

@ -27,7 +27,7 @@ import org.springframework.util.ObjectUtils;
/** /**
* Value object representing an entities <a href="https://docs.mongodb.com/manual/core/sharding-shard-key/">Shard * Value object representing an entities <a href="https://docs.mongodb.com/manual/core/sharding-shard-key/">Shard
* Key</a> used to distribute documents across a sharded MongoDB cluster. * Key</a> used to distribute documents across a sharded MongoDB cluster.
* <p /> * <br />
* {@link ShardKey#isImmutable() Immutable} shard keys indicates a fixed value that is not updated (see * {@link ShardKey#isImmutable() Immutable} shard keys indicates a fixed value that is not updated (see
* <a href="https://docs.mongodb.com/manual/core/sharding-shard-key/#change-a-document-s-shard-key-value">MongoDB * <a href="https://docs.mongodb.com/manual/core/sharding-shard-key/#change-a-document-s-shard-key-value">MongoDB
* Reference: Change a Document's Shard Key Value</a>), which allows to skip server round trips in cases where a * Reference: Change a Document's Shard Key Value</a>), which allows to skip server round trips in cases where a

6
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Sharded.java

@ -29,14 +29,14 @@ import org.springframework.data.annotation.Persistent;
* {@link #shardKey()} is used to distribute documents across shards. <br /> * {@link #shardKey()} is used to distribute documents across shards. <br />
* Please see the <a href="https://docs.mongodb.com/manual/sharding/">MongoDB Documentation</a> for more information * Please see the <a href="https://docs.mongodb.com/manual/sharding/">MongoDB Documentation</a> for more information
* about requirements and limitations of sharding. * about requirements and limitations of sharding.
* <p/> * <br />
* Spring Data adds the shard key to filter queries used for * Spring Data adds the shard key to filter queries used for
* {@link com.mongodb.client.MongoCollection#replaceOne(org.bson.conversions.Bson, Object)} operations triggered by * {@link com.mongodb.client.MongoCollection#replaceOne(org.bson.conversions.Bson, Object)} operations triggered by
* {@code save} operations on {@link org.springframework.data.mongodb.core.MongoOperations} and * {@code save} operations on {@link org.springframework.data.mongodb.core.MongoOperations} and
* {@link org.springframework.data.mongodb.core.ReactiveMongoOperations} as well as {@code update/upsert} operations * {@link org.springframework.data.mongodb.core.ReactiveMongoOperations} as well as {@code update/upsert} operations
* replacing/upserting a single existing document as long as the given * replacing/upserting a single existing document as long as the given
* {@link org.springframework.data.mongodb.core.query.UpdateDefinition} holds a full copy of the entity. * {@link org.springframework.data.mongodb.core.query.UpdateDefinition} holds a full copy of the entity.
* <p/> * <br />
* All other operations that require the presence of the {@literal shard key} in the filter query need to provide the * All other operations that require the presence of the {@literal shard key} in the filter query need to provide the
* information via the {@link org.springframework.data.mongodb.core.query.Query} parameter when invoking the method. * information via the {@link org.springframework.data.mongodb.core.query.Query} parameter when invoking the method.
* *
@ -62,7 +62,7 @@ public @interface Sharded {
/** /**
* The shard key determines the distribution of the collection's documents among the cluster's shards. The shard key * The shard key determines the distribution of the collection's documents among the cluster's shards. The shard key
* is either a single or multiple indexed properties that exist in every document in the collection. * is either a single or multiple indexed properties that exist in every document in the collection.
* <p/> * <br />
* By default the {@literal id} property is used for sharding. <br /> * By default the {@literal id} property is used for sharding. <br />
* <strong>NOTE</strong> Required indexes are not created automatically. Create these either externally, via * <strong>NOTE</strong> Required indexes are not created automatically. Create these either externally, via
* {@link org.springframework.data.mongodb.core.index.IndexOperations#ensureIndex(org.springframework.data.mongodb.core.index.IndexDefinition)} * {@link org.springframework.data.mongodb.core.index.IndexOperations#ensureIndex(org.springframework.data.mongodb.core.index.IndexDefinition)}

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/TimeSeries.java

@ -29,8 +29,7 @@ import org.springframework.data.mongodb.core.timeseries.Granularity;
* *
* @author Christoph Strobl * @author Christoph Strobl
* @since 3.3 * @since 3.3
* @see <a href= * @see <a href="https://docs.mongodb.com/manual/core/timeseries-collections">https://docs.mongodb.com/manual/core/timeseries-collections</a>
* "https://docs.mongodb.com/manual/core/timeseries-collections">https://docs.mongodb.com/manual/core/timeseries-collections</a>
*/ */
@Inherited @Inherited
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Unwrapped.java

@ -27,7 +27,7 @@ import org.springframework.core.annotation.AliasFor;
/** /**
* The annotation to configure a value object as flattened out in the target document. * The annotation to configure a value object as flattened out in the target document.
* <p /> * <br />
* Depending on the {@link OnEmpty value} of {@link #onEmpty()} the property is set to {@literal null} or an empty * Depending on the {@link OnEmpty value} of {@link #onEmpty()} the property is set to {@literal null} or an empty
* instance in the case all unwrapped values are {@literal null} when reading from the result set. * instance in the case all unwrapped values are {@literal null} when reading from the result set.
* *
@ -41,7 +41,7 @@ public @interface Unwrapped {
/** /**
* Set the load strategy for the unwrapped object if all contained fields yield {@literal null} values. * Set the load strategy for the unwrapped object if all contained fields yield {@literal null} values.
* <p /> * <br />
* {@link Nullable @Unwrapped.Nullable} and {@link Empty @Unwrapped.Empty} offer shortcuts for this. * {@link Nullable @Unwrapped.Nullable} and {@link Empty @Unwrapped.Empty} offer shortcuts for this.
* *
* @return never {@link} null. * @return never {@link} null.

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/event/AfterDeleteEvent.java

@ -20,7 +20,7 @@ import org.springframework.lang.Nullable;
/** /**
* Event being thrown after a single or a set of documents has/have been deleted. The {@link Document} held in the event * Event being thrown after a single or a set of documents has/have been deleted. The {@link Document} held in the event
* will be the query document <em>after</am> it has been mapped onto the domain type handled. * will be the query document <em>after</em> it has been mapped onto the domain type handled.
* *
* @author Martin Baumgartner * @author Martin Baumgartner
* @author Christoph Strobl * @author Christoph Strobl

14
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/ChangeStreamRequest.java

@ -35,13 +35,13 @@ import com.mongodb.client.model.changestream.FullDocument;
* {@link SubscriptionRequest} implementation to be used for listening to * {@link SubscriptionRequest} implementation to be used for listening to
* <a href="https://docs.mongodb.com/manual/changeStreams/">Change Streams</a> via a {@link MessageListenerContainer} * <a href="https://docs.mongodb.com/manual/changeStreams/">Change Streams</a> via a {@link MessageListenerContainer}
* using the synchronous MongoDB Java driver. * using the synchronous MongoDB Java driver.
* <p/> * <br />
* The most trivial use case is subscribing to all events of a specific {@link com.mongodb.client.MongoCollection * The most trivial use case is subscribing to all events of a specific {@link com.mongodb.client.MongoCollection
* collection} * collection}
* *
* <pre> * <pre>
* <code> * <code>
* ChangeStreamRequest<Document> request = new ChangeStreamRequest<>(System.out::println, () -> "collection-name"); * ChangeStreamRequest&lt;Document&gt; request = new ChangeStreamRequest&lt;&gt;(System.out::println, () -> "collection-name");
* </code> * </code>
* </pre> * </pre>
* *
@ -50,7 +50,7 @@ import com.mongodb.client.model.changestream.FullDocument;
* *
* <pre> * <pre>
* <code> * <code>
* ChangeStreamRequest<Document> request = new ChangeStreamRequest<>(System.out::println, RequestOptions.justDatabase("test")); * ChangeStreamRequest&lt;Document&gt; request = new ChangeStreamRequest&lt;&gt;(System.out::println, RequestOptions.justDatabase("test"));
* </code> * </code>
* </pre> * </pre>
* *
@ -63,7 +63,7 @@ import com.mongodb.client.model.changestream.FullDocument;
* .returnFullDocumentOnUpdate() * .returnFullDocumentOnUpdate()
* .build(); * .build();
* *
* ChangeStreamRequest<Document> request = new ChangeStreamRequest<>(System.out::println, new ChangeStreamRequestOptions("collection-name", options)); * ChangeStreamRequest&lt;Document&gt; request = new ChangeStreamRequest&lt;&gt;(System.out::println, new ChangeStreamRequestOptions("collection-name", options));
* </code> * </code>
* </pre> * </pre>
* *
@ -72,7 +72,7 @@ import com.mongodb.client.model.changestream.FullDocument;
* *
* <pre> * <pre>
* <code> * <code>
* ChangeStreamRequest<Document> request = ChangeStreamRequest.builder() * ChangeStreamRequest&lt;Document&gt; request = ChangeStreamRequest.builder()
* .collection("collection-name") * .collection("collection-name")
* .publishTo(System.out::println) * .publishTo(System.out::println)
* .filter(newAggregation(match(where("age").is(7)))) * .filter(newAggregation(match(where("age").is(7))))
@ -310,13 +310,13 @@ public class ChangeStreamRequest<T>
/** /**
* Set the filter to apply. * Set the filter to apply.
* <p/> * <br />
* Fields on aggregation expression root level are prefixed to map to fields contained in * Fields on aggregation expression root level are prefixed to map to fields contained in
* {@link ChangeStreamDocument#getFullDocument() fullDocument}. However {@literal operationType}, {@literal ns}, * {@link ChangeStreamDocument#getFullDocument() fullDocument}. However {@literal operationType}, {@literal ns},
* {@literal documentKey} and {@literal fullDocument} are reserved words that will be omitted, and therefore taken * {@literal documentKey} and {@literal fullDocument} are reserved words that will be omitted, and therefore taken
* as given, during the mapping procedure. You may want to have a look at the * as given, during the mapping procedure. You may want to have a look at the
* <a href="https://docs.mongodb.com/manual/reference/change-events/">structure of Change Events</a>. * <a href="https://docs.mongodb.com/manual/reference/change-events/">structure of Change Events</a>.
* <p/> * <br />
* Use {@link org.springframework.data.mongodb.core.aggregation.TypedAggregation} to ensure filter expressions are * Use {@link org.springframework.data.mongodb.core.aggregation.TypedAggregation} to ensure filter expressions are
* mapped to domain type fields. * mapped to domain type fields.
* *

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/DefaultMessageListenerContainer.java

@ -36,7 +36,7 @@ import org.springframework.util.ObjectUtils;
* Simple {@link Executor} based {@link MessageListenerContainer} implementation for running {@link Task tasks} like * Simple {@link Executor} based {@link MessageListenerContainer} implementation for running {@link Task tasks} like
* listening to MongoDB <a href="https://docs.mongodb.com/manual/changeStreams/">Change Streams</a> and tailable * listening to MongoDB <a href="https://docs.mongodb.com/manual/changeStreams/">Change Streams</a> and tailable
* cursors. * cursors.
* <p /> * <br />
* This message container creates long-running tasks that are executed on {@link Executor}. * This message container creates long-running tasks that are executed on {@link Executor}.
* *
* @author Christoph Strobl * @author Christoph Strobl

24
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/MessageListenerContainer.java

@ -50,8 +50,8 @@ public interface MessageListenerContainer extends SmartLifecycle {
* <code> * <code>
* MessageListenerContainer container = ... * MessageListenerContainer container = ...
* *
* MessageListener<ChangeStreamDocument<Document>, Object> messageListener = (message) -> message.... * MessageListener&lt;ChangeStreamDocument&lt;Document&gt;, Object&gt; messageListener = (message) -&gt; message....
* ChangeStreamRequest<Object> request = new ChangeStreamRequest<>(messageListener, () -> "collection-name"); * ChangeStreamRequest&lt;Object&gt; request = new ChangeStreamRequest&lt;&gt;(messageListener, () -&gt; "collection-name");
* *
* Subscription subscription = container.register(request); * Subscription subscription = container.register(request);
* </code> * </code>
@ -75,8 +75,8 @@ public interface MessageListenerContainer extends SmartLifecycle {
* <code> * <code>
* MessageListenerContainer container = ... * MessageListenerContainer container = ...
* *
* MessageListener<ChangeStreamDocument<Document>, Document> messageListener = (message) -> message.getBody().toJson(); * MessageListener&lt;ChangeStreamDocument&lt;Document&gt;, Document&gt; messageListener = (message) -&gt; message.getBody().toJson();
* ChangeStreamRequest<Document> request = new ChangeStreamRequest<>(messageListener, () -> "collection-name"); * ChangeStreamRequest&lt;Document&gt; request = new ChangeStreamRequest&lt;&gt;(messageListener, () -&gt; "collection-name");
* *
* Subscription subscription = container.register(request, Document.class); * Subscription subscription = container.register(request, Document.class);
* </code> * </code>
@ -84,13 +84,13 @@ public interface MessageListenerContainer extends SmartLifecycle {
* *
* On {@link MessageListenerContainer#stop()} all {@link Subscription subscriptions} are cancelled prior to shutting * On {@link MessageListenerContainer#stop()} all {@link Subscription subscriptions} are cancelled prior to shutting
* down the container itself. * down the container itself.
* <p /> * <br />
* Registering the very same {@link SubscriptionRequest} more than once simply returns the already existing * Registering the very same {@link SubscriptionRequest} more than once simply returns the already existing
* {@link Subscription}. * {@link Subscription}.
* <p /> * <br />
* Unless a {@link Subscription} is {@link #remove(Subscription) removed} form the container, the {@link Subscription} * Unless a {@link Subscription} is {@link #remove(Subscription) removed} form the container, the {@link Subscription}
* is restarted once the container itself is restarted. * is restarted once the container itself is restarted.
* <p /> * <br />
* Errors during {@link Message} retrieval lead to {@link Subscription#cancel() cannelation} of the underlying task. * Errors during {@link Message} retrieval lead to {@link Subscription#cancel() cannelation} of the underlying task.
* *
* @param request must not be {@literal null}. * @param request must not be {@literal null}.
@ -108,8 +108,8 @@ public interface MessageListenerContainer extends SmartLifecycle {
* <code> * <code>
* MessageListenerContainer container = ... * MessageListenerContainer container = ...
* *
* MessageListener<ChangeStreamDocument<Document>, Document> messageListener = (message) -> message.getBody().toJson(); * MessageListener&lt;ChangeStreamDocument&lt;Document&gt;, Document&gt; messageListener = (message) -&gt; message.getBody().toJson();
* ChangeStreamRequest<Document> request = new ChangeStreamRequest<>(messageListener, () -> "collection-name"); * ChangeStreamRequest&lt;Document&gt; request = new ChangeStreamRequest&lt;&gt;(messageListener, () -&gt; "collection-name");
* *
* Subscription subscription = container.register(request, Document.class); * Subscription subscription = container.register(request, Document.class);
* </code> * </code>
@ -117,13 +117,13 @@ public interface MessageListenerContainer extends SmartLifecycle {
* *
* On {@link MessageListenerContainer#stop()} all {@link Subscription subscriptions} are cancelled prior to shutting * On {@link MessageListenerContainer#stop()} all {@link Subscription subscriptions} are cancelled prior to shutting
* down the container itself. * down the container itself.
* <p /> * <br />
* Registering the very same {@link SubscriptionRequest} more than once simply returns the already existing * Registering the very same {@link SubscriptionRequest} more than once simply returns the already existing
* {@link Subscription}. * {@link Subscription}.
* <p /> * <br />
* Unless a {@link Subscription} is {@link #remove(Subscription) removed} form the container, the {@link Subscription} * Unless a {@link Subscription} is {@link #remove(Subscription) removed} form the container, the {@link Subscription}
* is restarted once the container itself is restarted. * is restarted once the container itself is restarted.
* <p /> * <br />
* Errors during {@link Message} retrieval are delegated to the given {@link ErrorHandler}. * Errors during {@link Message} retrieval are delegated to the given {@link ErrorHandler}.
* *
* @param request must not be {@literal null}. * @param request must not be {@literal null}.

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/Subscription.java

@ -19,10 +19,10 @@ import java.time.Duration;
/** /**
* The {@link Subscription} is the link between the {@link SubscriptionRequest} and the actual running {@link Task}. * The {@link Subscription} is the link between the {@link SubscriptionRequest} and the actual running {@link Task}.
* <p /> * <br />
* Due to the asynchronous nature of the {@link Task} execution a {@link Subscription} might not immediately become * Due to the asynchronous nature of the {@link Task} execution a {@link Subscription} might not immediately become
* active. {@link #isActive()} provides an answer if the underlying {@link Task} is already running. * active. {@link #isActive()} provides an answer if the underlying {@link Task} is already running.
* <p /> * <br />
* *
* @author Christoph Strobl * @author Christoph Strobl
* @author Mark Paluch * @author Mark Paluch

6
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/messaging/TailableCursorRequest.java

@ -28,13 +28,13 @@ import org.springframework.util.Assert;
* {@link SubscriptionRequest} implementation to be used to listen to query results in a * {@link SubscriptionRequest} implementation to be used to listen to query results in a
* <a href="https://docs.mongodb.com/manual/core/capped-collections/">Capped Collection</a> using a * <a href="https://docs.mongodb.com/manual/core/capped-collections/">Capped Collection</a> using a
* <a href="https://docs.mongodb.com/manual/core/tailable-cursors/">Tailable Cursor</a>. * <a href="https://docs.mongodb.com/manual/core/tailable-cursors/">Tailable Cursor</a>.
* <p /> * <br />
* The most trivial use case is subscribing to all events of a specific {@link com.mongodb.client.MongoCollection * The most trivial use case is subscribing to all events of a specific {@link com.mongodb.client.MongoCollection
* collection}. * collection}.
* *
* <pre> * <pre>
* <code> * <code>
* TailableCursorRequest<Document> request = new TailableCursorRequest<>(System.out::println, () -> "collection-name"); * TailableCursorRequest&lt;Document&gt; request = new TailableCursorRequest&lt;&gt;(System.out::println, () -> "collection-name");
* </code> * </code>
* </pre> * </pre>
* *
@ -43,7 +43,7 @@ import org.springframework.util.Assert;
* *
* <pre> * <pre>
* <code> * <code>
* TailableCursorRequest<Document> request = TailableCursorRequest.builder() * TailableCursorRequest&lt;Document&gt; request = TailableCursorRequest.builder()
* .collection("collection-name") * .collection("collection-name")
* .publishTo(System.out::println) * .publishTo(System.out::println)
* .build(); * .build();

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Collation.java

@ -33,7 +33,7 @@ import com.mongodb.client.model.CollationStrength;
* Central abstraction for MongoDB collation support. <br /> * Central abstraction for MongoDB collation support. <br />
* Allows fluent creation of a collation {@link Document} that can be used for creating collections & indexes as well as * Allows fluent creation of a collation {@link Document} that can be used for creating collections & indexes as well as
* querying data. * querying data.
* <p/> * <br />
* <strong>NOTE:</strong> Please keep in mind that queries will only make use of an index with collation settings if the * <strong>NOTE:</strong> Please keep in mind that queries will only make use of an index with collation settings if the
* query itself specifies the same collation. * query itself specifies the same collation.
* *

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Criteria.java

@ -180,7 +180,7 @@ public class Criteria implements CriteriaDefinition {
/** /**
* Creates a criterion using {@literal null} equality comparison which matches documents that either contain the item * Creates a criterion using {@literal null} equality comparison which matches documents that either contain the item
* field whose value is {@literal null} or that do not contain the item field. * field whose value is {@literal null} or that do not contain the item field.
* <p /> * <br />
* Use {@link #isNullValue()} to only query for documents that contain the field whose value is equal to * Use {@link #isNullValue()} to only query for documents that contain the field whose value is equal to
* {@link org.bson.BsonType#NULL}. <br /> * {@link org.bson.BsonType#NULL}. <br />
* Use {@link #exists(boolean)} to query for documents that do (not) contain the field. * Use {@link #exists(boolean)} to query for documents that do (not) contain the field.
@ -197,7 +197,7 @@ public class Criteria implements CriteriaDefinition {
/** /**
* Creates a criterion using a {@link org.bson.BsonType} comparison which matches only documents that contain the item * Creates a criterion using a {@link org.bson.BsonType} comparison which matches only documents that contain the item
* field whose value is equal to {@link org.bson.BsonType#NULL}. * field whose value is equal to {@link org.bson.BsonType#NULL}.
* <p /> * <br />
* Use {@link #isNull()} to query for documents that contain the field with a {@literal null} value or do not contain the * Use {@link #isNull()} to query for documents that contain the field with a {@literal null} value or do not contain the
* field at all. <br /> * field at all. <br />
* Use {@link #exists(boolean)} to query for documents that do (not) contain the field. * Use {@link #exists(boolean)} to query for documents that do (not) contain the field.

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/NearQuery.java

@ -40,7 +40,7 @@ import org.springframework.util.ObjectUtils;
* actual type within the document is of no concern at this point.<br /> * actual type within the document is of no concern at this point.<br />
* To avoid a serious headache make sure to set the {@link Metric} to the desired unit of measure which ensures the * To avoid a serious headache make sure to set the {@link Metric} to the desired unit of measure which ensures the
* distance to be calculated correctly.<br /> * distance to be calculated correctly.<br />
* <p /> * <br />
* In other words: <br /> * In other words: <br />
* Assume you've got 5 Documents like the ones below <br /> * Assume you've got 5 Documents like the ones below <br />
* *

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/schema/JsonSchemaObject.java

@ -46,7 +46,7 @@ import org.springframework.util.ObjectUtils;
/** /**
* Interface that can be implemented by objects that know how to serialize themselves to JSON schema using * Interface that can be implemented by objects that know how to serialize themselves to JSON schema using
* {@link #toDocument()}. * {@link #toDocument()}.
* <p/> * <br />
* This class also declares factory methods for type-specific {@link JsonSchemaObject schema objects} such as * This class also declares factory methods for type-specific {@link JsonSchemaObject schema objects} such as
* {@link #string()} or {@link #object()}. For example: * {@link #string()} or {@link #object()}. For example:
* *

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/script/NamedMongoScript.java

@ -20,7 +20,7 @@ import org.springframework.util.Assert;
/** /**
* An {@link ExecutableMongoScript} assigned to a name that allows calling the function by its {@literal name} once it * An {@link ExecutableMongoScript} assigned to a name that allows calling the function by its {@literal name} once it
* has been saved to the {@link com.mongodb.DB} instance. * has been saved to the {@link com.mongodb.client.MongoDatabase} instance.
* *
* @author Christoph Strobl * @author Christoph Strobl
* @author Oliver Gierke * @author Oliver Gierke
@ -34,7 +34,7 @@ public class NamedMongoScript {
private final ExecutableMongoScript script; private final ExecutableMongoScript script;
/** /**
* Creates new {@link NamedMongoScript} that can be saved to the {@link com.mongodb.DB} instance. * Creates new {@link NamedMongoScript} that can be saved to the {@link com.mongodb.client.MongoDatabase} instance.
* *
* @param name must not be {@literal null} or empty. * @param name must not be {@literal null} or empty.
* @param rawScript the {@link String} representation of the {@literal JavaScript} function. Must not be * @param rawScript the {@link String} representation of the {@literal JavaScript} function. Must not be

26
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Aggregation.java

@ -27,11 +27,11 @@ import org.springframework.data.annotation.QueryAnnotation;
/** /**
* The {@link Aggregation} annotation can be used to annotate a {@link org.springframework.data.repository.Repository} * The {@link Aggregation} annotation can be used to annotate a {@link org.springframework.data.repository.Repository}
* query method so that it runs the {@link Aggregation#pipeline()} on invocation. * query method so that it runs the {@link Aggregation#pipeline()} on invocation.
* <p /> * <br />
* Pipeline stages are mapped against the {@link org.springframework.data.repository.Repository} domain type to consider * Pipeline stages are mapped against the {@link org.springframework.data.repository.Repository} domain type to consider
* {@link org.springframework.data.mongodb.core.mapping.Field field} mappings and may contain simple placeholders * {@link org.springframework.data.mongodb.core.mapping.Field field} mappings and may contain simple placeholders
* {@code ?0} as well as {@link org.springframework.expression.spel.standard.SpelExpression SpelExpressions}. * {@code ?0} as well as {@link org.springframework.expression.spel.standard.SpelExpression SpelExpressions}.
* <p /> * <br />
* Query method {@link org.springframework.data.domain.Sort} and {@link org.springframework.data.domain.Pageable} * Query method {@link org.springframework.data.domain.Sort} and {@link org.springframework.data.domain.Pageable}
* arguments are applied at the end of the pipeline or can be defined manually as part of it. * arguments are applied at the end of the pipeline or can be defined manually as part of it.
* *
@ -60,23 +60,23 @@ public @interface Aggregation {
* *
* // aggregation resulting in collection with single value * // aggregation resulting in collection with single value
* &#64;Aggregation("{ '$project': { '_id' : '$lastname' } }") * &#64;Aggregation("{ '$project': { '_id' : '$lastname' } }")
* List<String> findAllLastnames(); * List&lt;String&gt; findAllLastnames();
* *
* // aggregation with parameter replacement * // aggregation with parameter replacement
* &#64;Aggregation("{ '$group': { '_id' : '$lastname', names : { $addToSet : '$?0' } } }") * &#64;Aggregation("{ '$group': { '_id' : '$lastname', names : { $addToSet : '$?0' } } }")
* List<PersonAggregate> groupByLastnameAnd(String property); * List&lt;PersonAggregate&gt; groupByLastnameAnd(String property);
* *
* // aggregation with sort in pipeline * // aggregation with sort in pipeline
* &#64;Aggregation(pipeline = {"{ '$group': { '_id' : '$lastname', names : { $addToSet : '$?0' } } }", "{ '$sort' : { 'lastname' : -1 } }"}) * &#64;Aggregation(pipeline = {"{ '$group': { '_id' : '$lastname', names : { $addToSet : '$?0' } } }", "{ '$sort' : { 'lastname' : -1 } }"})
* List<PersonAggregate> groupByLastnameAnd(String property); * List&lt;PersonAggregate&gt; groupByLastnameAnd(String property);
* *
* // Sort parameter is used for sorting results * // Sort parameter is used for sorting results
* &#64;Aggregation("{ '$group': { '_id' : '$lastname', names : { $addToSet : '$?0' } } }") * &#64;Aggregation("{ '$group': { '_id' : '$lastname', names : { $addToSet : '$?0' } } }")
* List<PersonAggregate> groupByLastnameAnd(String property, Sort sort); * List&lt;PersonAggregate&gt; groupByLastnameAnd(String property, Sort sort);
* *
* // Pageable parameter used for sort, skip and limit * // Pageable parameter used for sort, skip and limit
* &#64;Aggregation("{ '$group': { '_id' : '$lastname', names : { $addToSet : '$?0' } } }") * &#64;Aggregation("{ '$group': { '_id' : '$lastname', names : { $addToSet : '$?0' } } }")
* List<PersonAggregate> groupByLastnameAnd(String property, Pageable page); * List&lt;PersonAggregate&gt; groupByLastnameAnd(String property, Pageable page);
* *
* // Single value result aggregation. * // Single value result aggregation.
* &#64;Aggregation("{ '$group' : { '_id' : null, 'total' : { $sum: '$age' } } }") * &#64;Aggregation("{ '$group' : { '_id' : null, 'total' : { $sum: '$age' } } }")
@ -88,7 +88,7 @@ public @interface Aggregation {
* *
* // Raw aggregation result * // Raw aggregation result
* &#64;Aggregation("{ '$group' : { '_id' : null, 'total' : { $sum: '$age' } } }) * &#64;Aggregation("{ '$group' : { '_id' : null, 'total' : { $sum: '$age' } } })
* AggregationResults&lt;org.bson.Document>&gt; sumAgeAndReturnAggregationResultWrapper(); * AggregationResults&lt;org.bson.Document&gt;&gt; sumAgeAndReturnAggregationResultWrapper();
* </pre> * </pre>
* *
* @return an empty array by default. * @return an empty array by default.
@ -102,23 +102,23 @@ public @interface Aggregation {
* <pre class="code"> * <pre class="code">
* // Fixed value * // Fixed value
* &#64;Aggregation(pipeline = "...", collation = "en_US") * &#64;Aggregation(pipeline = "...", collation = "en_US")
* List<Entry> findAllByFixedCollation(); * List&lt;Entry&gt; findAllByFixedCollation();
* *
* // Fixed value as Document * // Fixed value as Document
* &#64;Aggregation(pipeline = "...", collation = "{ 'locale' : 'en_US' }") * &#64;Aggregation(pipeline = "...", collation = "{ 'locale' : 'en_US' }")
* List<Entry> findAllByFixedJsonCollation(); * List&lt;Entry&gt; findAllByFixedJsonCollation();
* *
* // Dynamic value as String * // Dynamic value as String
* &#64;Aggregation(pipeline = "...", collation = "?0") * &#64;Aggregation(pipeline = "...", collation = "?0")
* List<Entry> findAllByDynamicCollation(String collation); * List&lt;Entry&gt; findAllByDynamicCollation(String collation);
* *
* // Dynamic value as Document * // Dynamic value as Document
* &#64;Aggregation(pipeline = "...", collation = "{ 'locale' : ?0 }") * &#64;Aggregation(pipeline = "...", collation = "{ 'locale' : ?0 }")
* List<Entry> findAllByDynamicJsonCollation(String collation); * List&lt;Entry&gt; findAllByDynamicJsonCollation(String collation);
* *
* // SpEL expression * // SpEL expression
* &#64;Aggregation(pipeline = "...", collation = "?#{[0]}") * &#64;Aggregation(pipeline = "...", collation = "?#{[0]}")
* List<Entry> findAllByDynamicSpElCollation(String collation); * List&lt;Entry&gt; findAllByDynamicSpElCollation(String collation);
* </pre> * </pre>
* *
* @return an empty {@link String} by default. * @return an empty {@link String} by default.

12
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Query.java

@ -87,7 +87,7 @@ public @interface Query {
* <code> * <code>
* *
* &#64;Query(sort = "{ age : -1 }") // order by age descending * &#64;Query(sort = "{ age : -1 }") // order by age descending
* List<Person> findByFirstname(String firstname); * List&lt;Person&gt; findByFirstname(String firstname);
* </code> * </code>
* </pre> * </pre>
* *
@ -102,23 +102,23 @@ public @interface Query {
* <pre class="code"> * <pre class="code">
* // Fixed value * // Fixed value
* &#64;Query(collation = "en_US") * &#64;Query(collation = "en_US")
* List<Entry> findAllByFixedCollation(); * List&lt;Entry&gt; findAllByFixedCollation();
* *
* // Fixed value as Document * // Fixed value as Document
* &#64;Query(collation = "{ 'locale' : 'en_US' }") * &#64;Query(collation = "{ 'locale' : 'en_US' }")
* List<Entry> findAllByFixedJsonCollation(); * List&lt;Entry&gt; findAllByFixedJsonCollation();
* *
* // Dynamic value as String * // Dynamic value as String
* &#64;Query(collation = "?0") * &#64;Query(collation = "?0")
* List<Entry> findAllByDynamicCollation(String collation); * List&lt;Entry&gt; findAllByDynamicCollation(String collation);
* *
* // Dynamic value as Document * // Dynamic value as Document
* &#64;Query(collation = "{ 'locale' : ?0 }") * &#64;Query(collation = "{ 'locale' : ?0 }")
* List<Entry> findAllByDynamicJsonCollation(String collation); * List&lt;Entry&gt; findAllByDynamicJsonCollation(String collation);
* *
* // SpEL expression * // SpEL expression
* &#64;Query(collation = "?#{[0]}") * &#64;Query(collation = "?#{[0]}")
* List<Entry> findAllByDynamicSpElCollation(String collation); * List&lt;Entry&gt; findAllByDynamicSpElCollation(String collation);
* </pre> * </pre>
* *
* @return an empty {@link String} by default. * @return an empty {@link String} by default.

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/MongoQueryCreator.java

@ -438,7 +438,7 @@ class MongoQueryCreator extends AbstractQueryCreator<Query, Criteria> {
/** /**
* Compute a {@link Type#BETWEEN} typed {@link Part} using {@link Criteria#gt(Object) $gt}, * Compute a {@link Type#BETWEEN} typed {@link Part} using {@link Criteria#gt(Object) $gt},
* {@link Criteria#gte(Object) $gte}, {@link Criteria#lt(Object) $lt} and {@link Criteria#lte(Object) $lte}. * {@link Criteria#gte(Object) $gte}, {@link Criteria#lt(Object) $lt} and {@link Criteria#lte(Object) $lte}.
* <p/> * <br />
* In case the first {@literal value} is actually a {@link Range} the lower and upper bounds of the {@link Range} are * In case the first {@literal value} is actually a {@link Range} the lower and upper bounds of the {@link Range} are
* used according to their {@link Bound#isInclusive() inclusion} definition. Otherwise the {@literal value} is used * used according to their {@link Bound#isInclusive() inclusion} definition. Otherwise the {@literal value} is used
* for {@literal $gt} and {@link Iterator#next() parameters.next()} as {@literal $lt}. * for {@literal $gt} and {@link Iterator#next() parameters.next()} as {@literal $lt}.

Loading…
Cancel
Save