diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java index 8cf23c25e..79c192106 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java @@ -566,7 +566,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param reduceFunction The JavaScript reduce function * @param entityClass The parametrized type of the returned list. Must not be {@literal null}. * @return The results of the map reduce operation - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}. */ @Deprecated MapReduceResults mapReduce(String inputCollectionName, String mapFunction, String reduceFunction, @@ -581,7 +581,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param mapReduceOptions Options that specify detailed map-reduce behavior. * @param entityClass The parametrized type of the returned list. Must not be {@literal null}. * @return The results of the map reduce operation - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}. */ @Deprecated MapReduceResults mapReduce(String inputCollectionName, String mapFunction, String reduceFunction, @@ -597,7 +597,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param reduceFunction The JavaScript reduce function * @param entityClass The parametrized type of the returned list. Must not be {@literal null}. * @return The results of the map reduce operation - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}. */ @Deprecated MapReduceResults mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction, @@ -613,7 +613,7 @@ public interface MongoOperations extends FluentMongoOperations { * @param mapReduceOptions Options that specify detailed map-reduce behavior * @param entityClass The parametrized type of the returned list. Must not be {@literal null}. * @return The results of the map reduce operation - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}. */ @Deprecated MapReduceResults mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction, diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java index 01927a94d..711201073 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java @@ -1661,7 +1661,9 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware, * @param resultType * @return * @since 2.1 + * @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}. */ + @Deprecated public List mapReduce(Query query, Class domainType, String inputCollectionName, String mapFunction, String reduceFunction, @Nullable MapReduceOptions mapReduceOptions, Class resultType) { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java index 904ea3f50..e51238a72 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java @@ -1505,7 +1505,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param options additional options like output collection. Must not be {@literal null}. * @return a {@link Flux} emitting the result document sequence. Never {@literal null}. * @since 2.1 - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}. */ @Deprecated Flux mapReduce(Query filterQuery, Class domainType, Class resultType, String mapFunction, @@ -1525,7 +1525,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { * @param options additional options like output collection. Must not be {@literal null}. * @return a {@link Flux} emitting the result document sequence. Never {@literal null}. * @since 2.1 - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}. */ @Deprecated Flux mapReduce(Query filterQuery, Class domainType, String inputCollectionName, Class resultType, diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceCounts.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceCounts.java index 816709a58..a0d77197f 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceCounts.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceCounts.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2021 the original author or authors. + * Copyright 2010-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ package org.springframework.data.mongodb.core.mapreduce; * * @author Mark Pollack * @author Oliver Gierke - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link org.springframework.data.mongodb.core.aggregation}. */ @Deprecated public class MapReduceCounts { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceOptions.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceOptions.java index b26004e48..2bc014de9 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceOptions.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2021 the original author or authors. + * Copyright 2010-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ import com.mongodb.client.model.MapReduceAction; * @author Oliver Gierke * @author Christoph Strobl * @author Mark Paluch - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link org.springframework.data.mongodb.core.aggregation}. */ @Deprecated public class MapReduceOptions { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceResults.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceResults.java index 08523364d..601fc488b 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceResults.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceResults.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2021 the original author or authors. + * Copyright 2011-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ import org.springframework.util.Assert; * @author Christoph Strobl * @author Mark Paluch * @param The class in which the results are mapped onto, accessible via an iterator. - * @deprecated since MongoDB server version 5.0 + * @deprecated since 3.4 in favor of {@link org.springframework.data.mongodb.core.aggregation}. */ @Deprecated public class MapReduceResults implements Iterable { diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceTiming.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceTiming.java index 116766014..a42d8f23c 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceTiming.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceTiming.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2021 the original author or authors. + * Copyright 2010-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,7 @@ package org.springframework.data.mongodb.core.mapreduce; /** - * @deprecated since MongoDB server version 5.0 - * + * @deprecated since 3.4 in favor of {@link org.springframework.data.mongodb.core.aggregation}. */ @Deprecated public class MapReduceTiming {