|
|
|
@ -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. |
|
|
|
* |
|
|
|
* |
|
|
|
|