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 theIParameterIdentityCache
using theFHIRPersistenceJDBCCache
-
-
Constructor Summary
Constructors Constructor Description JDBCParameterCacheAdapter(FHIRPersistenceJDBCCache cache)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCodeSystem(java.lang.String codeSystem, int codeSystemId)
Add the code system value to the cachevoid
addCommonCanonicalValue(short shardKey, java.lang.String url, long commonCanonicalValueId)
Add the common canonical value to the cachevoid
addCommonTokenValue(short shardKey, java.lang.String codeSystem, int codeSystemId, java.lang.String tokenValue, long commonTokenValueId)
Add the common token value to the cache.void
addLogicalResourceIdent(java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId)
Add the logical_resource_ident mapping to the cachevoid
addParameterName(java.lang.String parameterName, int parameterNameId)
Add the given parameterName to parameterNameId mapping to the cachejava.lang.Integer
getCodeSystemId(java.lang.String codeSystem)
Get the code_system_id value for the given codeSystem valuejava.lang.Long
getCommonCanonicalValueId(short shardKey, java.lang.String url)
java.lang.Long
getCommonTokenValueId(short shardKey, java.lang.String codeSystem, java.lang.String tokenValue)
Get the common_token_value_id for the given codeSystem and tokenValuejava.lang.Long
getLogicalResourceIdentId(java.lang.String resourceType, java.lang.String logicalId)
Get the database logical_resource_id for the given resourceType/logicalId tuple.java.lang.Integer
getParameterNameId(java.lang.String parameterName)
Get the parameter_name_id value for the given parameterNameint
getResourceTypeId(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:IParameterIdentityCache
Get the parameter_name_id value for the given parameterName- Specified by:
getParameterNameId
in 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:IParameterIdentityCache
Get the code_system_id value for the given codeSystem value- Specified by:
getCodeSystemId
in 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:IParameterIdentityCache
Get the common_token_value_id for the given codeSystem and tokenValue- Specified by:
getCommonTokenValueId
in 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:IParameterIdentityCache
Add the given parameterName to parameterNameId mapping to the cache- Specified by:
addParameterName
in interfaceIParameterIdentityCache
-
getCommonCanonicalValueId
public java.lang.Long getCommonCanonicalValueId(short shardKey, java.lang.String url)
- Specified by:
getCommonCanonicalValueId
in interfaceIParameterIdentityCache
- Returns:
-
addCommonCanonicalValue
public void addCommonCanonicalValue(short shardKey, java.lang.String url, long commonCanonicalValueId)
Description copied from interface:IParameterIdentityCache
Add the common canonical value to the cache- Specified by:
addCommonCanonicalValue
in interfaceIParameterIdentityCache
-
addCommonTokenValue
public void addCommonTokenValue(short shardKey, java.lang.String codeSystem, int codeSystemId, java.lang.String tokenValue, long commonTokenValueId)
Description copied from interface:IParameterIdentityCache
Add the common token value to the cache.- Specified by:
addCommonTokenValue
in interfaceIParameterIdentityCache
-
addCodeSystem
public void addCodeSystem(java.lang.String codeSystem, int codeSystemId)
Description copied from interface:IParameterIdentityCache
Add the code system value to the cache- Specified by:
addCodeSystem
in interfaceIParameterIdentityCache
-
getResourceTypeId
public int getResourceTypeId(java.lang.String resourceType)
Description copied from interface:IParameterIdentityCache
Get the database resource_type_id value for the given resourceType value- Specified by:
getResourceTypeId
in interfaceIParameterIdentityCache
- Returns:
-
getLogicalResourceIdentId
public java.lang.Long getLogicalResourceIdentId(java.lang.String resourceType, java.lang.String logicalId)
Description copied from interface:IParameterIdentityCache
Get the database logical_resource_id for the given resourceType/logicalId tuple.- Specified by:
getLogicalResourceIdentId
in interfaceIParameterIdentityCache
- Returns:
-
addLogicalResourceIdent
public void addLogicalResourceIdent(java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId)
Description copied from interface:IParameterIdentityCache
Add the logical_resource_ident mapping to the cache- Specified by:
addLogicalResourceIdent
in interfaceIParameterIdentityCache
-
-