You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2022. It is now read-only.
Copy file name to clipboardexpand all lines: spring-cloud-gcp-data-firestore/src/main/java/org/springframework/cloud/gcp/data/firestore/FirestoreReactiveOperations.java
+62-4
Original file line number
Diff line number
Diff line change
@@ -32,31 +32,89 @@ public interface FirestoreReactiveOperations {
32
32
* update).
33
33
* @param <T> the type of the object to save.
34
34
* @param instance the instance to save.
35
-
* @return the instance that was saved.
35
+
* @return {@link Mono} emitting the saved entity.
36
36
*/
37
37
<T> Mono<T> save(Tinstance);
38
38
39
39
/**
40
40
* Saves multiple objects to Cloud Firestore. Not atomic. Behaves as insert or update.
41
41
* @param instances the objects to save.
42
42
* @param <T> the type of the objects to save.
43
-
* @return a {@link Flux} of the instances that were saved
43
+
* @return {@link Flux} emitting the saved entities.
44
44
*/
45
45
<T> Flux<T> saveAll(Publisher<T> instances);
46
46
47
47
/**
48
48
* Get all the entities of the given domain type.
49
49
* @param <T> the type param of the domain type.
50
50
* @param entityClass the domain type to get.
51
-
* @return the entities that were found.
51
+
* @return {@link Mono} emitting the found entities.
52
52
*/
53
53
<T> Flux<T> findAll(Class<T> entityClass);
54
54
55
55
/**
56
56
* Delete all entities of a given domain type.
57
57
* @param <T> the type param of the domain type.
58
58
* @param entityClass the domain type to delete from Cloud Datastore.
59
-
* @return the number of entities that were deleted.
59
+
* @return {@link Mono} emitting the number of deleted entities.
60
60
*/
61
61
<T> Mono<Long> deleteAll(Class<T> entityClass);
62
+
63
+
/**
64
+
* Test if the entity of the given domain type with a given id exists.
65
+
* Uses the first emitted element to perform the query.
66
+
* @param <T> the type param of the domain type.
67
+
* @param entityClass the domain type of the entity.
68
+
* @param idPublisher publisher that provides an id.
69
+
* @return {@link Mono} emitting {@code true} if an entity with the given id exists, {@code false} otherwise.
0 commit comments