Interface CodeSystemDAO
-
- All Known Implementing Classes:
CodeSystemDAOImpl
,DerbyCodeSystemDAO
,PostgreSqlCodeSystemDAO
public interface CodeSystemDAO
This Data Access Object interface defines APIs specific to parameter_names table.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Integer>
readAllCodeSystems()
Reads all rows in the code_systems table and returns the data as a MapInteger
readCodeSystemId(String codeSystem)
Read the code_system_id for the given code system nameint
readOrAddCodeSystem(String codeSystem)
Reads the id associated with the name of the passed Parameter from the code_systems table.
-
-
-
Method Detail
-
readAllCodeSystems
Map<String,Integer> readAllCodeSystems() throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Reads all rows in the code_systems table and returns the data as a Map- Returns:
- A map containing key=system-name, value=system-id
- Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
readOrAddCodeSystem
int readOrAddCodeSystem(String codeSystem) throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Reads the id associated with the name of the passed Parameter from the code_systems table. If the id for the passed name is not present in the database, an id is generated, persisted, and returned. This is done in a thread-safe way- Parameters:
codeSystem
- A valid FHIR search parameter name.- Returns:
- the id associated with the name of the passed Parameter.
- Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
readCodeSystemId
Integer readCodeSystemId(String codeSystem) throws FHIRPersistenceDBConnectException, FHIRPersistenceDataAccessException
Read the code_system_id for the given code system name- Parameters:
codeSystem
-- Returns:
- the parameter_name_id for for parameter, or null if it doesn't exist
- Throws:
FHIRPersistenceDBConnectException
FHIRPersistenceDataAccessException
-
-