public class DefaultCrudMethods extends Object implements CrudMethods
RepositoryMetadata. Will detect methods
exposed in CrudRepository but also hand crafted CRUD methods that are signature compatible with the ones on
CrudRepository.| Constructor and Description |
|---|
DefaultCrudMethods(RepositoryMetadata metadata)
Creates a new
DefaultCrudMethods using the given RepositoryMetadata. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public DefaultCrudMethods(RepositoryMetadata metadata)
DefaultCrudMethods using the given RepositoryMetadata.metadata - must not be null.public Method getSaveMethod()
CrudMethodsCrudRepository.save(Object).getSaveMethod in interface CrudMethodsCrudMethods.hasSaveMethod()public boolean hasSaveMethod()
CrudMethodshasSaveMethod in interface CrudMethodspublic Method getFindAllMethod()
CrudMethodsPagingAndSortingRepository's taking a Pageable or Sort instance.getFindAllMethod in interface CrudMethodsCrudMethods.hasFindAllMethod()public boolean hasFindAllMethod()
CrudMethodshasFindAllMethod in interface CrudMethodspublic Method getFindOneMethod()
CrudMethodsCrudRepository.findOne(java.io.Serializable)getFindOneMethod in interface CrudMethodsCrudMethods.hasFindOneMethod()public boolean hasFindOneMethod()
CrudMethodshasFindOneMethod in interface CrudMethodspublic boolean hasDelete()
CrudMethodshasDelete in interface CrudMethodspublic Method getDeleteMethod()
CrudMethodsgetDeleteMethod in interface CrudMethodsCrudMethods.hasDelete()Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.