Class DerbyCodeSystemDAO
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.dao.impl.CodeSystemDAOImpl
-
- com.ibm.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(Connection c, String schemaName)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IntegergetCodeSystemId(String codeSystem)Read the id for the named typeintreadOrAddCodeSystem(String codeSystem)Calls a stored procedure to read the system contained in the passed Parameter in the Code_Systems table.-
Methods inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.CodeSystemDAOImpl
getConnection, getSchemaName, readAllCodeSystems, readCodeSystemId
-
-
-
-
Constructor Detail
-
DerbyCodeSystemDAO
public DerbyCodeSystemDAO(Connection c, String schemaName)
Public constructor- Parameters:
c-schemaName-
-
-
Method Detail
-
readOrAddCodeSystem
public int readOrAddCodeSystem(String codeSystem) throws FHIRPersistenceDataAccessException
Description copied from class:CodeSystemDAOImplCalls 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:
readOrAddCodeSystemin interfaceCodeSystemDAO- Overrides:
readOrAddCodeSystemin classCodeSystemDAOImpl- Parameters:
codeSystem- A valid FHIR search parameter name.- Returns:
- The generated id of the stored system.
- Throws:
FHIRPersistenceDataAccessException
-
getCodeSystemId
protected Integer getCodeSystemId(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
-
-