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 forCollectionEntityentities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UUIDcreate(T entity)Creates a new entity.voiddelete(@NotNull UUID key)Deletes an entity by key.booleanexists(@NotNull UUID key)Checks if there is an entity with the key received.Tget(@NotNull UUID key)Retrieves an entity by its key.voidupdate(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.
-
-