Interface JDBCIdentityCache

  • All Known Implementing Classes:
    JDBCIdentityCacheImpl

    public interface JDBCIdentityCache
    Provides access to all the identity information we need when processing resources and their parameters
    • Method Detail

      • getResourceTypeId

        Integer getResourceTypeId​(String resourceType)
                           throws com.ibm.fhir.persistence.exception.FHIRPersistenceException
        Get the database id for the named resourceType. Reads from a cache or database if required.
        Parameters:
        resourceType -
        Returns:
        Throws:
        com.ibm.fhir.persistence.exception.FHIRPersistenceException
      • getResourceTypeName

        String getResourceTypeName​(Integer resourceTypeId)
                            throws com.ibm.fhir.persistence.exception.FHIRPersistenceException
        Get the resource type name for the resourceTypeId. Reads from a cache or database if required.
        Parameters:
        resourceTypeId -
        Returns:
        Throws:
        com.ibm.fhir.persistence.exception.FHIRPersistenceException
      • getCodeSystemId

        Integer getCodeSystemId​(String codeSystem)
                         throws com.ibm.fhir.persistence.exception.FHIRPersistenceException
        Get the database id for the named code-system. Creates new records if necessary
        Parameters:
        codeSystem -
        Returns:
        Throws:
        com.ibm.fhir.persistence.exception.FHIRPersistenceException
      • getCanonicalId

        Integer getCanonicalId​(String canonicalValue)
                        throws com.ibm.fhir.persistence.exception.FHIRPersistenceException
        Get the database id for the given canonical value. Read only. If the value does not exist, -1 is returned.
        Parameters:
        canonicalValue -
        Returns:
        Throws:
        com.ibm.fhir.persistence.exception.FHIRPersistenceException
      • getParameterNameId

        Integer getParameterNameId​(String parameterName)
                            throws com.ibm.fhir.persistence.exception.FHIRPersistenceException
        Get the database id for the given parameter name. Creates new records if necessary.
        Parameters:
        parameterName -
        Returns:
        Throws:
        com.ibm.fhir.persistence.exception.FHIRPersistenceException
      • getCommonTokenValueId

        Long getCommonTokenValueId​(String codeSystem,
                                   String tokenValue)
        Get the common_token_value_id for the given tokenValue and codeSystem. Reads from a cache, or the database if not found in the cache.
        Parameters:
        codeSystem -
        tokenValue -
        Returns:
        The common token value id or null if it doesn't exist
      • getCommonTokenValueIds

        Set<Long> getCommonTokenValueIds​(Collection<CommonTokenValue> tokenValues)
        Get the common_token_value_ids for the given tokenValues. Reads from a cache, or the database if not found in the cache. CommonTokenValues with no corresponding record in the database will be omitted from the result set.
        Parameters:
        tokenValues -
        Returns:
        A non-null, possibly-empty set of common token value ids
      • getCommonTokenValueIdList

        List<Long> getCommonTokenValueIdList​(String tokenValue)
        Get a list of matching common_token_value_id values. Implementations may decide to cache, but only if the cache can be invalidated when the list changes due to ingestion. The simplest approach is to always read from the database. The performance benefit to the FHIR search query this is being used for is orders of magnitude greater than the cost of this query (think 80+ seconds to 250 milliseconds improvement in search query time).
        Parameters:
        tokenValue -
        Returns:
      • getResourceTypeNames

        List<String> getResourceTypeNames()
                                   throws com.ibm.fhir.persistence.exception.FHIRPersistenceException
        Get the list of all resource type names.
        Returns:
        Throws:
        com.ibm.fhir.persistence.exception.FHIRPersistenceException
      • getResourceTypeIds

        List<Integer> getResourceTypeIds()
                                  throws com.ibm.fhir.persistence.exception.FHIRPersistenceException
        Get the list of all resource type ids.
        Returns:
        Throws:
        com.ibm.fhir.persistence.exception.FHIRPersistenceException