Interface IResourceReferenceDAO
-
- All Known Implementing Classes:
Db2ResourceReferenceDAO,DerbyResourceReferenceDAO,PostgresResourceReferenceDAO,ResourceReferenceDAO
public interface IResourceReferenceDAOContract 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 voidaddNormalizedValues(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 necessaryvoidflush()Execute any statements with pending batch entriesICommonTokenValuesCachegetResourceReferenceCache()Get the cache used by the DAOvoidpersist(Collection<ResourceTokenValueRec> records, Collection<ResourceProfileRec> profileRecs, Collection<ResourceTokenValueRec> tagRecs, Collection<ResourceTokenValueRec> securityRecs)Persist the records, which may span multiple resource typesIntegerreadCanonicalId(String canonicalValue)Read the database canonical_id for the given valueCommonTokenValueResultreadCommonTokenValueId(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.
-
-
-
Method Detail
-
getResourceReferenceCache
ICommonTokenValuesCache getResourceReferenceCache()
Get the cache used by the DAO- Returns:
-
flush
void flush() throws FHIRPersistenceExceptionExecute 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
-
readCommonTokenValueIdList
List<Long> readCommonTokenValueIdList(String tokenValue)
Fetch the list of matching common_token_value_id records for the given tokenValue.- Parameters:
tokenValue-- Returns:
-
-