public interface RepositoryInvoker extends RepositoryInvocationInformation
RepositoryInvocationInformation.| Modifier and Type | Method and Description |
|---|---|
void |
invokeDeleteById(Object id)
Invokes the method equivalent to
CrudRepository.deleteById(Object). |
Iterable<Object> |
invokeFindAll(Pageable pageable)
Invokes the find-all method of the underlying repository using the method taking a
Pageable as parameter if
available (i.e. the equivalent to
PagingAndSortingRepository.findAll(Pageable)), using the method taking
a Sort if available (i.e. the equivalent to
PagingAndSortingRepository.findAll(Sort) by extracting the Sort
contained in the given Pageable) or the plain equivalent to
CrudRepository.findAll(). |
Iterable<Object> |
invokeFindAll(Sort sort)
Invokes the find-all method of the underlying repository using the method taking a
Sort as parameter if
available (i.e. the equivalent to
PagingAndSortingRepository.findAll(Sort)) or the plain equivalent to
CrudRepository.findAll(). |
<T> Optional<T> |
invokeFindById(Object id)
Invokes the method equivalent to
CrudRepository.findById(Object). |
Optional<Object> |
invokeQueryMethod(Method method,
MultiValueMap<String,? extends Object> parameters,
Pageable pageable,
Sort sort)
|
<T> T |
invokeSave(T object)
Invokes the method equivalent to
CrudRepository.save(Object) on the
repository. |
hasDeleteMethod, hasFindAllMethod, hasFindOneMethod, hasSaveMethod<T> T invokeSave(T object)
CrudRepository.save(Object) on the
repository.object - IllegalStateException - if the repository does not expose a save method.<T> Optional<T> invokeFindById(Object id)
CrudRepository.findById(Object).id - must not be null.IllegalStateException - if the repository does not expose a find-one-method.Iterable<Object> invokeFindAll(Pageable pageable)
Pageable as parameter if
available (i.e. the equivalent to
PagingAndSortingRepository.findAll(Pageable)), using the method taking
a Sort if available (i.e. the equivalent to
PagingAndSortingRepository.findAll(Sort) by extracting the Sort
contained in the given Pageable) or the plain equivalent to
CrudRepository.findAll().pageable - can be null.IllegalStateException - if the repository does not expose a find-all-method.Iterable<Object> invokeFindAll(Sort sort)
Sort as parameter if
available (i.e. the equivalent to
PagingAndSortingRepository.findAll(Sort)) or the plain equivalent to
CrudRepository.findAll().pageable - can be null.IllegalStateException - if the repository does not expose a find-all-method.void invokeDeleteById(Object id)
CrudRepository.deleteById(Object). The
given id is assumed to be of a type convertible into the actual identifier type of the backing repository.id - must not be null.{@link - IllegalStateException} if the repository does not expose a delete-method.Optional<Object> invokeQueryMethod(Method method, MultiValueMap<String,? extends Object> parameters, Pageable pageable, Sort sort)
method - must not be null.parameters - must not be null.pageable - must not be null.sort - must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.