final CharBuffer str0 = CharBuffer.wrap(Integer.toString(c0));
final int r = -c0;
final CharBuffer str1 = CharBuffer.wrap(Integer.toString(r));
// get an update operation for the table
NdbOperation op = tx.getNdbOperation(table_t0);
if (op == null)
throw new RuntimeException(TwsUtils.toStr(tx.getNdbError()));
if (op.updateTuple() != 0)
throw new RuntimeException(TwsUtils.toStr(tx.getNdbError()));
// include exception handling as part of transcoding pattern
try {
// set values; key attribute needs to be set first
//str0.rewind();
ndbjtieTranscode(bb, str0);
if (op.equal(metaData.getAttr(0), bb) != 0) // key
throw new RuntimeException(TwsUtils.toStr(tx.getNdbError()));
bb.position(bb.position() + metaData.getColumnWidth(0));
//str1.rewind();
ndbjtieTranscode(bb, str1);
if (op.setValue(metaData.getAttr(1), bb) != 0)
throw new RuntimeException(TwsUtils.toStr(tx.getNdbError()));
bb.position(bb.position() + metaData.getColumnWidth(1));
if (op.setValue(metaData.getAttr(2), r) != 0)
throw new RuntimeException(TwsUtils.toStr(tx.getNdbError()));
if (op.setValue(metaData.getAttr(3), r) != 0)
throw new RuntimeException(TwsUtils.toStr(tx.getNdbError()));
for(int i = 5; i < metaData.getColumnCount(); i++) {
str1.rewind();
ndbjtieTranscode(bb, str1);
if (op.setValue(metaData.getAttr(i), bb) != 0)
throw new RuntimeException(TwsUtils.toStr(tx.getNdbError()));
bb.position(bb.position() + metaData.getColumnWidth(i));
}
} catch (CharacterCodingException e) {