Package com.ibm.fhir.schema.app
Class SchemaVersionsManager
- java.lang.Object
-
- com.ibm.fhir.schema.app.SchemaVersionsManager
-
public class SchemaVersionsManager extends Object
Access layer for WHOLE_SCHEMA_VERSION data
-
-
Constructor Summary
Constructors Constructor Description SchemaVersionsManager(IDatabaseTranslator translator, IConnectionProvider connectionPool, ITransactionProvider transactionProvider, String schemaName)
Public constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FhirSchemaVersion
getLatestFhirSchemaVersion()
Get the max FhirSchemaVersion based on vidint
getVersionForSchema()
Get the installed version for the schemaboolean
isLatestSchema()
Returns true if the current schema version recorded in WHOLE_SCHEMA_VERSION is the latest FhirSchemaVersionvoid
updateSchemaVersion()
Find the latest FhirSchemaVersion and use it to update the WHOLE_SCHEMA_VERSION tablevoid
updateSchemaVersionId(FhirSchemaVersion version)
Record the version information for the given schemaName in the WHOLESCHEMA_VERSION table, creating a new record if required
-
-
-
Constructor Detail
-
SchemaVersionsManager
public SchemaVersionsManager(IDatabaseTranslator translator, IConnectionProvider connectionPool, ITransactionProvider transactionProvider, String schemaName)
Public constructor- Parameters:
translator
-connectionPool
-transactionProvider
-schemaName
-
-
-
Method Detail
-
getVersionForSchema
public int getVersionForSchema()
Get the installed version for the schema- Returns:
- the schema version, or -1 if no schema build has completed yet
-
updateSchemaVersionId
public void updateSchemaVersionId(FhirSchemaVersion version)
Record the version information for the given schemaName in the WHOLESCHEMA_VERSION table, creating a new record if required- Parameters:
schemaName
-version
-
-
getLatestFhirSchemaVersion
public static FhirSchemaVersion getLatestFhirSchemaVersion()
Get the max FhirSchemaVersion based on vid- Returns:
-
updateSchemaVersion
public void updateSchemaVersion()
Find the latest FhirSchemaVersion and use it to update the WHOLE_SCHEMA_VERSION table
-
isLatestSchema
public boolean isLatestSchema()
Returns true if the current schema version recorded in WHOLE_SCHEMA_VERSION is the latest FhirSchemaVersion- Returns:
-
-