Interface ReactorCrudRepository<E,ID> 
- Type Parameters:
- E- The entity type
- ID- The ID type
- All Superinterfaces:
- GenericRepository<E,,- ID> - ReactiveStreamsCrudRepository<E,- ID> 
- All Known Subinterfaces:
- ReactorPageableRepository<E,- ID> 
CRUD repository for Project Reactor.
- Since:
- 3.1
- Author:
- graemerocher, Denis Stepanov
- See Also:
- 
Method SummaryModifier and TypeMethodDescription@NonNull reactor.core.publisher.Mono<Long>count()Returns the number of entities available.@NonNull reactor.core.publisher.Mono<Long>Deletes a given entity.@NonNull reactor.core.publisher.Mono<Long>Deletes all entities managed by the repository.@NonNull reactor.core.publisher.Mono<Long>Deletes the given entities.@NonNull reactor.core.publisher.Mono<Long>deleteById(ID id) Deletes the entity with the given id.@NonNull reactor.core.publisher.Mono<Boolean>existsById(ID id) Returns whether an entity with the given id exists.@NonNull reactor.core.publisher.Flux<E>findAll()Returns all instances of the type.@NonNull reactor.core.publisher.Mono<E>Retrieves an entity by its id.<S extends E>
 @NonNull reactor.core.publisher.Mono<S>save(S entity) Saves the given valid entity, returning a possibly new entity representing the saved state.<S extends E>
 @NonNull reactor.core.publisher.Flux<S>Saves all given entities, possibly returning new instances representing the saved state.<S extends E>
 @NonNull reactor.core.publisher.Mono<S>update(S entity) This method issues an explicit update for the given entity.<S extends E>
 @NonNull reactor.core.publisher.Flux<S>This method issues an explicit update for the given entities.
- 
Method Details- 
saveDescription copied from interface:ReactiveStreamsCrudRepositorySaves the given valid entity, returning a possibly new entity representing the saved state.- Specified by:
- savein interface- ReactiveStreamsCrudRepository<E,- ID> 
- Type Parameters:
- S- The generic type
- Parameters:
- entity- The entity to save. Must not be null.
- Returns:
- The saved entity will never be null.
 
- 
saveAll@NonNull <S extends E> @NonNull reactor.core.publisher.Flux<S> saveAll(@NonNull @NonNull Iterable<S> entities) Description copied from interface:ReactiveStreamsCrudRepositorySaves all given entities, possibly returning new instances representing the saved state.- Specified by:
- saveAllin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Type Parameters:
- S- The generic type
- Parameters:
- entities- The entities to saved. Must not be null.
- Returns:
- The saved entities objects. will never be null.
 
- 
updateDescription copied from interface:ReactiveStreamsCrudRepositoryThis method issues an explicit update for the given entity. The method differs fromReactiveStreamsCrudRepository.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.- Specified by:
- updatein interface- ReactiveStreamsCrudRepository<E,- ID> 
- Type Parameters:
- S- The generic type
- Parameters:
- entity- The entity to update. Must not be null.
- Returns:
- The updated entity will never be null.
 
- 
updateAll@NonNull <S extends E> @NonNull reactor.core.publisher.Flux<S> updateAll(@NonNull @NonNull Iterable<S> entities) Description copied from interface:ReactiveStreamsCrudRepositoryThis method issues an explicit update for the given entities. The method differs fromReactiveStreamsCrudRepository.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.- Specified by:
- updateAllin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Type Parameters:
- S- The generic type
- Parameters:
- entities- The entities to update. Must not be null.
- Returns:
- The updated entities will never be null.
 
- 
findByIdDescription copied from interface:ReactiveStreamsCrudRepositoryRetrieves an entity by its id.- Specified by:
- findByIdin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Parameters:
- id- The ID of the entity to retrieve. Must not be null.
- Returns:
- the entity with the given id or Optional#empty() if none found
 
- 
existsByIdDescription copied from interface:ReactiveStreamsCrudRepositoryReturns whether an entity with the given id exists.- Specified by:
- existsByIdin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Parameters:
- id- must not be null.
- Returns:
- true if an entity with the given id exists, false otherwise.
 
- 
findAllDescription copied from interface:ReactiveStreamsCrudRepositoryReturns all instances of the type.- Specified by:
- findAllin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Returns:
- all entities
 
- 
countDescription copied from interface:ReactiveStreamsCrudRepositoryReturns the number of entities available.- Specified by:
- countin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Returns:
- the number of entities
 
- 
deleteByIdDescription copied from interface:ReactiveStreamsCrudRepositoryDeletes the entity with the given id.- Specified by:
- deleteByIdin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Parameters:
- id- must not be null.
- Returns:
- A future that executes the delete operation
 
- 
deleteDescription copied from interface:ReactiveStreamsCrudRepositoryDeletes a given entity.- Specified by:
- deletein interface- ReactiveStreamsCrudRepository<E,- ID> 
- Parameters:
- entity- The entity to delete
- Returns:
- A future that executes the delete operation
 
- 
deleteAll@NonNull @NonNull reactor.core.publisher.Mono<Long> deleteAll(@NonNull @NonNull Iterable<? extends E> entities) Description copied from interface:ReactiveStreamsCrudRepositoryDeletes the given entities.- Specified by:
- deleteAllin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Parameters:
- entities- The entities to delete
- Returns:
- A future that executes the delete operation
 
- 
deleteAllDescription copied from interface:ReactiveStreamsCrudRepositoryDeletes all entities managed by the repository.- Specified by:
- deleteAllin interface- ReactiveStreamsCrudRepository<E,- ID> 
- Returns:
- A future that executes the delete operation
 
 
-