Interface CrudMethods

All Known Implementing Classes:
DefaultCrudMethods

public interface CrudMethods
Meta-information about the CRUD methods of a repository.
Since:
1.6
Author:
Oliver Gierke
  • Method Details

    • getSaveMethod

      Optional<Method> getSaveMethod()
      Returns the method to be used for saving entities. Usually signature compatible to CrudRepository.save(Object).
      Returns:
      the method to save entities or Optional.empty() if none exposed.
      See Also:
    • hasSaveMethod

      boolean hasSaveMethod()
      Returns whether the repository exposes a save method at all.
      Returns:
    • getFindAllMethod

      Optional<Method> getFindAllMethod()
      Returns the find all method of the repository. Implementations should prefer more detailed methods like PagingAndSortingRepository's taking a Pageable or Sort instance.
      Returns:
      the find all method of the repository or Optional.empty() if not available.
      See Also:
    • hasFindAllMethod

      boolean hasFindAllMethod()
      Returns whether the repository exposes a find all method at all.
      Returns:
    • getFindOneMethod

      Optional<Method> getFindOneMethod()
      Returns the find one method of the repository. Usually signature compatible to CrudRepository.findById(Object)
      Returns:
      the find one method of the repository or Optional.empty() if not available.
      See Also:
    • hasFindOneMethod

      boolean hasFindOneMethod()
      Returns whether the repository exposes a find one method.
      Returns:
    • getDeleteMethod

      Optional<Method> getDeleteMethod()
      Returns the delete method of the repository. Will prefer a delete-by-entity method over a delete-by-id method.
      Returns:
      the delete method of the repository or Optional.empty() if not available.
      See Also:
    • hasDelete

      boolean hasDelete()
      Returns whether the repository exposes a delete method.
      Returns: