Interface IResourceReferenceDAO
-
- All Known Implementing Classes:
Db2ResourceReferenceDAO
,DerbyResourceReferenceDAO
,PostgresResourceReferenceDAO
,ResourceReferenceDAO
public interface IResourceReferenceDAO
Contract for DAO implementations handling persistence of resource references (and token parameters) with the normalized schema introduced in issue 1366.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addNormalizedValues(java.lang.String resourceType, java.util.Collection<ResourceTokenValueRec> xrefs, java.util.Collection<ResourceProfileRec> profileRecs, java.util.Collection<ResourceTokenValueRec> tagRecs, java.util.Collection<ResourceTokenValueRec> securityRecs)
Add TOKEN_VALUE_MAP records, creating any CODE_SYSTEMS and COMMON_TOKEN_VALUES as necessaryvoid
flush()
Execute any statements with pending batch entriesICommonTokenValuesCache
getResourceReferenceCache()
Get the cache used by the DAOvoid
persist(java.util.Collection<ResourceTokenValueRec> records, java.util.Collection<ResourceProfileRec> profileRecs, java.util.Collection<ResourceTokenValueRec> tagRecs, java.util.Collection<ResourceTokenValueRec> securityRecs)
Persist the records, which may span multiple resource typesjava.lang.Integer
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
-
-
-
Method Detail
-
getResourceReferenceCache
ICommonTokenValuesCache getResourceReferenceCache()
Get the cache used by the DAO- Returns:
-
flush
void flush() throws FHIRPersistenceException
Execute any statements with pending batch entries- Throws:
FHIRPersistenceException
-
addNormalizedValues
void addNormalizedValues(java.lang.String resourceType, java.util.Collection<ResourceTokenValueRec> xrefs, java.util.Collection<ResourceProfileRec> profileRecs, java.util.Collection<ResourceTokenValueRec> tagRecs, java.util.Collection<ResourceTokenValueRec> securityRecs) throws FHIRPersistenceException
Add TOKEN_VALUE_MAP records, creating any CODE_SYSTEMS and COMMON_TOKEN_VALUES as necessary- Parameters:
resourceType
-xrefs
-profileRecs
-tagRecs
-securityRecs
-- Throws:
FHIRPersistenceException
-
persist
void persist(java.util.Collection<ResourceTokenValueRec> records, java.util.Collection<ResourceProfileRec> profileRecs, java.util.Collection<ResourceTokenValueRec> tagRecs, java.util.Collection<ResourceTokenValueRec> securityRecs) throws FHIRPersistenceException
Persist the records, which may span multiple resource types- Parameters:
records
-profileRecs
-tagRecs
-securityRecs
-- Throws:
FHIRPersistenceException
-
readCommonTokenValueId
CommonTokenValueResult readCommonTokenValueId(java.lang.String codeSystem, java.lang.String tokenValue)
Find the database id for the given token value and system- Parameters:
codeSystem
-tokenValue
-- Returns:
- the matching id from common_token_values.common_token_value_id or null if not found
-
readCommonTokenValueIds
java.util.Set<CommonTokenValueResult> readCommonTokenValueIds(java.util.Collection<CommonTokenValue> tokenValues)
Find database ids for a set of common token values- Parameters:
tokenValues
-- 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
-
readCommonTokenValueIdList
java.util.List<java.lang.Long> readCommonTokenValueIdList(java.lang.String tokenValue)
Fetch the list of matching common_token_value_id records for the given tokenValue.- Parameters:
tokenValue
-- Returns:
-
readCanonicalId
java.lang.Integer readCanonicalId(java.lang.String canonicalValue)
Read the database canonical_id for the given value- Parameters:
canonicalValue
-- Returns:
-
-