Class ParameterVisitorBatchDAO
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.dao.impl.ParameterVisitorBatchDAO
-
- All Implemented Interfaces:
ExtractedParameterValueVisitor
,AutoCloseable
public class ParameterVisitorBatchDAO extends Object implements ExtractedParameterValueVisitor, AutoCloseable
Batch insert into the parameter values tables. Avoids having to create one stored procedure per resource type, because the row type array approach apparently won't work with dynamic SQL (EXECUTE ... USING ...). Unfortunately this means we have more database round-trips, we don't have a choice.
-
-
Constructor Summary
Constructors Constructor Description ParameterVisitorBatchDAO(Connection c, String adminSchemaName, String tablePrefix, boolean multitenant, long logicalResourceId, int batchSize, IParameterNameCache pnc, ICodeSystemCache csc)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected int
getCodeSystemId(String codeSystem)
Look up the code systemprotected int
getParameterNameId(String parameterName)
Look up the normalized id for the parameter, adding it to the parameter_names table if it doesn't yet existvoid
visit(CompositeParmVal compositeParameter)
Process a composite parameter valuevoid
visit(DateParmVal param)
Process a date parameter valuevoid
visit(LocationParmVal param)
Process a location parameter valuevoid
visit(NumberParmVal param)
Process a number parameter valuevoid
visit(QuantityParmVal param)
Process a quantity parameter valuevoid
visit(StringParmVal param)
Process a string parameter valuevoid
visit(TokenParmVal param)
Process a token parameter value
-
-
-
Constructor Detail
-
ParameterVisitorBatchDAO
public ParameterVisitorBatchDAO(Connection c, String adminSchemaName, String tablePrefix, boolean multitenant, long logicalResourceId, int batchSize, IParameterNameCache pnc, ICodeSystemCache csc) throws SQLException
Public constructor- Parameters:
c
-resourceId
-- Throws:
SQLException
-
-
Method Detail
-
getParameterNameId
protected int getParameterNameId(String parameterName) throws FHIRPersistenceException
Look up the normalized id for the parameter, adding it to the parameter_names table if it doesn't yet exist- Parameters:
parameterName
-- Returns:
- Throws:
FHIRPersistenceException
-
getCodeSystemId
protected int getCodeSystemId(String codeSystem) throws FHIRPersistenceException
Look up the code system- Parameters:
codeSystem
-- Returns:
- Throws:
FHIRPersistenceException
-
visit
public void visit(StringParmVal param) throws FHIRPersistenceException
Description copied from interface:ExtractedParameterValueVisitor
Process a string parameter value- Specified by:
visit
in interfaceExtractedParameterValueVisitor
- Throws:
FHIRPersistenceException
-
visit
public void visit(NumberParmVal param) throws FHIRPersistenceException
Description copied from interface:ExtractedParameterValueVisitor
Process a number parameter value- Specified by:
visit
in interfaceExtractedParameterValueVisitor
- Throws:
FHIRPersistenceException
-
visit
public void visit(DateParmVal param) throws FHIRPersistenceException
Description copied from interface:ExtractedParameterValueVisitor
Process a date parameter value- Specified by:
visit
in interfaceExtractedParameterValueVisitor
- Throws:
FHIRPersistenceException
-
visit
public void visit(TokenParmVal param) throws FHIRPersistenceException
Description copied from interface:ExtractedParameterValueVisitor
Process a token parameter value- Specified by:
visit
in interfaceExtractedParameterValueVisitor
- Throws:
FHIRPersistenceException
-
visit
public void visit(QuantityParmVal param) throws FHIRPersistenceException
Description copied from interface:ExtractedParameterValueVisitor
Process a quantity parameter value- Specified by:
visit
in interfaceExtractedParameterValueVisitor
- Throws:
FHIRPersistenceException
-
visit
public void visit(LocationParmVal param) throws FHIRPersistenceException
Description copied from interface:ExtractedParameterValueVisitor
Process a location parameter value- Specified by:
visit
in interfaceExtractedParameterValueVisitor
- Throws:
FHIRPersistenceException
-
visit
public void visit(CompositeParmVal compositeParameter) throws FHIRPersistenceException
Description copied from interface:ExtractedParameterValueVisitor
Process a composite parameter value- Specified by:
visit
in interfaceExtractedParameterValueVisitor
- Throws:
FHIRPersistenceException
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-