org.springframework.data.repository.core

## 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 Summary

All Methods Instance Methods Abstract Methods
`Optional<Method>` `getDeleteMethod()` Returns the delete method of the repository.
`Optional<Method>` `getFindAllMethod()` Returns the find all method of the repository.
`Optional<Method>` `getFindOneMethod()` Returns the find one method of the repository.
`Optional<Method>` `getSaveMethod()` Returns the method to be used for saving entities.
`boolean` `hasDelete()` Returns whether the repository exposes a delete method.
`boolean` `hasFindAllMethod()` Returns whether the repository exposes a find all method at all.
`boolean` `hasFindOneMethod()` Returns whether the repository exposes a find one method.
`boolean` `hasSaveMethod()` Returns whether the repository exposes a save method at all.

### Method Detail

#### 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()`

#### 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()`

#### 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()`

#### 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()`

#### hasDelete

    boolean hasDelete()

Returns whether the repository exposes a delete method.

Returns: