Class ItemTagRepository

java.lang.Object
org.ehrbase.repository.experimental.ItemTagRepository

@Repository public class ItemTagRepository extends Object
Repository responsible for ITEM_TAG persistence.
  • Constructor Details

    • ItemTagRepository

      public ItemTagRepository(org.jooq.DSLContext context, TimeProvider timeProvider)
  • Method Details

    • bulkStore

      @Transactional public List<UUID> bulkStore(@NonNull List<ItemTagDto> itemTags)
      Stores the given @ItemTagDtos by performing an Insert for tags without an ItemTagDto.getId() or Update with existence check for tags with an ItemTagDto.getId()
      Parameters:
      itemTags - @ItemTagDtos store using Insert or Update.
      Returns:
      tagIDs Sored ItemTagDto.getId()s.
    • findForOwnerAndTarget

      @Transactional public Collection<ItemTagDto> findForOwnerAndTarget(@NonNull UUID ownerId, @NonNull UUID targetVoId, @NonNull ItemTagDto.ItemTagRMType targetType, @NonNull Collection<UUID> ids, @NonNull Collection<String> keys)
      Search @ItemTagDtos of ownerId, for the latest version of the given targetVoId by applying the optional filter for ids, keys.
      Parameters:
      ownerId - Identifier of owner object, such as EHR.
      targetVoId - VERSIONED_OBJECT<T> Identifier of target.
      targetType - Type of the target object.
      ids - Identifier ItemTag to search for.
      keys - ItemTag keys to search for.
      Returns:
      itemTags ItemTag .
    • bulkDelete

      @Transactional public int bulkDelete(@NonNull UUID ownerId, @NonNull UUID targetVoId, @NonNull ItemTagDto.ItemTagRMType targetType, @NonNull Collection<UUID> ids)
      Bulk delete @ItemTagDtos with the given ids.
      Parameters:
      ids - Identifier of ItemTag to delete.
    • adminDelete

      @Transactional public void adminDelete(UUID targetId, ItemTagDto.ItemTagRMType targetType)
    • adminDeleteAll

      @Transactional public void adminDeleteAll(UUID ehrId)