Package org.gbif.api.service.common
Interface CrudService<T,W,K>
- Type Parameters:
T
- The complete entity classW
- The writable entity class, can be the same as TK
- The primary key class of the entity
public interface CrudService<T,W,K>
A generic CRUD service interface for any writable entity.
-
Method Summary
-
Method Details
-
create
Persists a new entity.- Parameters:
entity
- to create.- Returns:
- The persisted entity.
-
delete
Deletes the entity.- Parameters:
key
- The entity key to delete.
-
get
Get an entity by its unique key.- Returns:
- the entity or null if not existing.
-
list
Lists all entity.- Parameters:
page
- to enable paging.- Returns:
- The pagable list of entities.
-
update
Updates the entity.- Parameters:
entity
- to update
-