UUID tableUUID,
String columnName,
long aiValue, boolean incrementNeeded)
throws StandardException
{
TabInfo ti = coreInfo[SYSCOLUMNS_CORE_NUM];
ExecIndexRow keyRow = null;
keyRow = (ExecIndexRow)exFactory.getIndexableRow(2);
keyRow.setColumn(1, dvf.getCharDataValue(tableUUID.toString()));
keyRow.setColumn(2, dvf.getCharDataValue(columnName));
SYSCOLUMNSRowFactory rf = (SYSCOLUMNSRowFactory) ti.getCatalogRowFactory();
ExecRow row = rf.makeEmptyRow();
boolean[] bArray = new boolean[2];
for (int index = 0; index < 2; index++)
{
bArray[index] = false;
}
int[] colsToUpdate = new int[1];
colsToUpdate[0] = SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTVALUE;
if (incrementNeeded)
{
ExecRow readRow = ti.getRow(tc, keyRow,
SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID);
NumberDataValue increment =
(NumberDataValue)readRow.getColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTINC);
aiValue += increment.getLong();
}
row.setColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTVALUE,
dvf.getDataValue(aiValue));
ti.updateRow(keyRow, row,
SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID,
bArray,
colsToUpdate,
tc);
return;