Class CreateWholeSchemaVersion
- java.lang.Object
- 
- com.ibm.fhir.database.utils.version.CreateWholeSchemaVersion
 
- 
 public class CreateWholeSchemaVersion extends Object Creates the WHOLE_SCHEMA_VERSION table. Although this is an administration table, for least privileges it is stored in the data schema, not the admin schema. This makes it easier to keep data private so that tenants aren't able to see the schema version used by other tenants, but do get to see their own tenant version. This is because the table will contain only one row. For Db2 multitenant, all tenants in a schema share the same version, so we don't need to add mt_id, making things a little simpler.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringADMIN_GROUPstatic StringSCHEMA_GROUP_TAG
 - 
Constructor SummaryConstructors Constructor Description CreateWholeSchemaVersion()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static TablebuildTableDef(PhysicalDataModel dataModel, String schemaName, boolean addTags)Builds the definition of the WHOLE_SCHEMA_VERSION table in the schema identified by schemaNamestatic voidcreateTableIfNeeded(String schemaName, IDatabaseAdapter target)Create the WHOLE_SCHEMA_VERSION table.static voiddropTable(String schemaName, IDatabaseAdapter target)Drop the WHOLE_SCHEMA_VERSION table if it exists in the given schemastatic voidgrantPrivilegesTo(IDatabaseAdapter target, String schemaName, String groupName, String toUser)Grant the user privileges so that the row from this table can be read by the $healthcheck custom operation.
 
- 
- 
- 
Field Detail- 
SCHEMA_GROUP_TAGpublic static final String SCHEMA_GROUP_TAG - See Also:
- Constant Field Values
 
 - 
ADMIN_GROUPpublic static final String ADMIN_GROUP - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
buildTableDefpublic static Table buildTableDef(PhysicalDataModel dataModel, String schemaName, boolean addTags) Builds the definition of the WHOLE_SCHEMA_VERSION table in the schema identified by schemaName- Parameters:
- dataModel-
- schemaName-
- addTags-
- Returns:
- the Tabledefinition
 
 - 
createTableIfNeededpublic static void createTableIfNeeded(String schemaName, IDatabaseAdapter target) Create the WHOLE_SCHEMA_VERSION table. The table is created in the target data schema, not the admin schema.- Parameters:
- schemaName-
- target-
 
 - 
dropTablepublic static void dropTable(String schemaName, IDatabaseAdapter target) Drop the WHOLE_SCHEMA_VERSION table if it exists in the given schema- Parameters:
- schemaName-
- target-
 
 - 
grantPrivilegesTopublic static void grantPrivilegesTo(IDatabaseAdapter target, String schemaName, String groupName, String toUser) Grant the user privileges so that the row from this table can be read by the $healthcheck custom operation.- Parameters:
- target-
- groupName-
- toUser-
 
 
- 
 
-