Class PostgresResourceReferenceDAO
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.dao.impl.ResourceReferenceDAO
-
- com.ibm.fhir.persistence.jdbc.postgres.PostgresResourceReferenceDAO
-
- All Implemented Interfaces:
IResourceReferenceDAO,AutoCloseable
public class PostgresResourceReferenceDAO extends ResourceReferenceDAO
Postgres-specific extension of theResourceReferenceDAOto 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 PostgresResourceReferenceDAO(IDatabaseTranslator t, Connection c, String schemaName, ICommonTokenValuesCache cache, INameIdCache<Integer> parameterNameCache)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoCanonicalValuesUpsert(String paramList, Collection<String> sortedURLS)Insert any missing values into the common_canonical_values tablevoiddoCodeSystemsUpsert(String paramList, Collection<String> sortedSystemNames)Insert any missing values into the code_systems tableprotected voiddoCommonTokenValuesUpsert(String paramList, Collection<CommonTokenValue> sortedTokenValues)Execute the insert (upsert) into the common_token_values table for the given collection of values.protected intreadOrAddParameterNameId(String parameterName)Fetch the id for the given parameter name from the database, creating a new entry if required.-
Methods inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.ResourceReferenceDAO
addNormalizedValues, close, doCodeSystemsFetch, flush, getCache, getConnection, getParameterNameId, getResourceReferenceCache, getSchemaName, getTranslator, insertResourceProfiles, insertResourceSecurity, insertResourceTags, insertResourceTokenRefs, insertSystemResourceProfiles, insertSystemResourceSecurity, insertSystemResourceTags, insertSystemResourceTokenRefs, persist, readCanonicalId, readCommonTokenValueId, readCommonTokenValueIdList, readCommonTokenValueIds, upsertCanonicalValues, upsertCodeSystems, upsertCommonTokenValues
-
-
-
-
Constructor Detail
-
PostgresResourceReferenceDAO
public PostgresResourceReferenceDAO(IDatabaseTranslator t, Connection c, String schemaName, ICommonTokenValuesCache cache, INameIdCache<Integer> parameterNameCache)
Public constructor- Parameters:
t-c-schemaName-cache-
-
-
Method Detail
-
doCodeSystemsUpsert
public void doCodeSystemsUpsert(String paramList, Collection<String> sortedSystemNames)
Description copied from class:ResourceReferenceDAOInsert any missing values into the code_systems table- Specified by:
doCodeSystemsUpsertin classResourceReferenceDAO
-
doCanonicalValuesUpsert
public void doCanonicalValuesUpsert(String paramList, Collection<String> sortedURLS)
Description copied from class:ResourceReferenceDAOInsert any missing values into the common_canonical_values table- Specified by:
doCanonicalValuesUpsertin classResourceReferenceDAO
-
doCommonTokenValuesUpsert
protected void doCommonTokenValuesUpsert(String paramList, Collection<CommonTokenValue> sortedTokenValues)
Description copied from class:ResourceReferenceDAOExecute 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:
doCommonTokenValuesUpsertin classResourceReferenceDAO
-
readOrAddParameterNameId
protected int readOrAddParameterNameId(String parameterName) throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Description copied from class:ResourceReferenceDAOFetch the id for the given parameter name from the database, creating a new entry if required.- Specified by:
readOrAddParameterNameIdin classResourceReferenceDAO- Returns:
- Throws:
FHIRPersistenceDBConnectExceptionFHIRPersistenceDataAccessException
-
-