Package org.gbif.api.service.collections
Interface CollectionEntityService<T extends CollectionEntity>
-
- All Superinterfaces:
CommentService
,ContactService
,CrudService<T>
,IdentifierService
,MachineTagService
,OccurrenceMappingService
,PrimaryIdentifierService
,TagService
- All Known Subinterfaces:
CollectionService
,InstitutionService
public interface CollectionEntityService<T extends CollectionEntity> extends CrudService<T>, PrimaryIdentifierService, TagService, MachineTagService, CommentService, ContactService, OccurrenceMappingService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addMasterSourceMetadata(UUID targetEntityKey, MasterSourceMetadata masterSourceMetadata)
AddsMasterSourceMetadata
to an entity.void
deleteMasterSourceMetadata(UUID targetEntityKey)
Removes theMasterSourceMetadata
from an entity.List<T>
findByMasterSource(Source source, String sourceId)
Finds the collection entity whose master data metadata matches with the parameters received.MasterSourceMetadata
getMasterSourceMetadata(@NotNull UUID targetEntityKey)
Returns theMasterSourceMetadata
of the entity.void
replace(UUID entityToReplaceKey, UUID replacementKey)
Replaces a entity with another.void
update(T entity, boolean lockFields)
Updates an existing entity.-
Methods inherited from interface org.gbif.api.service.registry.CommentService
addComment, deleteComment, listComments
-
Methods inherited from interface org.gbif.api.service.collections.ContactService
addContactPerson, addSuggestionContacts, listContactPersons, removeContactPerson, replaceContactPersons, updateContactPerson
-
Methods inherited from interface org.gbif.api.service.collections.CrudService
create, delete, exists, get, update
-
Methods inherited from interface org.gbif.api.service.registry.IdentifierService
addIdentifier, deleteIdentifier, listIdentifiers
-
Methods inherited from interface org.gbif.api.service.registry.MachineTagService
addMachineTag, addMachineTag, addMachineTag, deleteMachineTag, deleteMachineTags, deleteMachineTags, deleteMachineTags, deleteMachineTags, listMachineTags
-
Methods inherited from interface org.gbif.api.service.collections.OccurrenceMappingService
addOccurrenceMapping, deleteOccurrenceMapping, listOccurrenceMappings
-
Methods inherited from interface org.gbif.api.service.registry.PrimaryIdentifierService
updateIdentifier
-
Methods inherited from interface org.gbif.api.service.registry.TagService
addTag, addTag, deleteTag, listTags
-
-
-
-
Method Detail
-
replace
void replace(UUID entityToReplaceKey, UUID replacementKey)
Replaces a entity with another. The entity replaced is also deleted.
-
addMasterSourceMetadata
int addMasterSourceMetadata(UUID targetEntityKey, MasterSourceMetadata masterSourceMetadata)
AddsMasterSourceMetadata
to an entity.- Parameters:
targetEntityKey
- key of the entity to add the metadata tomasterSourceMetadata
- metadata to add- Returns:
- key of the created metadata
-
deleteMasterSourceMetadata
void deleteMasterSourceMetadata(UUID targetEntityKey)
Removes theMasterSourceMetadata
from an entity.- Parameters:
targetEntityKey
- key of the entity whose metadata will be deleted
-
getMasterSourceMetadata
MasterSourceMetadata getMasterSourceMetadata(@NotNull @NotNull UUID targetEntityKey)
Returns theMasterSourceMetadata
of the entity.- Parameters:
targetEntityKey
- key of the entity- Returns:
MasterSourceMetadata
-
findByMasterSource
List<T> findByMasterSource(Source source, String sourceId)
Finds the collection entity whose master data metadata matches with the parameters received.- Parameters:
source
- source of the metadatasourceId
- source Id of the metadata- Returns:
Optional
with the collection entity found
-
-