Browse Source

Deprecate mapReduce.

Closes: #3945
pull/4007/head
Christoph Strobl 4 years ago
parent
commit
1c6c703640
No known key found for this signature in database
GPG Key ID: 8CC1AB53391458C8
  1. 8
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java
  2. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java
  3. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java
  4. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceCounts.java
  5. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceOptions.java
  6. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceResults.java
  7. 5
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapreduce/MapReduceTiming.java

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

@ -566,7 +566,7 @@ public interface MongoOperations extends FluentMongoOperations { @@ -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
<T> MapReduceResults<T> mapReduce(String inputCollectionName, String mapFunction, String reduceFunction,
@ -581,7 +581,7 @@ public interface MongoOperations extends FluentMongoOperations { @@ -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
<T> MapReduceResults<T> mapReduce(String inputCollectionName, String mapFunction, String reduceFunction,
@ -597,7 +597,7 @@ public interface MongoOperations extends FluentMongoOperations { @@ -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
<T> MapReduceResults<T> mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction,
@ -613,7 +613,7 @@ public interface MongoOperations extends FluentMongoOperations { @@ -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
<T> MapReduceResults<T> mapReduce(Query query, String inputCollectionName, String mapFunction, String reduceFunction,

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

@ -1661,7 +1661,9 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware, @@ -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 <T> List<T> mapReduce(Query query, Class<?> domainType, String inputCollectionName, String mapFunction,
String reduceFunction, @Nullable MapReduceOptions mapReduceOptions, Class<T> resultType) {

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

@ -1505,7 +1505,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { @@ -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
<T> Flux<T> mapReduce(Query filterQuery, Class<?> domainType, Class<T> resultType, String mapFunction,
@ -1525,7 +1525,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { @@ -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
<T> Flux<T> mapReduce(Query filterQuery, Class<?> domainType, String inputCollectionName, Class<T> resultType,

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

@ -1,5 +1,5 @@ @@ -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; @@ -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 {

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

@ -1,5 +1,5 @@ @@ -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; @@ -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 {

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

@ -1,5 +1,5 @@ @@ -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; @@ -30,7 +30,7 @@ import org.springframework.util.Assert;
* @author Christoph Strobl
* @author Mark Paluch
* @param <T> 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<T> implements Iterable<T> {

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

@ -1,5 +1,5 @@ @@ -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 @@ @@ -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 {

Loading…
Cancel
Save