* RESOLVE - This loop will eventually drive all of the
* work for creating the core tables.
*/
for (int coreCtr = 0; coreCtr < NUM_CORE; coreCtr++)
{
TabInfo ti = coreInfo[coreCtr];
Properties heapProperties = ti.getCreateHeapProperties();
ti.setHeapConglomerate(
createConglomerate(
ti.getTableName(),
tc,
ti.getCatalogRowFactory().makeEmptyRow(),
heapProperties
)
);
// bootstrap indexes on core tables before bootstraping the tables themselves
if (coreInfo[coreCtr].getNumberOfIndexes() > 0)
{
bootStrapSystemIndexes(systemSchemaDesc, tc, ddg, ti);
}
}
// bootstrap the core tables into the data dictionary
for ( int ictr = 0; ictr < NUM_CORE; ictr++ )
{
/* RESOLVE - need to do something with COLUMNTYPE in following table creating code */
TabInfo ti = coreInfo[ictr];
addSystemTableToDictionary(ti, systemSchemaDesc, tc, ddg);
}
// Add the bootstrap information to the configuration
params.put(CFG_SYSTABLES_ID,
Long.toString(
coreInfo[SYSTABLES_CORE_NUM].getHeapConglomerate()));
params.put(CFG_SYSTABLES_INDEX1_ID,
Long.toString(
coreInfo[SYSTABLES_CORE_NUM].getIndexConglomerate(
((SYSTABLESRowFactory) coreInfo[SYSTABLES_CORE_NUM].
getCatalogRowFactory()).SYSTABLES_INDEX1_ID)));
params.put(CFG_SYSTABLES_INDEX2_ID,
Long.toString(
coreInfo[SYSTABLES_CORE_NUM].getIndexConglomerate(
((SYSTABLESRowFactory) coreInfo[SYSTABLES_CORE_NUM].
getCatalogRowFactory()).SYSTABLES_INDEX2_ID)));
params.put(CFG_SYSCOLUMNS_ID,
Long.toString(
coreInfo[SYSCOLUMNS_CORE_NUM].getHeapConglomerate()));
params.put(CFG_SYSCOLUMNS_INDEX1_ID,
Long.toString(
coreInfo[SYSCOLUMNS_CORE_NUM].getIndexConglomerate(
((SYSCOLUMNSRowFactory) coreInfo[SYSCOLUMNS_CORE_NUM].
getCatalogRowFactory()).SYSCOLUMNS_INDEX1_ID)));
params.put(CFG_SYSCOLUMNS_INDEX2_ID,
Long.toString(
coreInfo[SYSCOLUMNS_CORE_NUM].getIndexConglomerate(
((SYSCOLUMNSRowFactory) coreInfo[SYSCOLUMNS_CORE_NUM].
getCatalogRowFactory()).SYSCOLUMNS_INDEX2_ID)));
params.put(CFG_SYSCONGLOMERATES_ID,
Long.toString(
coreInfo[SYSCONGLOMERATES_CORE_NUM].getHeapConglomerate()));
params.put(CFG_SYSCONGLOMERATES_INDEX1_ID,
Long.toString(
coreInfo[SYSCONGLOMERATES_CORE_NUM].getIndexConglomerate(
((SYSCONGLOMERATESRowFactory) coreInfo[SYSCONGLOMERATES_CORE_NUM].
getCatalogRowFactory()).SYSCONGLOMERATES_INDEX1_ID)));
params.put(CFG_SYSCONGLOMERATES_INDEX2_ID,
Long.toString(
coreInfo[SYSCONGLOMERATES_CORE_NUM].getIndexConglomerate(
((SYSCONGLOMERATESRowFactory) coreInfo[SYSCONGLOMERATES_CORE_NUM].
getCatalogRowFactory()).SYSCONGLOMERATES_INDEX2_ID)));
params.put(CFG_SYSCONGLOMERATES_INDEX3_ID,
Long.toString(
coreInfo[SYSCONGLOMERATES_CORE_NUM].getIndexConglomerate(
((SYSCONGLOMERATESRowFactory) coreInfo[SYSCONGLOMERATES_CORE_NUM].
getCatalogRowFactory()).SYSCONGLOMERATES_INDEX3_ID)));
params.put(CFG_SYSSCHEMAS_ID,
Long.toString(
coreInfo[SYSSCHEMAS_CORE_NUM].getHeapConglomerate()));
params.put(CFG_SYSSCHEMAS_INDEX1_ID,
Long.toString(
coreInfo[SYSSCHEMAS_CORE_NUM].getIndexConglomerate(
((SYSSCHEMASRowFactory) coreInfo[SYSSCHEMAS_CORE_NUM].
getCatalogRowFactory()).SYSSCHEMAS_INDEX1_ID)));
params.put(CFG_SYSSCHEMAS_INDEX2_ID,
Long.toString(
coreInfo[SYSSCHEMAS_CORE_NUM].getIndexConglomerate(
((SYSSCHEMASRowFactory) coreInfo[SYSSCHEMAS_CORE_NUM].
getCatalogRowFactory()).SYSSCHEMAS_INDEX2_ID)));
//Add the SYSIBM Schema
sysIBMSchemaDesc =
addSystemSchema(
SchemaDescriptor.IBM_SYSTEM_SCHEMA_NAME,
SchemaDescriptor.SYSIBM_SCHEMA_UUID, tc);
/* Create the non-core tables and generate the UUIDs for their
* heaps (before creating the indexes).
* RESOLVE - This loop will eventually drive all of the
* work for creating the non-core tables.
*/
for (int noncoreCtr = 0; noncoreCtr < NUM_NONCORE; noncoreCtr++)
{
int catalogNumber = noncoreCtr + NUM_CORE;
boolean isDummy = (catalogNumber == SYSDUMMY1_CATALOG_NUM);
TabInfo ti = getNonCoreTIByNumber(catalogNumber);
makeCatalog(ti, isDummy ? sysIBMSchemaDesc : systemSchemaDesc, tc );
if (isDummy)
populateSYSDUMMY1(tc);