@@ -314,6 +314,7 @@ public void setReadPreference(@Nullable ReadPreference readPreference) {
314
314
* (non-Javadoc)
315
315
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
316
316
*/
317
+ @ Override
317
318
public void setApplicationContext (ApplicationContext applicationContext ) throws BeansException {
318
319
319
320
prepareIndexCreator (applicationContext );
@@ -417,6 +418,7 @@ private void prepareIndexCreator(ApplicationContext context) {
417
418
*
418
419
* @return
419
420
*/
421
+ @ Override
420
422
public MongoConverter getConverter () {
421
423
return this .mongoConverter ;
422
424
}
@@ -557,6 +559,7 @@ protected void executeQuery(Query query, String collectionName, DocumentCallback
557
559
* (non-Javadoc)
558
560
* @see org.springframework.data.mongodb.core.MongoOperations#execute(org.springframework.data.mongodb.core.DbCallback)
559
561
*/
562
+ @ Override
560
563
public <T > T execute (DbCallback <T > action ) {
561
564
562
565
Assert .notNull (action , "DbCallback must not be null!" );
@@ -573,6 +576,7 @@ public <T> T execute(DbCallback<T> action) {
573
576
* (non-Javadoc)
574
577
* @see org.springframework.data.mongodb.core.MongoOperations#execute(java.lang.Class, org.springframework.data.mongodb.core.DbCallback)
575
578
*/
579
+ @ Override
576
580
public <T > T execute (Class <?> entityClass , CollectionCallback <T > callback ) {
577
581
578
582
Assert .notNull (entityClass , "EntityClass must not be null!" );
@@ -583,6 +587,7 @@ public <T> T execute(Class<?> entityClass, CollectionCallback<T> callback) {
583
587
* (non-Javadoc)
584
588
* @see org.springframework.data.mongodb.core.MongoOperations#execute(java.lang.String, org.springframework.data.mongodb.core.DbCallback)
585
589
*/
590
+ @ Override
586
591
public <T > T execute (String collectionName , CollectionCallback <T > callback ) {
587
592
588
593
Assert .notNull (collectionName , "CollectionName must not be null!" );
@@ -635,6 +640,7 @@ public void setSessionSynchronization(SessionSynchronization sessionSynchronizat
635
640
* (non-Javadoc)
636
641
* @see org.springframework.data.mongodb.core.MongoOperations#createCollection(java.lang.Class)
637
642
*/
643
+ @ Override
638
644
public <T > MongoCollection <Document > createCollection (Class <T > entityClass ) {
639
645
return createCollection (entityClass , operations .forType (entityClass ).getCollectionOptions ());
640
646
}
@@ -643,6 +649,7 @@ public <T> MongoCollection<Document> createCollection(Class<T> entityClass) {
643
649
* (non-Javadoc)
644
650
* @see org.springframework.data.mongodb.core.MongoOperations#createCollection(java.lang.Class, org.springframework.data.mongodb.core.CollectionOptions)
645
651
*/
652
+ @ Override
646
653
public <T > MongoCollection <Document > createCollection (Class <T > entityClass ,
647
654
@ Nullable CollectionOptions collectionOptions ) {
648
655
@@ -656,6 +663,7 @@ public <T> MongoCollection<Document> createCollection(Class<T> entityClass,
656
663
* (non-Javadoc)
657
664
* @see org.springframework.data.mongodb.core.MongoOperations#createCollection(java.lang.String)
658
665
*/
666
+ @ Override
659
667
public MongoCollection <Document > createCollection (String collectionName ) {
660
668
661
669
Assert .notNull (collectionName , "CollectionName must not be null!" );
@@ -667,6 +675,7 @@ public MongoCollection<Document> createCollection(String collectionName) {
667
675
* (non-Javadoc)
668
676
* @see org.springframework.data.mongodb.core.MongoOperations#createCollection(java.lang.String, org.springframework.data.mongodb.core.CollectionOptions)
669
677
*/
678
+ @ Override
670
679
public MongoCollection <Document > createCollection (String collectionName ,
671
680
@ Nullable CollectionOptions collectionOptions ) {
672
681
@@ -679,6 +688,7 @@ public MongoCollection<Document> createCollection(String collectionName,
679
688
* (non-Javadoc)
680
689
* @see org.springframework.data.mongodb.core.MongoOperations#getCollection(java.lang.String)
681
690
*/
691
+ @ Override
682
692
@ SuppressWarnings ("ConstantConditions" )
683
693
public MongoCollection <Document > getCollection (String collectionName ) {
684
694
@@ -691,6 +701,7 @@ public MongoCollection<Document> getCollection(String collectionName) {
691
701
* (non-Javadoc)
692
702
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#getCollection(java.lang.Class)
693
703
*/
704
+ @ Override
694
705
public <T > boolean collectionExists (Class <T > entityClass ) {
695
706
return collectionExists (getCollectionName (entityClass ));
696
707
}
@@ -699,6 +710,7 @@ public <T> boolean collectionExists(Class<T> entityClass) {
699
710
* (non-Javadoc)
700
711
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#getCollection(java.lang.String)
701
712
*/
713
+ @ Override
702
714
@ SuppressWarnings ("ConstantConditions" )
703
715
public boolean collectionExists (String collectionName ) {
704
716
@@ -719,6 +731,7 @@ public boolean collectionExists(String collectionName) {
719
731
* (non-Javadoc)
720
732
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#dropCollection(java.lang.Class)
721
733
*/
734
+ @ Override
722
735
public <T > void dropCollection (Class <T > entityClass ) {
723
736
dropCollection (getCollectionName (entityClass ));
724
737
}
@@ -727,6 +740,7 @@ public <T> void dropCollection(Class<T> entityClass) {
727
740
* (non-Javadoc)
728
741
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#dropCollection(java.lang.String)
729
742
*/
743
+ @ Override
730
744
public void dropCollection (String collectionName ) {
731
745
732
746
Assert .notNull (collectionName , "CollectionName must not be null!" );
@@ -750,6 +764,7 @@ public IndexOperations indexOps(String collectionName) {
750
764
* (non-Javadoc)
751
765
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#indexOps(java.lang.String)
752
766
*/
767
+ @ Override
753
768
public IndexOperations indexOps (String collectionName , @ Nullable Class <?> type ) {
754
769
return new DefaultIndexOperations (this , collectionName , type );
755
770
}
@@ -758,6 +773,7 @@ public IndexOperations indexOps(String collectionName, @Nullable Class<?> type)
758
773
* (non-Javadoc)
759
774
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#indexOps(java.lang.Class)
760
775
*/
776
+ @ Override
761
777
public IndexOperations indexOps (Class <?> entityClass ) {
762
778
return indexOps (getCollectionName (entityClass ), entityClass );
763
779
}
@@ -766,6 +782,7 @@ public IndexOperations indexOps(Class<?> entityClass) {
766
782
* (non-Javadoc)
767
783
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#bulkOps(org.springframework.data.mongodb.core.BulkMode, java.lang.String)
768
784
*/
785
+ @ Override
769
786
public BulkOperations bulkOps (BulkMode bulkMode , String collectionName ) {
770
787
return bulkOps (bulkMode , null , collectionName );
771
788
}
@@ -774,6 +791,7 @@ public BulkOperations bulkOps(BulkMode bulkMode, String collectionName) {
774
791
* (non-Javadoc)
775
792
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#bulkOps(org.springframework.data.mongodb.core.BulkMode, java.lang.Class)
776
793
*/
794
+ @ Override
777
795
public BulkOperations bulkOps (BulkMode bulkMode , Class <?> entityClass ) {
778
796
return bulkOps (bulkMode , entityClass , getCollectionName (entityClass ));
779
797
}
@@ -782,6 +800,7 @@ public BulkOperations bulkOps(BulkMode bulkMode, Class<?> entityClass) {
782
800
* (non-Javadoc)
783
801
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#bulkOps(org.springframework.data.mongodb.core.BulkMode, java.lang.Class, java.lang.String)
784
802
*/
803
+ @ Override
785
804
public BulkOperations bulkOps (BulkMode mode , @ Nullable Class <?> entityType , String collectionName ) {
786
805
787
806
Assert .notNull (mode , "BulkMode must not be null!" );
@@ -1145,6 +1164,7 @@ public long count(Query query, String collectionName) {
1145
1164
* (non-Javadoc)
1146
1165
* @see org.springframework.data.mongodb.core.MongoOperations#count(org.springframework.data.mongodb.core.query.Query, java.lang.Class, java.lang.String)
1147
1166
*/
1167
+ @ Override
1148
1168
public long count (Query query , @ Nullable Class <?> entityClass , String collectionName ) {
1149
1169
1150
1170
Assert .notNull (query , "Query must not be null!" );
@@ -1984,10 +2004,12 @@ public <T> List<T> mapReduce(Query query, Class<?> domainType, String inputColle
1984
2004
return mappedResults ;
1985
2005
}
1986
2006
2007
+ @ Override
1987
2008
public <T > GroupByResults <T > group (String inputCollectionName , GroupBy groupBy , Class <T > entityClass ) {
1988
2009
return group (null , inputCollectionName , groupBy , entityClass );
1989
2010
}
1990
2011
2012
+ @ Override
1991
2013
public <T > GroupByResults <T > group (@ Nullable Criteria criteria , String inputCollectionName , GroupBy groupBy ,
1992
2014
Class <T > entityClass ) {
1993
2015
@@ -2396,6 +2418,7 @@ protected String replaceWithResourceIfNecessary(String function) {
2396
2418
* (non-Javadoc)
2397
2419
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#getCollectionNames()
2398
2420
*/
2421
+ @ Override
2399
2422
@ SuppressWarnings ("ConstantConditions" )
2400
2423
public Set <String > getCollectionNames () {
2401
2424
return execute (db -> {
@@ -3089,6 +3112,7 @@ public FindCallback(Document query, Document fields, @Nullable com.mongodb.clien
3089
3112
this .collation = collation ;
3090
3113
}
3091
3114
3115
+ @ Override
3092
3116
public FindIterable <Document > doInCollection (MongoCollection <Document > collection )
3093
3117
throws MongoException , DataAccessException {
3094
3118
@@ -3148,6 +3172,7 @@ private static class FindAndRemoveCallback implements CollectionCallback<Documen
3148
3172
this .collation = Optional .ofNullable (collation );
3149
3173
}
3150
3174
3175
+ @ Override
3151
3176
public Document doInCollection (MongoCollection <Document > collection ) throws MongoException , DataAccessException {
3152
3177
3153
3178
FindOneAndDeleteOptions opts = new FindOneAndDeleteOptions ().sort (sort ).projection (fields );
@@ -3177,6 +3202,7 @@ private static class FindAndModifyCallback implements CollectionCallback<Documen
3177
3202
this .options = options ;
3178
3203
}
3179
3204
3205
+ @ Override
3180
3206
public Document doInCollection (MongoCollection <Document > collection ) throws MongoException , DataAccessException {
3181
3207
3182
3208
FindOneAndUpdateOptions opts = new FindOneAndUpdateOptions ();
@@ -3289,6 +3315,7 @@ private class ReadDocumentCallback<T> implements DocumentCallback<T> {
3289
3315
this .collectionName = collectionName ;
3290
3316
}
3291
3317
3318
+ @ Override
3292
3319
public T doWith (Document document ) {
3293
3320
3294
3321
maybeEmitEvent (new AfterLoadEvent <>(document , type , collectionName ));
@@ -3330,6 +3357,7 @@ private class ProjectingReadCallback<S, T> implements DocumentCallback<T> {
3330
3357
* (non-Javadoc)
3331
3358
* @see org.springframework.data.mongodb.core.MongoTemplate.DocumentCallback#doWith(org.bson.Document)
3332
3359
*/
3360
+ @ Override
3333
3361
@ SuppressWarnings ("unchecked" )
3334
3362
public T doWith (Document document ) {
3335
3363
@@ -3365,6 +3393,7 @@ class QueryCursorPreparer implements CursorPreparer {
3365
3393
* (non-Javadoc)
3366
3394
* @see org.springframework.data.mongodb.core.CursorPreparer#prepare(com.mongodb.DBCursor)
3367
3395
*/
3396
+ @ Override
3368
3397
public FindIterable <Document > prepare (FindIterable <Document > iterable ) {
3369
3398
3370
3399
FindIterable <Document > cursorToUse = iterable ;
@@ -3483,6 +3512,7 @@ static class GeoNearResultDocumentCallback<T> implements DocumentCallback<GeoRes
3483
3512
this .metric = metric ;
3484
3513
}
3485
3514
3515
+ @ Override
3486
3516
public GeoResult <T > doWith (Document object ) {
3487
3517
3488
3518
double distance = Double .NaN ;
0 commit comments