Package org.gbif.api.service.collections
Interface CrudService<T extends CollectionEntity>
- All Known Subinterfaces:
CollectionEntityService<T>
,CollectionService
,InstitutionService
public interface CrudService<T extends CollectionEntity>
Base CRUD service for
CollectionEntity
entities.-
Method Summary
Modifier and TypeMethodDescriptionCreates a new entity.void
Deletes an entity by key.boolean
Checks if there is an entity with the key received.Retrieves an entity by its key.void
Updates an existing entity.
-
Method Details
-
create
Creates a new entity.- Parameters:
entity
- to create- Returns:
- UUID of the created entity.
-
delete
Deletes an entity by key.- Parameters:
key
- of the entity to be deleted.
-
get
Retrieves an entity by its key.- Parameters:
key
- of the entity to be retrieved.- Returns:
- the entity
-
update
Updates an existing entity.- Parameters:
entity
- that will replace the existing entity.
-
exists
Checks if there is an entity with the key received.- Parameters:
key
- of the entity to be retrieved.- Returns:
- true if found, false otherwise
-