Class Db2ResourceReferenceDAO
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.dao.impl.ResourceReferenceDAO
-
- com.ibm.fhir.persistence.jdbc.db2.Db2ResourceReferenceDAO
-
- All Implemented Interfaces:
IResourceReferenceDAO
,AutoCloseable
public class Db2ResourceReferenceDAO extends ResourceReferenceDAO
Db2-specific extension of theResourceReferenceDAO
to work around some SQL syntax and Postgres concurrency issues
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.ResourceReferenceDAO
BATCH_SIZE
-
-
Constructor Summary
Constructors Constructor Description Db2ResourceReferenceDAO(IDatabaseTranslator t, Connection c, String schemaName, ICommonTokenValuesCache cache, String adminSchemaName)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doCodeSystemsUpsert(String paramList, Collection<String> systemNames)
Insert any missing values into the code_systems tableprotected void
doCommonTokenValuesUpsert(String paramList, Collection<CommonTokenValue> tokenValues)
Execute the insert (upsert) into the common_token_values table for the given collection of values.protected void
insertResourceTokenRefs(String resourceType, Collection<ResourceTokenValueRec> xrefs)
Insert the values in the resource-type-specific _resource_token_refs table.-
Methods inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.ResourceReferenceDAO
addCommonTokenValues, close, flush, getCache, getConnection, getResourceReferenceCache, getSchemaName, getTranslator, persist, readCommonTokenValueId, readCommonTokenValueIdList, upsertCodeSystems, upsertCommonTokenValues
-
-
-
-
Constructor Detail
-
Db2ResourceReferenceDAO
public Db2ResourceReferenceDAO(IDatabaseTranslator t, Connection c, String schemaName, ICommonTokenValuesCache cache, String adminSchemaName)
Public constructor- Parameters:
t
-c
-schemaName
-cache
-
-
-
Method Detail
-
doCodeSystemsUpsert
public void doCodeSystemsUpsert(String paramList, Collection<String> systemNames)
Description copied from class:ResourceReferenceDAO
Insert any missing values into the code_systems table- Specified by:
doCodeSystemsUpsert
in classResourceReferenceDAO
-
doCommonTokenValuesUpsert
protected void doCommonTokenValuesUpsert(String paramList, Collection<CommonTokenValue> tokenValues)
Description copied from class:ResourceReferenceDAO
Execute the insert (upsert) into the common_token_values table for the given collection of values. Note, this insert from negative outer join requires the database concurrency implementation to be correct. This does not work for Postgres, hence Postgres gets its own implementation of this method- Specified by:
doCommonTokenValuesUpsert
in classResourceReferenceDAO
-
insertResourceTokenRefs
protected void insertResourceTokenRefs(String resourceType, Collection<ResourceTokenValueRec> xrefs)
Description copied from class:ResourceReferenceDAO
Insert the values in the resource-type-specific _resource_token_refs table. This is a simple batch insert because all the FKs have already been resolved and updated in the ResourceTokenValueRec records- Overrides:
insertResourceTokenRefs
in classResourceReferenceDAO
-
-