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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Integer
getCodeSystemId(String codeSystem)
Get the database id for the named code-system.Long
getCommonTokenValueId(String codeSystem, String tokenValue)
Get the common_token_value_id for the given tokenValue and codeSystem.List<Long>
getCommonTokenValueIdList(String tokenValue)
Get a list of matching common_token_value_id values.Integer
getParameterNameId(String parameterName)
Get the database id for the given parameter name.Integer
getResourceTypeId(String resourceType)
Get the database id for the named resourceType.
-
-
-
Method Detail
-
getResourceTypeId
Integer getResourceTypeId(String resourceType) throws FHIRPersistenceException
Get the database id for the named resourceType. Reads from a cache or database if required.- Parameters:
resourceType
-- Returns:
- Throws:
FHIRPersistenceException
-
getCodeSystemId
Integer getCodeSystemId(String codeSystem) throws FHIRPersistenceException
Get the database id for the named code-system. Creates new records if necessary- Parameters:
codeSystem
-- Returns:
- Throws:
FHIRPersistenceException
-
getParameterNameId
Integer getParameterNameId(String parameterName) throws FHIRPersistenceException
Get the database id for the given parameter name. Creates new records if necessary.- Parameters:
parameterName
-- Returns:
- Throws:
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
-
-
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:
-
-