Interface CollectionEntityService<T extends CollectionEntity>

All Superinterfaces:
CommentService, ContactService, CrudService<T>, IdentifierService, MachineTagService, OccurrenceMappingService, PrimaryIdentifierService, TagService
All Known Subinterfaces:
CollectionService, InstitutionService

  • Method Details

    • 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)
      Adds MasterSourceMetadata to an entity.
      Parameters:
      targetEntityKey - key of the entity to add the metadata to
      masterSourceMetadata - metadata to add
      Returns:
      key of the created metadata
    • deleteMasterSourceMetadata

      void deleteMasterSourceMetadata(UUID targetEntityKey)
      Removes the MasterSourceMetadata from an entity.
      Parameters:
      targetEntityKey - key of the entity whose metadata will be deleted
    • getMasterSourceMetadata

      MasterSourceMetadata getMasterSourceMetadata(@NotNull @NotNull UUID targetEntityKey)
      Returns the MasterSourceMetadata 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 metadata
      sourceId - source Id of the metadata
      Returns:
      Optional with the collection entity found
    • update

      void update(@NotNull @Valid T entity, boolean lockFields)
      Updates an existing entity.
      Parameters:
      entity - that will replace the existing entity.
      lockFields - indicates if fields that come from an external master source has to be locked.