Class JDBCParameterCacheAdapter
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.jdbc.util.JDBCParameterCacheAdapter
-
- All Implemented Interfaces:
IParameterIdentityCache
public class JDBCParameterCacheAdapter extends java.lang.Object implements IParameterIdentityCache
An adapter to implement theIParameterIdentityCacheusing theFHIRPersistenceJDBCCache
-
-
Constructor Summary
Constructors Constructor Description JDBCParameterCacheAdapter(FHIRPersistenceJDBCCache cache)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCodeSystem(java.lang.String codeSystem, int codeSystemId)Add the code system value to the cachevoidaddCommonCanonicalValue(short shardKey, java.lang.String url, long commonCanonicalValueId)Add the common canonical value to the cachevoidaddCommonTokenValue(short shardKey, java.lang.String codeSystem, int codeSystemId, java.lang.String tokenValue, long commonTokenValueId)Add the common token value to the cache.voidaddLogicalResourceIdent(java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId)Add the logical_resource_ident mapping to the cachevoidaddParameterName(java.lang.String parameterName, int parameterNameId)Add the given parameterName to parameterNameId mapping to the cachejava.lang.IntegergetCodeSystemId(java.lang.String codeSystem)Get the code_system_id value for the given codeSystem valuejava.lang.LonggetCommonCanonicalValueId(short shardKey, java.lang.String url)java.lang.LonggetCommonTokenValueId(short shardKey, java.lang.String codeSystem, java.lang.String tokenValue)Get the common_token_value_id for the given codeSystem and tokenValuejava.lang.LonggetLogicalResourceIdentId(java.lang.String resourceType, java.lang.String logicalId)Get the database logical_resource_id for the given resourceType/logicalId tuple.java.lang.IntegergetParameterNameId(java.lang.String parameterName)Get the parameter_name_id value for the given parameterNameintgetResourceTypeId(java.lang.String resourceType)Get the database resource_type_id value for the given resourceType value
-
-
-
Constructor Detail
-
JDBCParameterCacheAdapter
public JDBCParameterCacheAdapter(FHIRPersistenceJDBCCache cache)
Public constructor- Parameters:
cache-
-
-
Method Detail
-
getParameterNameId
public java.lang.Integer getParameterNameId(java.lang.String parameterName)
Description copied from interface:IParameterIdentityCacheGet the parameter_name_id value for the given parameterName- Specified by:
getParameterNameIdin interfaceIParameterIdentityCache- Returns:
- the parameter_name_id or null if the value is not found in the cache
-
getCodeSystemId
public java.lang.Integer getCodeSystemId(java.lang.String codeSystem)
Description copied from interface:IParameterIdentityCacheGet the code_system_id value for the given codeSystem value- Specified by:
getCodeSystemIdin interfaceIParameterIdentityCache- Returns:
- the code_system_id or null if the value is not found in the cache
-
getCommonTokenValueId
public java.lang.Long getCommonTokenValueId(short shardKey, java.lang.String codeSystem, java.lang.String tokenValue)Description copied from interface:IParameterIdentityCacheGet the common_token_value_id for the given codeSystem and tokenValue- Specified by:
getCommonTokenValueIdin interfaceIParameterIdentityCache- Returns:
- the common_token_value_id or null if the value is not found in the cache
-
addParameterName
public void addParameterName(java.lang.String parameterName, int parameterNameId)Description copied from interface:IParameterIdentityCacheAdd the given parameterName to parameterNameId mapping to the cache- Specified by:
addParameterNamein interfaceIParameterIdentityCache
-
getCommonCanonicalValueId
public java.lang.Long getCommonCanonicalValueId(short shardKey, java.lang.String url)- Specified by:
getCommonCanonicalValueIdin interfaceIParameterIdentityCache- Returns:
-
addCommonCanonicalValue
public void addCommonCanonicalValue(short shardKey, java.lang.String url, long commonCanonicalValueId)Description copied from interface:IParameterIdentityCacheAdd the common canonical value to the cache- Specified by:
addCommonCanonicalValuein interfaceIParameterIdentityCache
-
addCommonTokenValue
public void addCommonTokenValue(short shardKey, java.lang.String codeSystem, int codeSystemId, java.lang.String tokenValue, long commonTokenValueId)Description copied from interface:IParameterIdentityCacheAdd the common token value to the cache.- Specified by:
addCommonTokenValuein interfaceIParameterIdentityCache
-
addCodeSystem
public void addCodeSystem(java.lang.String codeSystem, int codeSystemId)Description copied from interface:IParameterIdentityCacheAdd the code system value to the cache- Specified by:
addCodeSystemin interfaceIParameterIdentityCache
-
getResourceTypeId
public int getResourceTypeId(java.lang.String resourceType)
Description copied from interface:IParameterIdentityCacheGet the database resource_type_id value for the given resourceType value- Specified by:
getResourceTypeIdin interfaceIParameterIdentityCache- Returns:
-
getLogicalResourceIdentId
public java.lang.Long getLogicalResourceIdentId(java.lang.String resourceType, java.lang.String logicalId)Description copied from interface:IParameterIdentityCacheGet the database logical_resource_id for the given resourceType/logicalId tuple.- Specified by:
getLogicalResourceIdentIdin interfaceIParameterIdentityCache- Returns:
-
addLogicalResourceIdent
public void addLogicalResourceIdent(java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId)Description copied from interface:IParameterIdentityCacheAdd the logical_resource_ident mapping to the cache- Specified by:
addLogicalResourceIdentin interfaceIParameterIdentityCache
-
-