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(String resourceType, Collection<ResourceTokenValueRec> xrefs, Collection<ResourceProfileRec> profileRecs, Collection<ResourceTokenValueRec> tagRecs, 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(Collection<ResourceTokenValueRec> records, Collection<ResourceProfileRec> profileRecs, Collection<ResourceTokenValueRec> tagRecs, Collection<ResourceTokenValueRec> securityRecs)
Persist the records, which may span multiple resource typesInteger
readCanonicalId(String canonicalValue)
Read the database canonical_id for the given valueCommonTokenValueResult
readCommonTokenValueId(String codeSystem, String tokenValue)
Find the database id for the given token value and systemList<Long>
readCommonTokenValueIdList(String tokenValue)
Fetch the list of matching common_token_value_id records for the given tokenValue.Set<CommonTokenValueResult>
readCommonTokenValueIds(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(String resourceType, Collection<ResourceTokenValueRec> xrefs, Collection<ResourceProfileRec> profileRecs, Collection<ResourceTokenValueRec> tagRecs, Collection<ResourceTokenValueRec> securityRecs)
Add TOKEN_VALUE_MAP records, creating any CODE_SYSTEMS and COMMON_TOKEN_VALUES as necessary- Parameters:
resourceType
-xrefs
-profileRecs
-tagRecs
-securityRecs
-
-
persist
void persist(Collection<ResourceTokenValueRec> records, Collection<ResourceProfileRec> profileRecs, Collection<ResourceTokenValueRec> tagRecs, Collection<ResourceTokenValueRec> securityRecs)
Persist the records, which may span multiple resource types- Parameters:
records
-profileRecs
-tagRecs
-securityRecs
-
-
readCommonTokenValueId
CommonTokenValueResult readCommonTokenValueId(String codeSystem, 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
Set<CommonTokenValueResult> readCommonTokenValueIds(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
List<Long> readCommonTokenValueIdList(String tokenValue)
Fetch the list of matching common_token_value_id records for the given tokenValue.- Parameters:
tokenValue
-- Returns:
-
-