Spring Data Core

org.springframework.data.repository.core
Interface CrudMethods


public interface CrudMethods

Meta-information about the CRUD methods of a repository.

Since:
1.6
Author:
Oliver Gierke

Method Summary
 Method getDeleteMethod()
          Returns the delete method of the repository.
 Method getFindAllMethod()
          Returns the find all method of the repository.
 Method getFindOneMethod()
          Returns the find one method of the repository.
 Method getSaveMethod()
          Returns the method to be used for saving entities.
 boolean hasDelete()
          Returns whether the repository esposes 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

Method getSaveMethod()
Returns the method to be used for saving entities. Usually siganture compatible to CrudRepository.save(Object).

Returns:
the method to save entities or null if noen exposed.
See Also:
hasSaveMethod()

hasSaveMethod

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

Returns:

getFindAllMethod

Method getFindAllMethod()
Returns the find all method of the repository. Implementations should prefer more detailled methods like PagingAndSortingRepository's taking a Pageable or Sort instance.

Returns:
the find all method of the repository or null if not available.
See Also:
hasFindAllMethod()

hasFindAllMethod

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

Returns:

getFindOneMethod

Method getFindOneMethod()
Returns the find one method of the repository. Usually signature compatible to CrudRepository.findOne(java.io.Serializable)

Returns:
the find one method of the repository or null if not available.
See Also:
hasFindOneMethod()

hasFindOneMethod

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

Returns:

getDeleteMethod

Method getDeleteMethod()
Returns the delete method of the repository. Will prefer a delete-by-id method over a delete-by-entity method.

Returns:
the delete method of the repository or null if not available.
See Also:
hasDelete()

hasDelete

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

Returns:

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.