Class ParameterNameDAOImpl
- java.lang.Object
- 
- org.linuxforhealth.fhir.persistence.params.database.ParameterNameDAOImpl
 
- 
- All Implemented Interfaces:
- ParameterNameDAO
 - Direct Known Subclasses:
- DerbyParameterNamesDAO,- PostgresParameterNamesDAO
 
 public class ParameterNameDAOImpl extends java.lang.Object implements ParameterNameDAO Database interaction for parameter_names. Caching etc is handled elsewhere...we're just doing JDBC stuff here.
- 
- 
Constructor SummaryConstructors Constructor Description ParameterNameDAOImpl(java.sql.Connection connection, java.lang.String schemaName)Public constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.sql.ConnectiongetConnection()Provide the connection to subclassesprotected java.lang.StringgetSchemaName()Get the name of the FHIR data schema we are usingjava.util.Map<java.lang.String,java.lang.Integer>readAllSearchParameterNames()Reads all rows in the Parameter_Names table and returns the data as a MapintreadOrAddParameterNameId(java.lang.String parameterName)Calls a stored procedure to read the name contained in the passed Parameter in the Parameter_Names table.java.lang.IntegerreadParameterNameId(java.lang.String parameterName)Read the parameter_name_id for the given parameterName
 
- 
- 
- 
Method Detail- 
getConnectionprotected java.sql.Connection getConnection() Provide the connection to subclasses- Returns:
 
 - 
getSchemaNameprotected java.lang.String getSchemaName() Get the name of the FHIR data schema we are using- Returns:
 
 - 
readAllSearchParameterNamespublic java.util.Map<java.lang.String,java.lang.Integer> readAllSearchParameterNames() throws FHIRPersistenceDataAccessExceptionDescription copied from interface:ParameterNameDAOReads all rows in the Parameter_Names table and returns the data as a Map- Specified by:
- readAllSearchParameterNamesin interface- ParameterNameDAO
- Returns:
- A map containing key=parameter-name, value=parameter-name-id
- Throws:
- FHIRPersistenceDataAccessException
 
 - 
readOrAddParameterNameIdpublic int readOrAddParameterNameId(java.lang.String parameterName) throws FHIRPersistenceDataAccessExceptionCalls a stored procedure to read the name contained in the passed Parameter in the Parameter_Names table. If it's not in the DB, it will be stored and a unique id will be returned.- Specified by:
- readOrAddParameterNameIdin interface- ParameterNameDAO
- Parameters:
- parameterName-
- Returns:
- The generated id of the stored system.
- Throws:
- FHIRPersistenceDataAccessException
 
 - 
readParameterNameIdpublic java.lang.Integer readParameterNameId(java.lang.String parameterName) throws FHIRPersistenceDataAccessExceptionDescription copied from interface:ParameterNameDAORead the parameter_name_id for the given parameterName- Specified by:
- readParameterNameIdin interface- ParameterNameDAO
- Parameters:
- parameterName- A valid FHIR search parameter name.
- Returns:
- the parameter_name_id for for parameter, or null if it doesn't exist
- Throws:
- FHIRPersistenceDataAccessException
 
 
- 
 
-