E - The entity typeID - The ID typepublic interface ReactorCrudRepository<E,ID> extends ReactiveStreamsCrudRepository<E,ID>
ReactiveStreamsCrudRepository| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<java.lang.Long> |
count()
Returns the number of entities available.
|
reactor.core.publisher.Mono<java.lang.Long> |
delete(E entity)
Deletes a given entity.
|
reactor.core.publisher.Mono<java.lang.Long> |
deleteAll()
Deletes all entities managed by the repository.
|
reactor.core.publisher.Mono<java.lang.Long> |
deleteAll(@NotNull java.lang.Iterable<? extends E> entities)
Deletes the given entities.
|
reactor.core.publisher.Mono<java.lang.Long> |
deleteById(ID id)
Deletes the entity with the given id.
|
reactor.core.publisher.Mono<java.lang.Boolean> |
existsById(ID id)
Returns whether an entity with the given id exists.
|
reactor.core.publisher.Flux<E> |
findAll()
Returns all instances of the type.
|
reactor.core.publisher.Mono<E> |
findById(ID id)
Retrieves an entity by its id.
|
<S extends E> |
save(S entity)
Saves the given valid entity, returning a possibly new entity representing the saved state.
|
<S extends E> |
saveAll(@Valid @NotNull java.lang.Iterable<S> entities)
Saves all given entities, possibly returning new instances representing the saved state.
|
<S extends E> |
update(S entity)
This method issues an explicit update for the given entity.
|
<S extends E> |
updateAll(@Valid @NotNull java.lang.Iterable<S> entities)
This method issues an explicit update for the given entities.
|
@NonNull <S extends E> reactor.core.publisher.Mono<S> save(@NonNull @Valid @NotNull S entity)
ReactiveStreamsCrudRepositorysave in interface ReactiveStreamsCrudRepository<E,ID>S - The generic typeentity - The entity to save. Must not be null.@NonNull <S extends E> reactor.core.publisher.Flux<S> saveAll(@NonNull @Valid @NotNull @Valid @NotNull java.lang.Iterable<S> entities)
ReactiveStreamsCrudRepositorysaveAll in interface ReactiveStreamsCrudRepository<E,ID>S - The generic typeentities - The entities to saved. Must not be null.@NonNull <S extends E> reactor.core.publisher.Mono<S> update(@NonNull @Valid @NotNull S entity)
ReactiveStreamsCrudRepositoryReactiveStreamsCrudRepository.save(Object) in that an update will be generated regardless if the entity has been saved previously or not. If the entity has no assigned ID then an exception will be thrown.update in interface ReactiveStreamsCrudRepository<E,ID>S - The generic typeentity - The entity to update. Must not be null.@NonNull <S extends E> reactor.core.publisher.Flux<S> updateAll(@NonNull @Valid @NotNull @Valid @NotNull java.lang.Iterable<S> entities)
ReactiveStreamsCrudRepositoryReactiveStreamsCrudRepository.saveAll(Iterable) in that an update will be generated regardless if the entity has been saved previously or not. If the entity has no assigned ID then an exception will be thrown.updateAll in interface ReactiveStreamsCrudRepository<E,ID>S - The generic typeentities - The entities to update. Must not be null.@NonNull reactor.core.publisher.Mono<E> findById(@NonNull @NotNull ID id)
ReactiveStreamsCrudRepositoryfindById in interface ReactiveStreamsCrudRepository<E,ID>id - The ID of the entity to retrieve. Must not be null.@NonNull
reactor.core.publisher.Mono<java.lang.Boolean> existsById(@NonNull @NotNull
ID id)
ReactiveStreamsCrudRepositoryexistsById in interface ReactiveStreamsCrudRepository<E,ID>id - must not be null.@NonNull reactor.core.publisher.Flux<E> findAll()
ReactiveStreamsCrudRepositoryfindAll in interface ReactiveStreamsCrudRepository<E,ID>@NonNull reactor.core.publisher.Mono<java.lang.Long> count()
ReactiveStreamsCrudRepositorycount in interface ReactiveStreamsCrudRepository<E,ID>@NonNull
reactor.core.publisher.Mono<java.lang.Long> deleteById(@NonNull @NotNull
ID id)
ReactiveStreamsCrudRepositorydeleteById in interface ReactiveStreamsCrudRepository<E,ID>id - must not be null.@NonNull
reactor.core.publisher.Mono<java.lang.Long> delete(@NonNull @NotNull
E entity)
ReactiveStreamsCrudRepositorydelete in interface ReactiveStreamsCrudRepository<E,ID>entity - The entity to delete@NonNull
reactor.core.publisher.Mono<java.lang.Long> deleteAll(@NonNull @NotNull
@NotNull java.lang.Iterable<? extends E> entities)
ReactiveStreamsCrudRepositorydeleteAll in interface ReactiveStreamsCrudRepository<E,ID>entities - The entities to delete@NonNull reactor.core.publisher.Mono<java.lang.Long> deleteAll()
ReactiveStreamsCrudRepositorydeleteAll in interface ReactiveStreamsCrudRepository<E,ID>