public interface FirestoreReactiveOperations
Modifier and Type | Method and Description |
---|---|
String |
buildResourceName(FirestorePersistentEntity<?> persistentEntity,
String resource)
Builds the full reference path to a resource such as a document or a sub-collection.
|
<T> reactor.core.publisher.Mono<Long> |
count(Class<T> entityClass)
Count entities of the given domain.
|
<T> reactor.core.publisher.Mono<Long> |
count(Class<T> entityClass,
com.google.firestore.v1.StructuredQuery.Builder queryBuilder)
Count entities of the given domain corresponding to the predicates given in the query builder.
|
<T> reactor.core.publisher.Mono<Void> |
delete(org.reactivestreams.Publisher<T> entityPublisher)
Delete entities provided by publisher.
|
<T> reactor.core.publisher.Mono<Long> |
deleteAll(Class<T> entityClass)
Delete all entities of a given domain type.
|
reactor.core.publisher.Mono<Void> |
deleteById(org.reactivestreams.Publisher<String> idPublisher,
Class<?> entityClass)
Delete entities of a given domain type using ids published by producer.
|
<T> reactor.core.publisher.Flux<T> |
execute(com.google.firestore.v1.StructuredQuery.Builder builder,
Class<T> entityClass)
Executes a query represented as query builder and returns results of the given domain type.
|
<T> reactor.core.publisher.Mono<Boolean> |
existsById(org.reactivestreams.Publisher<String> idPublisher,
Class<T> entityClass)
Test if the entity of the given domain type with a given id exists.
|
<T> reactor.core.publisher.Flux<T> |
findAll(Class<T> entityClass)
Get all the entities of the given domain type.
|
<T> reactor.core.publisher.Flux<T> |
findAllById(org.reactivestreams.Publisher<String> idPublisher,
Class<T> entityClass)
Get an entity of the given domain type by id.
|
<T> reactor.core.publisher.Mono<T> |
findById(org.reactivestreams.Publisher<String> idPublisher,
Class<T> entityClass)
Get an entity of the given domain type by id.
|
<T> reactor.core.publisher.Mono<T> |
save(T instance)
Saves an instance of an object to Cloud Firestore.
|
<T> reactor.core.publisher.Flux<T> |
saveAll(org.reactivestreams.Publisher<T> instances)
Saves multiple objects to Cloud Firestore.
|
FirestoreReactiveOperations |
withParent(String id,
Class<?> entityClass)
Creates FirestoreReactiveOperations object with a specified parent document.
|
<T> FirestoreReactiveOperations |
withParent(T parent)
Creates FirestoreReactiveOperations object with a specified parent document.
|
<T> reactor.core.publisher.Mono<T> save(T instance)
T
- the type of the object to save.instance
- the instance to save.Mono
emitting the saved entity.<T> reactor.core.publisher.Flux<T> saveAll(org.reactivestreams.Publisher<T> instances)
T
- the type of the objects to save.instances
- the objects to save.Flux
emitting the saved entities.<T> reactor.core.publisher.Flux<T> findAll(Class<T> entityClass)
T
- the type param of the domain type.entityClass
- the domain type to get.Mono
emitting the found entities.<T> reactor.core.publisher.Mono<Long> deleteAll(Class<T> entityClass)
T
- the type param of the domain type.entityClass
- the domain type to delete from Cloud Datastore.Mono
emitting the number of deleted entities.<T> reactor.core.publisher.Mono<Boolean> existsById(org.reactivestreams.Publisher<String> idPublisher, Class<T> entityClass)
T
- the type param of the domain type.entityClass
- the domain type of the entity.idPublisher
- publisher that provides an id.Mono
emitting true
if an entity with the given id exists, false
otherwise.<T> reactor.core.publisher.Mono<T> findById(org.reactivestreams.Publisher<String> idPublisher, Class<T> entityClass)
T
- the type param of the domain type.idPublisher
- publisher that provides an id.entityClass
- the domain type of the entity.Mono
emitting the found entity.<T> reactor.core.publisher.Flux<T> findAllById(org.reactivestreams.Publisher<String> idPublisher, Class<T> entityClass)
T
- the type param of the domain type.idPublisher
- publisher that provides ids.entityClass
- the domain type of the entity.Flux
emitting the found entities.<T> reactor.core.publisher.Mono<Long> count(Class<T> entityClass)
T
- the type param of the domain type.entityClass
- the domain type of entities.Mono
emitting the number of entities.<T> reactor.core.publisher.Mono<Long> count(Class<T> entityClass, com.google.firestore.v1.StructuredQuery.Builder queryBuilder)
T
- the type param of the domain type.entityClass
- the domain type of entities.queryBuilder
- the query builder that contains predicates;
note that id projection and the collection name will be set during executionMono
emitting the number of entities.<T> reactor.core.publisher.Mono<Void> delete(org.reactivestreams.Publisher<T> entityPublisher)
T
- the type param of the domain type.entityPublisher
- publisher that provides entities to be removed.Mono
signaling when operation has completed.reactor.core.publisher.Mono<Void> deleteById(org.reactivestreams.Publisher<String> idPublisher, Class<?> entityClass)
idPublisher
- publisher that provides ids of entities to be removed.entityClass
- the domain type of entities.Mono
signaling when operation has completed.<T> reactor.core.publisher.Flux<T> execute(com.google.firestore.v1.StructuredQuery.Builder builder, Class<T> entityClass)
T
- the type param of the domain type.builder
- the query builder.entityClass
- the domain type of entities.Flux
emitting the found entities.<T> FirestoreReactiveOperations withParent(T parent)
T
- the type param of the parent.parent
- the query builder.FirestoreReactiveOperations withParent(String id, Class<?> entityClass)
id
- the id of the Document entityentityClass
- the class of the Document entityString buildResourceName(FirestorePersistentEntity<?> persistentEntity, String resource)
persistentEntity
- a Firestore persistent entityresource
- the resource name or path to the resource.String
representing the reference path.Copyright © 2021. All rights reserved.