Browse Source

Polishing.

Add author tags, extend copyright license years, simplify tests.

See #3892
pull/3960/head
Mark Paluch 4 years ago
parent
commit
cffee123dc
No known key found for this signature in database
GPG Key ID: 4406B84C1661DCD1
  1. 7
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/support/ReactiveSpringDataMongodbQuery.java
  2. 9
      spring-data-mongodb/src/test/java/org/springframework/data/mongodb/repository/support/ReactiveQuerydslMongoPredicateExecutorTests.java

7
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/support/ReactiveSpringDataMongodbQuery.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 the original author or authors.
* Copyright 2019-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.
@ -49,13 +49,14 @@ import com.querydsl.core.types.Predicate; @@ -49,13 +49,14 @@ import com.querydsl.core.types.Predicate;
import com.querydsl.mongodb.MongodbOps;
/**
* MongoDB query with utilizing {@link ReactiveMongoOperations} for command execution.
* MongoDB query utilizing {@link ReactiveMongoOperations} for command execution.
*
* @implNote This class uses {@link MongoOperations} to directly convert documents into the target entity type. Also, we
* want entites to participate in lifecycle events and entity callbacks.
* want entities to participate in lifecycle events and entity callbacks.
* @param <K> result type
* @author Mark Paluch
* @author Christoph Strobl
* @author Rocco Lagrotteria
* @since 2.2
*/
class ReactiveSpringDataMongodbQuery<K> extends SpringDataMongodbQuerySupport<ReactiveSpringDataMongodbQuery<K>> {

9
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/repository/support/ReactiveQuerydslMongoPredicateExecutorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2019-2021 the original author or authors.
* Copyright 2019-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.
@ -65,6 +65,7 @@ import com.mongodb.reactivestreams.client.MongoDatabase; @@ -65,6 +65,7 @@ import com.mongodb.reactivestreams.client.MongoDatabase;
*
* @author Mark Paluch
* @author Christoph Strobl
* @author Rocco Lagrotteria
*/
@RunWith(SpringRunner.class)
@ContextConfiguration
@ -400,9 +401,8 @@ public class ReactiveQuerydslMongoPredicateExecutorTests { @@ -400,9 +401,8 @@ public class ReactiveQuerydslMongoPredicateExecutorTests {
.as(StepVerifier::create) //
.assertNext(it -> {
assertThat(it.getContent().size()).isEqualTo(1);
assertThat(it.getTotalElements()).isEqualTo(2);
assertThat(it.getContent()).contains(dave);
assertThat(it.getContent()).containsOnly(dave);
}).verifyComplete();
repository
@ -410,9 +410,8 @@ public class ReactiveQuerydslMongoPredicateExecutorTests { @@ -410,9 +410,8 @@ public class ReactiveQuerydslMongoPredicateExecutorTests {
.as(StepVerifier::create) //
.assertNext(it -> {
assertThat(it.getContent().size()).isEqualTo(1);
assertThat(it.getTotalElements()).isEqualTo(2);
assertThat(it.getContent()).contains(oliver);
assertThat(it.getContent()).containsOnly(oliver);
}).verifyComplete();
}

Loading…
Cancel
Save