@NoRepositoryBean public interface RxJava2CrudRepository<T,ID> extends Repository<T,ID>
Maybe,
Single,
Flowable,
Completable| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Single<Long> |
count()
Returns the number of entities available.
|
io.reactivex.Completable |
delete(T entity)
Deletes a given entity.
|
io.reactivex.Completable |
deleteAll()
Deletes all entities managed by the repository.
|
io.reactivex.Completable |
deleteAll(io.reactivex.Flowable<? extends T> entityStream)
Deletes the given entities.
|
io.reactivex.Completable |
deleteAll(Iterable<? extends T> entities)
Deletes the given entities.
|
io.reactivex.Completable |
deleteById(ID id)
Deletes the entity with the given id.
|
io.reactivex.Single<Boolean> |
existsById(ID id)
Returns whether an entity with the given id exists.
|
io.reactivex.Single<Boolean> |
existsById(io.reactivex.Single<ID> id)
Returns whether an entity with the given id, supplied by a
Single, exists. |
io.reactivex.Flowable<T> |
findAll()
Returns all instances of the type.
|
io.reactivex.Flowable<T> |
findAllById(io.reactivex.Flowable<ID> idStream)
Returns all instances of the type with the given IDs.
|
io.reactivex.Flowable<T> |
findAllById(Iterable<ID> ids)
Returns all instances of the type with the given IDs.
|
io.reactivex.Maybe<T> |
findById(ID id)
Retrieves an entity by its id.
|
io.reactivex.Maybe<T> |
findById(io.reactivex.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.Flowable<S> entityStream)
Saves all given entities.
|
<S extends T> |
saveAll(Iterable<S> entities)
Saves all given entities.
|
<S extends T> io.reactivex.Single<S> save(S entity)
entity - must not be null.<S extends T> io.reactivex.Flowable<S> saveAll(Iterable<S> entities)
entities - must not be null.IllegalArgumentException - in case the given entity is null.<S extends T> io.reactivex.Flowable<S> saveAll(io.reactivex.Flowable<S> entityStream)
entityStream - must not be null.IllegalArgumentException - in case the given Publisher is null.io.reactivex.Maybe<T> findById(ID id)
id - must not be null.Maybe.empty() if none found.IllegalArgumentException - if id is null.io.reactivex.Maybe<T> findById(io.reactivex.Single<ID> id)
Single.id - must not be null.Maybe.empty() if none found.IllegalArgumentException - if id is null.io.reactivex.Single<Boolean> existsById(ID id)
id - must not be null.IllegalArgumentException - if id is null.io.reactivex.Single<Boolean> existsById(io.reactivex.Single<ID> id)
Single, exists.id - must not be null.IllegalArgumentException - if id is nullio.reactivex.Flowable<T> findAll()
io.reactivex.Flowable<T> findAllById(Iterable<ID> ids)
ids - must not be null.io.reactivex.Flowable<T> findAllById(io.reactivex.Flowable<ID> idStream)
idStream - must not be null.io.reactivex.Single<Long> count()
io.reactivex.Completable deleteById(ID id)
id - must not be null.IllegalArgumentException - in case the given id is null.io.reactivex.Completable delete(T entity)
entity - must not be null.IllegalArgumentException - in case the given entity is null.io.reactivex.Completable deleteAll(Iterable<? extends T> entities)
entities - must not be null.IllegalArgumentException - in case the given Iterable is null.io.reactivex.Completable deleteAll(io.reactivex.Flowable<? extends T> entityStream)
entityStream - must not be null.IllegalArgumentException - in case the given Flowable is null.io.reactivex.Completable deleteAll()
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.