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 forCollectionEntity
entities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UUID
create(T entity)
Creates a new entity.void
delete(@NotNull UUID key)
Deletes an entity by key.boolean
exists(@NotNull UUID key)
Checks if there is an entity with the key received.T
get(@NotNull UUID key)
Retrieves an entity by its key.void
update(T entity)
Updates an existing entity.
-
-
-
Method Detail
-
create
UUID create(@NotNull @Valid T entity)
Creates a new entity.- Parameters:
entity
- to create- Returns:
- UUID of the created entity.
-
delete
void delete(@NotNull @NotNull UUID key)
Deletes an entity by key.- Parameters:
key
- of the entity to be deleted.
-
get
T get(@NotNull @NotNull UUID key)
Retrieves an entity by its key.- Parameters:
key
- of the entity to be retrieved.- Returns:
- the entity
-
update
void update(@NotNull @Valid T entity)
Updates an existing entity.- Parameters:
entity
- that will replace the existing entity.
-
-