T - Type of an entityID - Type of Identifier of an entitypublic interface ResourceRepository<T,ID extends Serializable>
| Modifier and Type | Method and Description |
|---|---|
void |
delete(ID id)
Removes a resource identified by id parameter.
|
Iterable<T> |
findAll(Iterable<ID> ids,
RequestParams requestParams)
Search for resources constrained by a list of identifiers.
|
Iterable<T> |
findAll(RequestParams requestParams)
Search for all of the resources.
|
T |
findOne(ID id,
RequestParams requestParams)
Search one resource with a given ID.
|
<S extends T> |
save(S entity)
Saves a resource.
|
T findOne(ID id, RequestParams requestParams)
ResourceNotFoundException
exception should be thrown.id - an identifier of the resourcerequestParams - parameters sent along with the requestIterable<T> findAll(RequestParams requestParams)
RequestParams can be used if necessary. If no
resources can be found an empty Iterable or null must be returned.requestParams - parameters send with the requestIterable<T> findAll(Iterable<ID> ids, RequestParams requestParams)
RequestParams can be used if
necessary. If no resources can be found an empty Iterable or null must be returned.ids - an Iterable of passed resource identifiersrequestParams - parameters send with the request<S extends T> S save(S entity)
S - type of the resourceentity - resource to be savedvoid delete(ID id)
id - identified of the resource to be removedCopyright © 2015. All Rights Reserved.