switch (actionType) {
case ResultConstants.UPDATE_CURSOR : {
Long id = (Long) args[args.length - 1];
PersistentStore store =
session.sessionData.getRowStore(baseTable);
Row row = (Row) store.get((int) id.longValue(), false);
HashMappedList list = new HashMappedList();
Object[] data =
(Object[]) ArrayUtil.duplicateArray(row.getData());
for (int i = 0; i < baseColumnMap.length; i++) {
if (types[i] == Type.SQL_ALL_TYPES) {
continue;
}
data[baseColumnMap[i]] = args[i];
}
list.add(row, data);
update(session, baseTable, list);
break;
}
case ResultConstants.DELETE_CURSOR : {
Long id = (Long) args[args.length - 1];
PersistentStore store =
session.sessionData.getRowStore(baseTable);
Row row = (Row) store.get((int) id.longValue(), false);
RowSetNavigator navigator = new RowSetNavigatorLinkedList();
navigator.add(row);
delete(session, baseTable, navigator);
break;
}
case ResultConstants.INSERT_CURSOR : {
Object[] data = baseTable.getNewRowData(session);
for (int i = 0; i < data.length; i++) {
data[baseColumnMap[i]] = args[i];
}
PersistentStore store =
session.sessionData.getRowStore(baseTable);
baseTable.insertRow(session, store, data);
}
}