Class DerbyCodeSystemDAO
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.jdbc.dao.impl.CodeSystemDAOImpl
-
- org.linuxforhealth.fhir.persistence.jdbc.derby.DerbyCodeSystemDAO
-
- All Implemented Interfaces:
CodeSystemDAO
public class DerbyCodeSystemDAO extends CodeSystemDAOImpl
Derby variant DAO used to manage code_systems records. Uses plain old JDBC statements instead of a stored procedure.
-
-
Constructor Summary
Constructors Constructor Description DerbyCodeSystemDAO(java.sql.Connection c, java.lang.String schemaName)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Integer
getCodeSystemId(java.lang.String codeSystem)
Read the id for the named typeint
readOrAddCodeSystem(java.lang.String codeSystem)
Calls a stored procedure to read the system contained in the passed Parameter in the Code_Systems table.-
Methods inherited from class org.linuxforhealth.fhir.persistence.jdbc.dao.impl.CodeSystemDAOImpl
getConnection, getSchemaName, readAllCodeSystems, readCodeSystemId
-
-
-
-
Method Detail
-
readOrAddCodeSystem
public int readOrAddCodeSystem(java.lang.String codeSystem) throws FHIRPersistenceDataAccessException
Description copied from class:CodeSystemDAOImpl
Calls a stored procedure to read the system contained in the passed Parameter in the Code_Systems table. If it's not in the DB, it will be stored and a unique id will be returned.- Specified by:
readOrAddCodeSystem
in interfaceCodeSystemDAO
- Overrides:
readOrAddCodeSystem
in classCodeSystemDAOImpl
- Parameters:
codeSystem
- A valid FHIR search parameter name.- Returns:
- The generated id of the stored system.
- Throws:
FHIRPersistenceDataAccessException
-
getCodeSystemId
protected java.lang.Integer getCodeSystemId(java.lang.String codeSystem) throws FHIRPersistenceDataAccessException
Read the id for the named type- Parameters:
codeSystem
-- Returns:
- the database id, or null if the named record is not found
- Throws:
FHIRPersistenceDataAccessException
-
-