Class ParameterValueCollector
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.params.batch.ParameterValueCollector
-
- All Implemented Interfaces:
IParamValueCollector
public class ParameterValueCollector extends java.lang.Object implements IParamValueCollector
Collects together a set of parameter value objects in preparation for them to be stored in the database as a series of batch insert operations
-
-
Field Summary
Fields Modifier and Type Field Description protected IParameterIdentityCache
identityCache
-
Constructor Summary
Constructors Constructor Description ParameterValueCollector(IParameterIdentityCache identityCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, DateParameter p)
Process the given DateParameter pvoid
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, LocationParameter p)
Process the given LocationParameter pvoid
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, NumberParameter p)
Process the given NumberParameter pvoid
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ProfileParameter p)
Process the given ProfileParameter pvoid
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, QuantityParameter p)
Process the given QuantityParameter pvoid
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ReferenceParameter p)
Process the given ReferenceParameter pvoid
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, SecurityParameter p)
Proces the given SecurityParameter pvoid
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, StringParameter p)
void
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, TagParameter p)
Process the given TagParameter pvoid
collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, TokenParameter p)
Process the given TokenParameter pvoid
publish(IParamValueProcessor processor)
Publish the values held in this collector using the given processorvoid
publishValuesToCache()
To be called after all the values are resolved and the database transaction is committed.void
reset()
Reset the state of the collector by clearing any values that have been previously collected
-
-
-
Field Detail
-
identityCache
protected final IParameterIdentityCache identityCache
-
-
Constructor Detail
-
ParameterValueCollector
public ParameterValueCollector(IParameterIdentityCache identityCache)
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:IParamValueCollector
Reset the state of the collector by clearing any values that have been previously collected- Specified by:
reset
in interfaceIParamValueCollector
-
publishValuesToCache
public void publishValuesToCache()
Description copied from interface:IParamValueCollector
To be called after all the values are resolved and the database transaction is committed. This call should promote any newly assigned database ids to the cache (it is then up to the cache implementation to decide what to do with those ids).- Specified by:
publishValuesToCache
in interfaceIParamValueCollector
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, StringParameter p) throws FHIRPersistenceException
- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, LocationParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Process the given LocationParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, TokenParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Process the given TokenParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, TagParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Process the given TagParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, SecurityParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Proces the given SecurityParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ProfileParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Process the given ProfileParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, QuantityParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Process the given QuantityParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, NumberParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Process the given NumberParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, DateParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Process the given DateParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
collect
public void collect(java.lang.String tenantId, java.lang.String requestShard, java.lang.String resourceType, java.lang.String logicalId, long logicalResourceId, ReferenceParameter p) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Process the given ReferenceParameter p- Specified by:
collect
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
publish
public void publish(IParamValueProcessor processor) throws FHIRPersistenceException
Description copied from interface:IParamValueCollector
Publish the values held in this collector using the given processor- Specified by:
publish
in interfaceIParamValueCollector
- Throws:
FHIRPersistenceException
-
-