Class ParameterNameDAOImpl
- java.lang.Object
 - 
- com.ibm.fhir.persistence.jdbc.dao.impl.ParameterNameDAOImpl
 
 
- 
- All Implemented Interfaces:
 ParameterNameDAO
- Direct Known Subclasses:
 DerbyParameterNamesDAO,PostgresParameterNamesDAO
public class ParameterNameDAOImpl extends Object implements ParameterNameDAO
Database interaction for parameter_names. Caching etc is handled elsewhere...we're just doing JDBC stuff here. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_TOKEN_SYSTEM 
- 
Constructor Summary
Constructors Constructor Description ParameterNameDAOImpl(Connection connection, String schemaName)Public constructor 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConnectiongetConnection()Provide the connection to subclassesprotected StringgetSchemaName()Get the name of the FHIR data schema we are usingMap<String,Integer>readAllSearchParameterNames()Reads all rows in the Parameter_Names table and returns the data as a MapintreadOrAddParameterNameId(String parameterName)Calls a stored procedure to read the name contained in the passed Parameter in the Parameter_Names table.IntegerreadParameterNameId(String parameterName)Read the parameter_name_id for the given parameterName 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_TOKEN_SYSTEM
public static final String DEFAULT_TOKEN_SYSTEM
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
ParameterNameDAOImpl
public ParameterNameDAOImpl(Connection connection, String schemaName)
Public constructor 
 - 
 
- 
Method Detail
- 
getConnection
protected Connection getConnection()
Provide the connection to subclasses- Returns:
 
 
- 
getSchemaName
protected String getSchemaName()
Get the name of the FHIR data schema we are using- Returns:
 
 
- 
readAllSearchParameterNames
public Map<String,Integer> readAllSearchParameterNames() throws FHIRPersistenceDataAccessException
Description copied from interface:ParameterNameDAOReads all rows in the Parameter_Names table and returns the data as a Map- Specified by:
 readAllSearchParameterNamesin interfaceParameterNameDAO- Returns:
 - A map containing key=parameter-name, value=parameter-name-id
 - Throws:
 FHIRPersistenceDataAccessException
 
- 
readOrAddParameterNameId
public int readOrAddParameterNameId(String parameterName) throws FHIRPersistenceDataAccessException
Calls 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 interfaceParameterNameDAO- Parameters:
 parameterName-- Returns:
 - The generated id of the stored system.
 - Throws:
 FHIRPersistenceDataAccessException
 
- 
readParameterNameId
public Integer readParameterNameId(String parameterName) throws FHIRPersistenceDataAccessException
Description copied from interface:ParameterNameDAORead the parameter_name_id for the given parameterName- Specified by:
 readParameterNameIdin interfaceParameterNameDAO- 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
 
 - 
 
 -