@@ -41,7 +41,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
41
41
*
42
42
* @param entity must not be {@literal null}.
43
43
* @return {@link Mono} emitting the saved entity.
44
- * @throws IllegalArgumentException in case the given {@code entity} is {@literal null}.
44
+ * @throws IllegalArgumentException in case the given {@literal entity} is {@literal null}.
45
45
*/
46
46
<S extends T > Mono <S > save (S entity );
47
47
@@ -50,7 +50,8 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
50
50
*
51
51
* @param entities must not be {@literal null}.
52
52
* @return {@link Flux} emitting the saved entities.
53
- * @throws IllegalArgumentException in case the given {@link Iterable} {@code entities} is {@literal null}.
53
+ * @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is
54
+ * {@literal null}.
54
55
*/
55
56
<S extends T > Flux <S > saveAll (Iterable <S > entities );
56
57
@@ -59,7 +60,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
59
60
*
60
61
* @param entityStream must not be {@literal null}.
61
62
* @return {@link Flux} emitting the saved entities.
62
- * @throws IllegalArgumentException in case the given {@code Publisher} {@code entityStream} is {@literal null}.
63
+ * @throws IllegalArgumentException in case the given {@link Publisher entityStream} is {@literal null}.
63
64
*/
64
65
<S extends T > Flux <S > saveAll (Publisher <S > entityStream );
65
66
@@ -68,7 +69,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
68
69
*
69
70
* @param id must not be {@literal null}.
70
71
* @return {@link Mono} emitting the entity with the given id or {@link Mono#empty()} if none found.
71
- * @throws IllegalArgumentException in case the given {@code id} is {@literal null}.
72
+ * @throws IllegalArgumentException in case the given {@literal id} is {@literal null}.
72
73
*/
73
74
Mono <T > findById (ID id );
74
75
@@ -77,16 +78,16 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
77
78
*
78
79
* @param id must not be {@literal null}. Uses the first emitted element to perform the find-query.
79
80
* @return {@link Mono} emitting the entity with the given id or {@link Mono#empty()} if none found.
80
- * @throws IllegalArgumentException in case the given {@link Publisher} {@code id} is {@literal null}.
81
+ * @throws IllegalArgumentException in case the given {@link Publisher id} is {@literal null}.
81
82
*/
82
83
Mono <T > findById (Publisher <ID > id );
83
84
84
85
/**
85
- * Returns whether an entity with the id exists.
86
+ * Returns whether an entity with the given {@literal id} exists.
86
87
*
87
88
* @param id must not be {@literal null}.
88
89
* @return {@link Mono} emitting {@literal true} if an entity with the given id exists, {@literal false} otherwise.
89
- * @throws IllegalArgumentException in case the given {@code id} is {@literal null}.
90
+ * @throws IllegalArgumentException in case the given {@literal id} is {@literal null}.
90
91
*/
91
92
Mono <Boolean > existsById (ID id );
92
93
@@ -95,8 +96,8 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
95
96
* element to perform the exists-query.
96
97
*
97
98
* @param id must not be {@literal null}.
98
- * @return {@link Mono} emitting {@literal true} if an entity with the given id exists, {@literal false} otherwise
99
- * @throws IllegalArgumentException in case the given {@link Publisher} {@code id} is {@literal null}.
99
+ * @return {@link Mono} emitting {@literal true} if an entity with the given id exists, {@literal false} otherwise.
100
+ * @throws IllegalArgumentException in case the given {@link Publisher id} is {@literal null}.
100
101
*/
101
102
Mono <Boolean > existsById (Publisher <ID > id );
102
103
@@ -108,20 +109,29 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
108
109
Flux <T > findAll ();
109
110
110
111
/**
111
- * Returns all instances with the given IDs.
112
+ * Returns all instances of the type {@code T} with the given IDs.
113
+ * <p>
114
+ * If some or all ids are not found, no entities are returned for these IDs.
115
+ * <p>
116
+ * Note that the order of elements in the result is not guaranteed.
112
117
*
113
- * @param ids must not be {@literal null}.
114
- * @return {@link Flux} emitting the found entities.
115
- * @throws IllegalArgumentException in case the given {@link Iterable} {@code ids} is {@literal null}.
118
+ * @param ids must not be {@literal null} nor contain any {@literal null} values.
119
+ * @return {@link Flux} emitting the found entities. The size can be equal or less than the number of given
120
+ * {@literal ids}.
121
+ * @throws IllegalArgumentException in case the given {@link Iterable ids} or one of its items is {@literal null}.
116
122
*/
117
123
Flux <T > findAllById (Iterable <ID > ids );
118
124
119
125
/**
120
- * Returns all instances of the type with the given IDs supplied by a {@link Publisher}.
126
+ * Returns all instances of the type {@code T} with the given IDs supplied by a {@link Publisher}.
127
+ * <p>
128
+ * If some or all ids are not found, no entities are returned for these IDs.
129
+ * <p>
130
+ * Note that the order of elements in the result is not guaranteed.
121
131
*
122
132
* @param idStream must not be {@literal null}.
123
133
* @return {@link Flux} emitting the found entities.
124
- * @throws IllegalArgumentException in case the given {@link Publisher} {@code idStream} is {@literal null}.
134
+ * @throws IllegalArgumentException in case the given {@link Publisher idStream} is {@literal null}.
125
135
*/
126
136
Flux <T > findAllById (Publisher <ID > idStream );
127
137
@@ -137,7 +147,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
137
147
*
138
148
* @param id must not be {@literal null}.
139
149
* @return {@link Mono} signaling when operation has completed.
140
- * @throws IllegalArgumentException in case the given {@code id} is {@literal null}.
150
+ * @throws IllegalArgumentException in case the given {@literal id} is {@literal null}.
141
151
*/
142
152
Mono <Void > deleteById (ID id );
143
153
@@ -146,7 +156,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
146
156
*
147
157
* @param id must not be {@literal null}.
148
158
* @return {@link Mono} signaling when operation has completed.
149
- * @throws IllegalArgumentException in case the given {@link Publisher} {@code id} is {@literal null}.
159
+ * @throws IllegalArgumentException in case the given {@link Publisher id} is {@literal null}.
150
160
*/
151
161
Mono <Void > deleteById (Publisher <ID > id );
152
162
@@ -164,7 +174,8 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
164
174
*
165
175
* @param entities must not be {@literal null}.
166
176
* @return {@link Mono} signaling when operation has completed.
167
- * @throws IllegalArgumentException in case the given {@link Iterable} {@code entities} is {@literal null}.
177
+ * @throws IllegalArgumentException in case the given {@link Iterable entities} or one of its entities is
178
+ * {@literal null}.
168
179
*/
169
180
Mono <Void > deleteAll (Iterable <? extends T > entities );
170
181
@@ -173,7 +184,7 @@ public interface ReactiveCrudRepository<T, ID> extends Repository<T, ID> {
173
184
*
174
185
* @param entityStream must not be {@literal null}.
175
186
* @return {@link Mono} signaling when operation has completed.
176
- * @throws IllegalArgumentException in case the given {@link Publisher} {@code entityStream} is {@literal null}.
187
+ * @throws IllegalArgumentException in case the given {@link Publisher entityStream} is {@literal null}.
177
188
*/
178
189
Mono <Void > deleteAll (Publisher <? extends T > entityStream );
179
190
0 commit comments