Class FHIRPersistenceHelper
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.helper.FHIRPersistenceHelper
-
- All Implemented Interfaces:
PersistenceHelper
public class FHIRPersistenceHelper extends java.lang.Object implements PersistenceHelper
This class serves as a helper for obtaining the correct persistence implementation to be used by the FHIR REST API layer.
-
-
Field Summary
Fields Modifier and Type Field Description protected PropertyGroup
fhirConfig
protected SearchHelper
searchHelper
-
Constructor Summary
Constructors Constructor Description FHIRPersistenceHelper(SearchHelper searchHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FHIRPersistence
getFHIRPersistenceImplementation()
Returns an appropriate FHIRPersistance implementation according to the current configuration.FHIRPersistence
getFHIRPersistenceImplementation(java.lang.String factoryPropertyName)
Returns an appropriate FHIRPersistance implementation according to the current configuration.protected java.lang.String
retrieveFactoryClassName(java.lang.String factoryPropertyName)
Retrieves the name of the factory class that should be instantiated for use by the server.-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linuxforhealth.fhir.persistence.helper.PersistenceHelper
isValidFHIRPersistenceImplementation
-
-
-
-
Field Detail
-
fhirConfig
protected final PropertyGroup fhirConfig
-
searchHelper
protected final SearchHelper searchHelper
-
-
Constructor Detail
-
FHIRPersistenceHelper
public FHIRPersistenceHelper(SearchHelper searchHelper)
-
-
Method Detail
-
retrieveFactoryClassName
protected java.lang.String retrieveFactoryClassName(java.lang.String factoryPropertyName) throws FHIRPersistenceException
Retrieves the name of the factory class that should be instantiated for use by the server.- Parameters:
factoryPropertyName
- name of the property that contains theFHIRPersistenceFactory
class name.- Returns:
- Name of the factory class that will be loaded.
- Throws:
FHIRPersistenceException
-
getFHIRPersistenceImplementation
public FHIRPersistence getFHIRPersistenceImplementation() throws FHIRPersistenceException
Description copied from interface:PersistenceHelper
Returns an appropriate FHIRPersistance implementation according to the current configuration.- Specified by:
getFHIRPersistenceImplementation
in interfacePersistenceHelper
- Throws:
FHIRPersistenceException
-
getFHIRPersistenceImplementation
public FHIRPersistence getFHIRPersistenceImplementation(java.lang.String factoryPropertyName) throws FHIRPersistenceException
Description copied from interface:PersistenceHelper
Returns an appropriate FHIRPersistance implementation according to the current configuration.- Specified by:
getFHIRPersistenceImplementation
in interfacePersistenceHelper
- Throws:
FHIRPersistenceException
-
-