@NoRepositoryBean public interface RxJava3CrudRepository<T,ID> extends Repository<T,ID>
Maybe,
Single,
Flowable,
Completable| Modifier and Type | Method and Description |
|---|---|
io.reactivex.rxjava3.core.Single<Long> |
count()
Returns the number of entities available.
|
io.reactivex.rxjava3.core.Completable |
delete(T entity)
Deletes a given entity.
|
io.reactivex.rxjava3.core.Completable |
deleteAll()
Deletes all entities managed by the repository.
|
io.reactivex.rxjava3.core.Completable |
deleteAll(io.reactivex.rxjava3.core.Flowable<? extends T> entityStream)
Deletes the given entities supplied by a
Flowable. |
io.reactivex.rxjava3.core.Completable |
deleteAll(Iterable<? extends T> entities)
Deletes the given entities.
|
io.reactivex.rxjava3.core.Completable |
deleteById(ID id)
Deletes the entity with the given id.
|
io.reactivex.rxjava3.core.Single<Boolean> |
existsById(ID id)
Returns whether an entity with the given id exists.
|
io.reactivex.rxjava3.core.Single<Boolean> |
existsById(io.reactivex.rxjava3.core.Single<ID> id)
Returns whether an entity with the given id, supplied by a
Single, exists. |
io.reactivex.rxjava3.core.Flowable<T> |
findAll()
Returns all instances of the type.
|
io.reactivex.rxjava3.core.Flowable<T> |
findAllById(io.reactivex.rxjava3.core.Flowable<ID> idStream)
Returns all instances of the type
T with the given IDs supplied by a Flowable. |
io.reactivex.rxjava3.core.Flowable<T> |
findAllById(Iterable<ID> ids)
Returns all instances of the type
T with the given IDs. |
io.reactivex.rxjava3.core.Maybe<T> |
findById(ID id)
Retrieves an entity by its id.
|
io.reactivex.rxjava3.core.Maybe<T> |
findById(io.reactivex.rxjava3.core.Single<ID> id)
Retrieves an entity by its id supplied by a
Single. |
<S extends T> |
save(S entity)
Saves a given entity.
|
<S extends T> |
saveAll(io.reactivex.rxjava3.core.Flowable<S> entityStream)
Saves all given entities.
|
<S extends T> |
saveAll(Iterable<S> entities)
Saves all given entities.
|
<S extends T> io.reactivex.rxjava3.core.Single<S> save(S entity)
entity - must not be null.Single emitting the saved entity.IllegalArgumentException - in case the given entity is null.<S extends T> io.reactivex.rxjava3.core.Flowable<S> saveAll(Iterable<S> entities)
entities - must not be null.Flowable emitting the saved entities.IllegalArgumentException - in case the given entities or one of its entities is
null.<S extends T> io.reactivex.rxjava3.core.Flowable<S> saveAll(io.reactivex.rxjava3.core.Flowable<S> entityStream)
entityStream - must not be null.Flowable emitting the saved entities.IllegalArgumentException - in case the given entityStream is null.io.reactivex.rxjava3.core.Maybe<T> findById(ID id)
id - must not be null.Maybe emitting the entity with the given id or Maybe.empty() if none found.IllegalArgumentException - in case the given id is null.io.reactivex.rxjava3.core.Maybe<T> findById(io.reactivex.rxjava3.core.Single<ID> id)
Single.id - must not be null. Uses the first emitted element to perform the find-query.Maybe emitting the entity with the given id or Maybe.empty() if none found.IllegalArgumentException - in case the given id is null.io.reactivex.rxjava3.core.Single<Boolean> existsById(ID id)
id - must not be null.Single emitting true if an entity with the given id exists, false otherwise.IllegalArgumentException - in case the given id is null.io.reactivex.rxjava3.core.Single<Boolean> existsById(io.reactivex.rxjava3.core.Single<ID> id)
Single, exists.id - must not be null.Single emitting true if an entity with the given id exists, false otherwise.IllegalArgumentException - in case the given id is null.io.reactivex.rxjava3.core.Flowable<T> findAll()
Flowable emitting all entities.io.reactivex.rxjava3.core.Flowable<T> findAllById(Iterable<ID> ids)
T with the given IDs.
If some or all ids are not found, no entities are returned for these IDs.
Note that the order of elements in the result is not guaranteed.
ids - must not be null nor contain any null values.Flowable emitting the found entities. The size can be equal or less than the number of given
ids.IllegalArgumentException - in case the given ids or one of its items is null.io.reactivex.rxjava3.core.Flowable<T> findAllById(io.reactivex.rxjava3.core.Flowable<ID> idStream)
T with the given IDs supplied by a Flowable.
If some or all ids are not found, no entities are returned for these IDs.
Note that the order of elements in the result is not guaranteed.
idStream - must not be null.Flowable emitting the found entities.IllegalArgumentException - in case the given idStream is null.io.reactivex.rxjava3.core.Single<Long> count()
Single emitting the number of entities.io.reactivex.rxjava3.core.Completable deleteById(ID id)
id - must not be null.Completable signaling when operation has completed.IllegalArgumentException - in case the given id is null.io.reactivex.rxjava3.core.Completable delete(T entity)
entity - must not be null.Completable signaling when operation has completed.IllegalArgumentException - in case the given entity is null.io.reactivex.rxjava3.core.Completable deleteAll(Iterable<? extends T> entities)
entities - must not be null.Completable signaling when operation has completed.IllegalArgumentException - in case the given entities or one of its entities is
null.io.reactivex.rxjava3.core.Completable deleteAll(io.reactivex.rxjava3.core.Flowable<? extends T> entityStream)
Flowable.entityStream - must not be null.Completable signaling when operation has completed.IllegalArgumentException - in case the given entityStream is null.io.reactivex.rxjava3.core.Completable deleteAll()
Completable signaling when operation has completed.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.