Class PostgresCodeSystemDAO
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.dao.impl.CodeSystemDAOImpl
-
- com.ibm.fhir.persistence.jdbc.postgres.PostgresCodeSystemDAO
-
- All Implemented Interfaces:
CodeSystemDAO
public class PostgresCodeSystemDAO extends CodeSystemDAOImpl
PostgreSql variant DAO used to manage code_systems records. Uses plain old JDBC statements instead of a stored procedure.
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.CodeSystemDAOImpl
DEFAULT_TOKEN_SYSTEM
-
-
Constructor Summary
Constructors Constructor Description PostgresCodeSystemDAO(Connection c, String schemaName)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
readOrAddCodeSystem(String systemName)
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
-
PostgresCodeSystemDAO
public PostgresCodeSystemDAO(Connection c, String schemaName)
Public constructor- Parameters:
c
- connection to the databaseschemaName
- the schema containing the FHIR data tables
-
-
Method Detail
-
readOrAddCodeSystem
public int readOrAddCodeSystem(String systemName) 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:
systemName
- A valid FHIR search parameter name.- Returns:
- The generated id of the stored system.
- Throws:
FHIRPersistenceDataAccessException
-
-