Interface ResourceIngestionDefinitionRepository<R extends ResourceIngestionDefinition<?,​?,​?,​?>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      long countEnabled()
      Counts all resource ingestion definitions which have the ingestion for the resource enabled.
      Optional<R> fetch​(String id)
      Fetches a resource ingestion definition with the specified id.
      default List<R> fetchAll()
      Fetches all resource ingestion definitions.
      List<R> fetchAllById​(List<String> ids)
      Fetches all resource ingestion definitions with resource ingestion definition id contained within the specified list of ids.
      List<R> fetchAllEnabled()
      Fetches all resource ingestion definitions which have the ingestion for the resource enabled.
      List<R> fetchAllWhere​(Column condition)
      Fetches all resource ingestion definitions satisfying the specified condition.
      Optional<R> fetchByResourceId​(Object resourceId)
      Fetches a resource ingestion definition with the specified resource id.
      void save​(R resource)
      Saves the specified resource ingestion definition.
      void saveMany​(List<R> resources)
      Saves the specified resource ingestion definitions.
    • Method Detail

      • fetch

        Optional<R> fetch​(String id)
        Fetches a resource ingestion definition with the specified id.
        Parameters:
        id - resource ingestion definition id
        Returns:
        resource ingestion definition with the specified id
      • fetchByResourceId

        Optional<R> fetchByResourceId​(Object resourceId)
        Fetches a resource ingestion definition with the specified resource id.
        Parameters:
        resourceId - properties which identify the resource in the source system
        Returns:
        resource ingestion definition with the specified resource id
        Throws:
        VariantMapperException - if the fetched object cannot be deserialized to the definition class of this repository
      • fetchAllById

        List<R> fetchAllById​(List<String> ids)
        Fetches all resource ingestion definitions with resource ingestion definition id contained within the specified list of ids.
        Parameters:
        ids - resource ingestion definition ids
        Returns:
        a list containing resource ingestion definitions matching the specified criteria
        Throws:
        VariantMapperException - if the fetched object cannot be deserialized to the definition class of this repository
      • fetchAllEnabled

        List<R> fetchAllEnabled()
        Fetches all resource ingestion definitions which have the ingestion for the resource enabled.
        Returns:
        a list containing resource ingestion definitions matching the specified criteria
        Throws:
        VariantMapperException - if the fetched object cannot be deserialized to the definition class of this repository
      • fetchAllWhere

        List<R> fetchAllWhere​(Column condition)
        Fetches all resource ingestion definitions satisfying the specified condition.
        Parameters:
        condition - resource ingestion definition condition
        Returns:
        all resource ingestion definitions satisfying the specified condition
        Throws:
        VariantMapperException - if the fetched object cannot be deserialized to the definition class of this repository
      • fetchAll

        default List<R> fetchAll()
        Fetches all resource ingestion definitions.
        Returns:
        all resource ingestion definitions
      • countEnabled

        long countEnabled()
        Counts all resource ingestion definitions which have the ingestion for the resource enabled.
        Returns:
        number of resource ingestion definitions which have the ingestion for the resource enabled
      • save

        void save​(R resource)
        Saves the specified resource ingestion definition.

        If a definition with a specific resource ingestion definition id does not exist - it will be created. If such definition already exists - it will be updated.

        Parameters:
        resource - resource ingestion definition
        Throws:
        ResourceIngestionDefinitionValidationException - if validation of the specified resource ingestion definition failed
      • saveMany

        void saveMany​(List<R> resources)
        Saves the specified resource ingestion definitions.

        If a definition with a specific resource ingestion definition id does not exist - it will be created. If such definition already exists - it will be updated.

        Parameters:
        resources - resource ingestion definitions
        Throws:
        ResourceIngestionDefinitionValidationException - if validation of the specified resource ingestion definitions failed