Class CommonValuesDAO
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.jdbc.dao.impl.CommonValuesDAO
-
- All Implemented Interfaces:
ICommonValuesDAO
- Direct Known Subclasses:
DerbyCommonValuesDAO
public class CommonValuesDAO extends java.lang.Object implements ICommonValuesDAO
DAO to fetch common value records normalized in common_token_values, common_canonical_values and code_systems
-
-
Constructor Summary
Constructors Constructor Description CommonValuesDAO(IDatabaseTranslator t, java.sql.Connection c, java.lang.String schemaName)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.sql.Connection
getConnection()
Getter for theConnection
held by this DAOprotected java.lang.String
getSchemaName()
Getter for subclass access to the schemaNameprotected IDatabaseTranslator
getTranslator()
Getter for theIDatabaseTranslator
held by this DAOjava.lang.Long
readCanonicalId(java.lang.String canonicalValue)
Read the database canonical_id for the given valueCommonTokenValueResult
readCommonTokenValueId(java.lang.String codeSystem, java.lang.String tokenValue)
Find the database id for the given token value and systemjava.util.List<java.lang.Long>
readCommonTokenValueIdList(java.lang.String tokenValue)
Fetch the list of matching common_token_value_id records for the given tokenValue.java.util.Set<CommonTokenValueResult>
readCommonTokenValueIds(java.util.Collection<CommonTokenValue> tokenValues)
Find database ids for a set of common token values
-
-
-
Constructor Detail
-
CommonValuesDAO
public CommonValuesDAO(IDatabaseTranslator t, java.sql.Connection c, java.lang.String schemaName)
Public constructor- Parameters:
t
-c
-schemaName
-
-
-
Method Detail
-
getTranslator
protected IDatabaseTranslator getTranslator()
Getter for theIDatabaseTranslator
held by this DAO- Returns:
-
getConnection
protected java.sql.Connection getConnection()
Getter for theConnection
held by this DAO- Returns:
-
getSchemaName
protected java.lang.String getSchemaName()
Getter for subclass access to the schemaName- Returns:
-
readCommonTokenValueId
public CommonTokenValueResult readCommonTokenValueId(java.lang.String codeSystem, java.lang.String tokenValue)
Description copied from interface:ICommonValuesDAO
Find the database id for the given token value and system- Specified by:
readCommonTokenValueId
in interfaceICommonValuesDAO
- Returns:
- the matching id from common_token_values.common_token_value_id or null if not found
-
readCommonTokenValueIds
public java.util.Set<CommonTokenValueResult> readCommonTokenValueIds(java.util.Collection<CommonTokenValue> tokenValues)
Description copied from interface:ICommonValuesDAO
Find database ids for a set of common token values- Specified by:
readCommonTokenValueIds
in interfaceICommonValuesDAO
- Returns:
- a non-null, possibly-empty set of ids from common_token_values.common_token_value_id; CommonTokenValues with no corresponding record will be omitted from the set
-
readCanonicalId
public java.lang.Long readCanonicalId(java.lang.String canonicalValue)
Description copied from interface:ICommonValuesDAO
Read the database canonical_id for the given value- Specified by:
readCanonicalId
in interfaceICommonValuesDAO
- Returns:
-
readCommonTokenValueIdList
public java.util.List<java.lang.Long> readCommonTokenValueIdList(java.lang.String tokenValue)
Description copied from interface:ICommonValuesDAO
Fetch the list of matching common_token_value_id records for the given tokenValue.- Specified by:
readCommonTokenValueIdList
in interfaceICommonValuesDAO
- Returns:
-
-