Interface CodeSystemDAO
-
- All Known Implementing Classes:
CodeSystemDAOImpl
,DerbyCodeSystemDAO
,PostgresCodeSystemDAO
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 java.util.Map<java.lang.String,java.lang.Integer>
readAllCodeSystems()
Reads all rows in the code_systems table and returns the data as a Mapjava.lang.Integer
readCodeSystemId(java.lang.String codeSystem)
Read the code_system_id for the given code system nameint
readOrAddCodeSystem(java.lang.String codeSystem)
Reads the id associated with the name of the passed Parameter from the code_systems table.
-
-
-
Method Detail
-
readAllCodeSystems
java.util.Map<java.lang.String,java.lang.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(java.lang.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
java.lang.Integer readCodeSystemId(java.lang.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
-
-