Interface ParameterDAO
-
- All Superinterfaces:
FHIRDbDAO
- All Known Implementing Classes:
ParameterDAOImpl
public interface ParameterDAO extends FHIRDbDAO
This Data Access Object interface defines methods for creating, updating, and retrieving rows in the IBM FHIR Server parameter-related tables.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
acquireCodeSystemId(String codeSystemName)
Acquire and return the id associated with the passed code-system name.int
acquireParameterNameId(String parameterName)
Acquire and return the id associated with the passed parameter name.void
addCodeSystemsCacheCandidate(String codeSystemName, Integer codeSystemId)
Adds a code system name / code system id pair to a candidate collection for population into the CodeSystemsCache.void
addParameterNamesCacheCandidate(String parameterName, Integer parameterId)
Adds a parameter name / parameter id pair to a candidate collection for population into the ParameterNamesCache.Map<String,Integer>
readAllCodeSystems()
Reads all rows in the Code_Systems table and returns the data as a MapMap<String,Integer>
readAllSearchParameterNames()
Reads all rows in the Parameter_Names table and returns the data as a MapInteger
readCodeSystemId(String systemName)
Read the id for the given code system name, but do not create a new record if it doesn't exist.int
readOrAddCodeSystemId(String systemName)
Reads the id associated with the name of the passed code system name from the Code_Systems table.int
readOrAddParameterNameId(String parameterName)
Reads the id associated with the name of the passed Parameter from the Parameter_Names table.Integer
readParameterNameId(String parameterName)
Read the id for the given parameter name, but do not create a new record if it doesn't exist.-
Methods inherited from interface com.ibm.fhir.persistence.jdbc.dao.api.FHIRDbDAO
getConnection, getFlavor, isDb2Database
-
-
-
-
Method Detail
-
readAllSearchParameterNames
Map<String,Integer> readAllSearchParameterNames() throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Reads all rows in the Parameter_Names table and returns the data as a Map- Returns:
- Map
- A map containing key=parameter-name, value=parameter-name-id - Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
readAllCodeSystems
Map<String,Integer> readAllCodeSystems() throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Reads all rows in the Code_Systems table and returns the data as a Map- Returns:
- Map
- A map containing key=system-name, value=system-id - Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
readOrAddParameterNameId
int readOrAddParameterNameId(String parameterName) throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Reads the id associated with the name of the passed Parameter from the Parameter_Names table. If the id for the passed name is not present in the database, an id is generated, persisted, and returned.- Parameters:
String
- A valid FHIR search parameter name.- Returns:
- Integer - the id associated with the name of the passed Parameter.
- Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
readParameterNameId
Integer readParameterNameId(String parameterName) throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Read the id for the given parameter name, but do not create a new record if it doesn't exist.- Parameters:
parameterName
-- Returns:
- the id for the parameter name, or null not found
- Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
readOrAddCodeSystemId
int readOrAddCodeSystemId(String systemName) throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Reads the id associated with the name of the passed code system name from the Code_Systems table. If the id for the passed system name is not present in the database, an id is generated, persisted, and returned.- Parameters:
systemName
- - The name of a FHIR code system.- Returns:
- Integer - The id associated with the passed code system name.
- Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
readCodeSystemId
Integer readCodeSystemId(String systemName) throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Read the id for the given code system name, but do not create a new record if it doesn't exist.- Parameters:
systemName
-- Returns:
- Integer - The id associated with the passed code system name, or null if it doesn't exist
- Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
acquireParameterNameId
int acquireParameterNameId(String parameterName) throws FHIRPersistenceException
Acquire and return the id associated with the passed parameter name.- Parameters:
parameterName
- The name of a valid FHIR search parameter.- Returns:
- Integer A parameter id.
- Throws:
FHIRPersistenceException
-
acquireCodeSystemId
int acquireCodeSystemId(String codeSystemName) throws FHIRPersistenceException
Acquire and return the id associated with the passed code-system name.- Parameters:
codeSystemName
- The name of a valid code-system.- Returns:
- Integer A code-system id.
- Throws:
FHIRPersistenceException
-
addCodeSystemsCacheCandidate
void addCodeSystemsCacheCandidate(String codeSystemName, Integer codeSystemId) throws FHIRPersistenceException
Adds a code system name / code system id pair to a candidate collection for population into the CodeSystemsCache. This pair must be present as a row in the FHIR DB CODE_SYSTEMS table.- Parameters:
codeSystemName
- A valid code system name.codeSystemId
- The id corresponding to the code system name.- Throws:
FHIRPersistenceException
-
addParameterNamesCacheCandidate
void addParameterNamesCacheCandidate(String parameterName, Integer parameterId) throws FHIRPersistenceException
Adds a parameter name / parameter id pair to a candidate collection for population into the ParameterNamesCache. This pair must be present as a row in the FHIR DB PARAMETER_NAMES table.- Parameters:
parameterName
- A valid search or sort parameter name.parameterId
- The id corresponding to the parameter name.- Throws:
FHIRPersistenceException
-
-