Class FHIRResourceDAOFactory
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.jdbc.FHIRResourceDAOFactory
-
public class FHIRResourceDAOFactory extends java.lang.Object
Factory for constructing ResourceDAO implementations specific to a particularFHIRDbFlavor
.
-
-
Constructor Summary
Constructors Constructor Description FHIRResourceDAOFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CommonValuesDAO
getCommonValuesDAO(java.sql.Connection connection, java.lang.String adminSchemaName, java.lang.String schemaName, FHIRDbFlavor flavor)
Get a standalone DAO to handle the fetch of records from common_token_values and common_canonical_valuesstatic ReindexResourceDAO
getReindexResourceDAO(java.sql.Connection connection, java.lang.String adminSchemaName, java.lang.String schemaName, FHIRDbFlavor flavor, javax.transaction.TransactionSynchronizationRegistry trxSynchRegistry, FHIRPersistenceJDBCCache cache, ParameterDAO parameterDao)
Instantiate a new instance ofReindexResourceDAO
configured for the given database typestatic ResourceDAO
getResourceDAO(java.sql.Connection connection, java.lang.String adminSchemaName, java.lang.String schemaName, FHIRDbFlavor flavor, javax.transaction.TransactionSynchronizationRegistry trxSynchRegistry, FHIRPersistenceJDBCCache cache, ParameterTransactionDataImpl ptdi, java.lang.Short shardKey)
Construct a new ResourceDAO implementation matching the database typestatic ResourceDAO
getResourceDAO(java.sql.Connection connection, java.lang.String adminSchemaName, java.lang.String schemaName, FHIRDbFlavor flavor, FHIRPersistenceJDBCCache cache, java.lang.Short shardKey)
Construct a new ResourceDAO implementation matching the database typestatic FhirSequenceDAO
getSequenceDAO(java.sql.Connection connection, FHIRDbFlavor flavor)
Get an implementation ofFhirSequenceDAO
suitable for the database type described by flavor.static IDatabaseTranslator
getTranslatorForFlavor(FHIRDbFlavor flavor)
Get theIDatabaseTranslator
implementation specific to the givenFHIRDbFlavor
-
-
-
Method Detail
-
getResourceDAO
public static ResourceDAO getResourceDAO(java.sql.Connection connection, java.lang.String adminSchemaName, java.lang.String schemaName, FHIRDbFlavor flavor, javax.transaction.TransactionSynchronizationRegistry trxSynchRegistry, FHIRPersistenceJDBCCache cache, ParameterTransactionDataImpl ptdi, java.lang.Short shardKey) throws java.lang.IllegalArgumentException, FHIRPersistenceException
Construct a new ResourceDAO implementation matching the database type- Parameters:
connection
- valid connection to the databaseadminSchemaName
-schemaName
- the name of the schema containing the FHIR resource tablesflavor
- the type and capability of the database and schematrxSynchRegistry
-cache
-ptdi
-shardKey
-- Returns:
- a concrete implementation of
ResourceDAO
- Throws:
java.lang.IllegalArgumentException
FHIRPersistenceException
-
getReindexResourceDAO
public static ReindexResourceDAO getReindexResourceDAO(java.sql.Connection connection, java.lang.String adminSchemaName, java.lang.String schemaName, FHIRDbFlavor flavor, javax.transaction.TransactionSynchronizationRegistry trxSynchRegistry, FHIRPersistenceJDBCCache cache, ParameterDAO parameterDao)
Instantiate a new instance ofReindexResourceDAO
configured for the given database type- Parameters:
connection
-schemaName
-flavor
-trxSynchRegistry
-cache
-parameterDao
-- Returns:
-
getTranslatorForFlavor
public static IDatabaseTranslator getTranslatorForFlavor(FHIRDbFlavor flavor)
Get theIDatabaseTranslator
implementation specific to the givenFHIRDbFlavor
- Parameters:
flavor
-- Returns:
-
getResourceDAO
public static ResourceDAO getResourceDAO(java.sql.Connection connection, java.lang.String adminSchemaName, java.lang.String schemaName, FHIRDbFlavor flavor, FHIRPersistenceJDBCCache cache, java.lang.Short shardKey) throws java.lang.IllegalArgumentException, FHIRPersistenceException
Construct a new ResourceDAO implementation matching the database type- Parameters:
connection
- valid connection to the databaseadminSchemaName
-schemaName
- the name of the schema containing the FHIR resource tablesflavor
- the type and capability of the database and schemacache
-shardKey
-- Returns:
- a concrete implementation of
ResourceDAO
- Throws:
java.lang.IllegalArgumentException
FHIRPersistenceException
-
getCommonValuesDAO
public static CommonValuesDAO getCommonValuesDAO(java.sql.Connection connection, java.lang.String adminSchemaName, java.lang.String schemaName, FHIRDbFlavor flavor)
Get a standalone DAO to handle the fetch of records from common_token_values and common_canonical_values- Parameters:
connection
-schemaName
-flavor
-- Returns:
-
getSequenceDAO
public static FhirSequenceDAO getSequenceDAO(java.sql.Connection connection, FHIRDbFlavor flavor)
Get an implementation ofFhirSequenceDAO
suitable for the database type described by flavor.- Parameters:
connection
-flavor
-- Returns:
-
-