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 intacquireCodeSystemId(String codeSystemName)Acquire and return the id associated with the passed code-system name.intacquireParameterNameId(String parameterName)Acquire and return the id associated with the passed parameter name.voidaddParameterNamesCacheCandidate(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 MapIntegerreadCodeSystemId(String systemName)Read the id for the given code system name, but do not create a new record if it doesn't exist.intreadOrAddCodeSystemId(String systemName)Reads the id associated with the name of the passed code system name from the Code_Systems table.intreadOrAddParameterNameId(String parameterName)Reads the id associated with the name of the passed Parameter from the Parameter_Names table.IntegerreadParameterNameId(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:
FHIRPersistenceDBConnectExceptionFHIRPersistenceDataAccessException
-
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:
FHIRPersistenceDBConnectExceptionFHIRPersistenceDataAccessException
-
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:
FHIRPersistenceDBConnectExceptionFHIRPersistenceDataAccessException
-
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:
FHIRPersistenceDBConnectExceptionFHIRPersistenceDataAccessException
-
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:
FHIRPersistenceDBConnectExceptionFHIRPersistenceDataAccessException
-
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:
FHIRPersistenceDBConnectExceptionFHIRPersistenceDataAccessException
-
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
-
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
-
-