{
ExecIndexRow keyRow1 = null;
ExecRow row;
DataValueDescriptor IDOrderable;
DataValueDescriptor columnNameOrderable;
TabInfo ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);
SYSTRIGGERSRowFactory rf = (SYSTRIGGERSRowFactory) ti.getCatalogRowFactory();
/* Use objectID in both start
* and stop position for index 1 scan.
*/
IDOrderable = getValueAsDVD(formerUUID);
/* Set up the start/stop position for the scan */
keyRow1 = (ExecIndexRow) exFactory.getIndexableRow(1);
keyRow1.setColumn(1, IDOrderable);
// build the row to be stuffed into SYSTRIGGERS.
row = rf.makeRow(triggerd, null);
/*
** Figure out if the index in systriggers needs
** to be updated.
*/
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(rf.getNumIndexes() == 3,
"There are more indexes on systriggers than expected, the code herein needs to change");
}
boolean[] bArray = new boolean[3];
/*
** Do we need to update indexes?
*/
if (colsToSet == null)
{
bArray[0] = true;
bArray[1] = true;
bArray[2] = true;
}
else
{
/*
** Check the specific columns for indexed
** columns.
*/
for (int i = 0; i < colsToSet.length; i++)
{
switch (colsToSet[i])
{
case SYSTRIGGERSRowFactory.SYSTRIGGERS_TRIGGERID:
bArray[0] = true;
break;
case SYSTRIGGERSRowFactory.SYSTRIGGERS_TRIGGERNAME:
case SYSTRIGGERSRowFactory.SYSTRIGGERS_SCHEMAID:
bArray[1] = true;
break;
case SYSTRIGGERSRowFactory.SYSTRIGGERS_TABLEID:
bArray[2] = true;
break;
}
}
}
ti.updateRow(keyRow1, row,
SYSTRIGGERSRowFactory.SYSTRIGGERS_INDEX1_ID,
bArray,
colsToSet,
tc);
}