Skip to content

Commit 1c6c703

Browse files
Deprecate mapReduce.
Closes: #3945
1 parent 67b1fe5 commit 1c6c703

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ public <T> T execute(SessionCallback<T> action, Consumer<ClientSession> onComple
566566
* @param reduceFunction The JavaScript reduce function
567567
* @param entityClass The parametrized type of the returned list. Must not be {@literal null}.
568568
* @return The results of the map reduce operation
569-
* @deprecated since MongoDB server version 5.0
569+
* @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}.
570570
*/
571571
@Deprecated
572572
<T> MapReduceResults<T> mapReduce(String inputCollectionName, String mapFunction, String reduceFunction,
@@ -581,7 +581,7 @@ <T> MapReduceResults<T> mapReduce(String inputCollectionName, String mapFunction
581581
* @param mapReduceOptions Options that specify detailed map-reduce behavior.
582582
* @param entityClass The parametrized type of the returned list. Must not be {@literal null}.
583583
* @return The results of the map reduce operation
584-
* @deprecated since MongoDB server version 5.0
584+
* @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}.
585585
*/
586586
@Deprecated
587587
<T> MapReduceResults<T> mapReduce(String inputCollectionName, String mapFunction, String reduceFunction,
@@ -597,7 +597,7 @@ <T> MapReduceResults<T> mapReduce(String inputCollectionName, String mapFunction
597597
* @param reduceFunction The JavaScript reduce function
598598
* @param entityClass The parametrized type of the returned list. Must not be {@literal null}.
599599
* @return The results of the map reduce operation
600-
* @deprecated since MongoDB server version 5.0
600+
* @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}.
601601
*/
602602
@Deprecated
603603
<T> MapReduceResults<T> mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction,
@@ -613,7 +613,7 @@ <T> MapReduceResults<T> mapReduce(Query query, String inputCollectionName, Strin
613613
* @param mapReduceOptions Options that specify detailed map-reduce behavior
614614
* @param entityClass The parametrized type of the returned list. Must not be {@literal null}.
615615
* @return The results of the map reduce operation
616-
* @deprecated since MongoDB server version 5.0
616+
* @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}.
617617
*/
618618
@Deprecated
619619
<T> MapReduceResults<T> mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction,

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

+2
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,9 @@ public <T> MapReduceResults<T> mapReduce(Query query, String inputCollectionName
16611661
* @param resultType
16621662
* @return
16631663
* @since 2.1
1664+
* @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}.
16641665
*/
1666+
@Deprecated
16651667
public <T> List<T> mapReduce(Query query, Class<?> domainType, String inputCollectionName, String mapFunction,
16661668
String reduceFunction, @Nullable MapReduceOptions mapReduceOptions, Class<T> resultType) {
16671669

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ <T> Flux<ChangeStreamEvent<T>> changeStream(@Nullable String database, @Nullable
15051505
* @param options additional options like output collection. Must not be {@literal null}.
15061506
* @return a {@link Flux} emitting the result document sequence. Never {@literal null}.
15071507
* @since 2.1
1508-
* @deprecated since MongoDB server version 5.0
1508+
* @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}.
15091509
*/
15101510
@Deprecated
15111511
<T> Flux<T> mapReduce(Query filterQuery, Class<?> domainType, Class<T> resultType, String mapFunction,
@@ -1525,7 +1525,7 @@ <T> Flux<T> mapReduce(Query filterQuery, Class<?> domainType, Class<T> resultTyp
15251525
* @param options additional options like output collection. Must not be {@literal null}.
15261526
* @return a {@link Flux} emitting the result document sequence. Never {@literal null}.
15271527
* @since 2.1
1528-
* @deprecated since MongoDB server version 5.0
1528+
* @deprecated since 3.4 in favor of {@link #aggregate(TypedAggregation, Class)}.
15291529
*/
15301530
@Deprecated
15311531
<T> Flux<T> mapReduce(Query filterQuery, Class<?> domainType, String inputCollectionName, Class<T> resultType,

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2021 the original author or authors.
2+
* Copyright 2010-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020
*
2121
* @author Mark Pollack
2222
* @author Oliver Gierke
23-
* @deprecated since MongoDB server version 5.0
23+
* @deprecated since 3.4 in favor of {@link org.springframework.data.mongodb.core.aggregation}.
2424
*/
2525
@Deprecated
2626
public class MapReduceCounts {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2021 the original author or authors.
2+
* Copyright 2010-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
3030
* @author Oliver Gierke
3131
* @author Christoph Strobl
3232
* @author Mark Paluch
33-
* @deprecated since MongoDB server version 5.0
33+
* @deprecated since 3.4 in favor of {@link org.springframework.data.mongodb.core.aggregation}.
3434
*/
3535
@Deprecated
3636
public class MapReduceOptions {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2011-2021 the original author or authors.
2+
* Copyright 2011-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
3030
* @author Christoph Strobl
3131
* @author Mark Paluch
3232
* @param <T> The class in which the results are mapped onto, accessible via an iterator.
33-
* @deprecated since MongoDB server version 5.0
33+
* @deprecated since 3.4 in favor of {@link org.springframework.data.mongodb.core.aggregation}.
3434
*/
3535
@Deprecated
3636
public class MapReduceResults<T> implements Iterable<T> {

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2021 the original author or authors.
2+
* Copyright 2010-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,8 +16,7 @@
1616
package org.springframework.data.mongodb.core.mapreduce;
1717

1818
/**
19-
* @deprecated since MongoDB server version 5.0
20-
*
19+
* @deprecated since 3.4 in favor of {@link org.springframework.data.mongodb.core.aggregation}.
2120
*/
2221
@Deprecated
2322
public class MapReduceTiming {

0 commit comments

Comments
 (0)