23
23
import java .util .stream .Stream ;
24
24
25
25
import org .bson .Document ;
26
-
27
26
import org .springframework .data .geo .GeoResults ;
28
27
import org .springframework .data .mongodb .core .BulkOperations .BulkMode ;
29
28
import org .springframework .data .mongodb .core .aggregation .Aggregation ;
34
33
import org .springframework .data .mongodb .core .convert .MappingMongoConverter ;
35
34
import org .springframework .data .mongodb .core .convert .MongoConverter ;
36
35
import org .springframework .data .mongodb .core .index .IndexOperations ;
37
- import org .springframework .data .mongodb .core .mapreduce .GroupBy ;
38
- import org .springframework .data .mongodb .core .mapreduce .GroupByResults ;
39
36
import org .springframework .data .mongodb .core .mapreduce .MapReduceOptions ;
40
37
import org .springframework .data .mongodb .core .mapreduce .MapReduceResults ;
41
38
import org .springframework .data .mongodb .core .query .BasicQuery ;
@@ -431,43 +428,6 @@ public <T> T execute(SessionCallback<T> action, Consumer<ClientSession> onComple
431
428
*/
432
429
<T > List <T > findAll (Class <T > entityClass , String collectionName );
433
430
434
- /**
435
- * Execute a group operation over the entire collection. The group operation entity class should match the 'shape' of
436
- * the returned object that takes int account the initial document structure as well as any finalize functions.
437
- *
438
- * @param inputCollectionName the collection where the group operation will read from
439
- * @param groupBy the conditions under which the group operation will be performed, e.g. keys, initial document,
440
- * reduce function.
441
- * @param entityClass The parametrized type of the returned list
442
- * @return The results of the group operation
443
- * @deprecated since 2.2. The {@code group} command has been removed in MongoDB Server 4.2.0. <br />
444
- * Please use {@link #aggregate(TypedAggregation, String, Class) } with a
445
- * {@link org.springframework.data.mongodb.core.aggregation.GroupOperation} instead.
446
- */
447
- @ Deprecated
448
- <T > GroupByResults <T > group (String inputCollectionName , GroupBy groupBy , Class <T > entityClass );
449
-
450
- /**
451
- * Execute a group operation restricting the rows to those which match the provided Criteria. The group operation
452
- * entity class should match the 'shape' of the returned object that takes int account the initial document structure
453
- * as well as any finalize functions.
454
- *
455
- * @param criteria The criteria that restricts the row that are considered for grouping. If not specified all rows are
456
- * considered.
457
- * @param inputCollectionName the collection where the group operation will read from
458
- * @param groupBy the conditions under which the group operation will be performed, e.g. keys, initial document,
459
- * reduce function.
460
- * @param entityClass The parametrized type of the returned list
461
- * @return The results of the group operation
462
- * @deprecated since 2.2. The {@code group} command has been removed in MongoDB Server 4.2.0. <br />
463
- * Please use {@link #aggregate(TypedAggregation, String, Class) } with a
464
- * {@link org.springframework.data.mongodb.core.aggregation.GroupOperation} and
465
- * {@link org.springframework.data.mongodb.core.aggregation.MatchOperation} instead.
466
- */
467
- @ Deprecated
468
- <T > GroupByResults <T > group (@ Nullable Criteria criteria , String inputCollectionName , GroupBy groupBy ,
469
- Class <T > entityClass );
470
-
471
431
/**
472
432
* Execute an aggregation operation. The raw results will be mapped to the given entity class. The name of the
473
433
* inputCollection is derived from the inputType of the aggregation.
@@ -606,7 +566,9 @@ <T> GroupByResults<T> group(@Nullable Criteria criteria, String inputCollectionN
606
566
* @param reduceFunction The JavaScript reduce function
607
567
* @param entityClass The parametrized type of the returned list. Must not be {@literal null}.
608
568
* @return The results of the map reduce operation
569
+ * @deprecated since MongoDB server version 5.0
609
570
*/
571
+ @ Deprecated
610
572
<T > MapReduceResults <T > mapReduce (String inputCollectionName , String mapFunction , String reduceFunction ,
611
573
Class <T > entityClass );
612
574
@@ -619,7 +581,9 @@ <T> MapReduceResults<T> mapReduce(String inputCollectionName, String mapFunction
619
581
* @param mapReduceOptions Options that specify detailed map-reduce behavior.
620
582
* @param entityClass The parametrized type of the returned list. Must not be {@literal null}.
621
583
* @return The results of the map reduce operation
584
+ * @deprecated since MongoDB server version 5.0
622
585
*/
586
+ @ Deprecated
623
587
<T > MapReduceResults <T > mapReduce (String inputCollectionName , String mapFunction , String reduceFunction ,
624
588
@ Nullable MapReduceOptions mapReduceOptions , Class <T > entityClass );
625
589
@@ -633,7 +597,9 @@ <T> MapReduceResults<T> mapReduce(String inputCollectionName, String mapFunction
633
597
* @param reduceFunction The JavaScript reduce function
634
598
* @param entityClass The parametrized type of the returned list. Must not be {@literal null}.
635
599
* @return The results of the map reduce operation
600
+ * @deprecated since MongoDB server version 5.0
636
601
*/
602
+ @ Deprecated
637
603
<T > MapReduceResults <T > mapReduce (Query query , String inputCollectionName , String mapFunction , String reduceFunction ,
638
604
Class <T > entityClass );
639
605
@@ -647,7 +613,9 @@ <T> MapReduceResults<T> mapReduce(Query query, String inputCollectionName, Strin
647
613
* @param mapReduceOptions Options that specify detailed map-reduce behavior
648
614
* @param entityClass The parametrized type of the returned list. Must not be {@literal null}.
649
615
* @return The results of the map reduce operation
616
+ * @deprecated since MongoDB server version 5.0
650
617
*/
618
+ @ Deprecated
651
619
<T > MapReduceResults <T > mapReduce (Query query , String inputCollectionName , String mapFunction , String reduceFunction ,
652
620
@ Nullable MapReduceOptions mapReduceOptions , Class <T > entityClass );
653
621
0 commit comments