use of org.fisco.bcos.channel.test.contract.TableTest.RemoveResultEventResponse in project web3sdk by FISCO-BCOS.
the class TableTestClient method remove.
private static void remove(String[] args, TableTest tabletest) {
if (args.length == 3) {
try {
String name = args[1];
int item_id = Integer.parseInt(args[2]);
RemoteCall<TransactionReceipt> remove = tabletest.remove(name, BigInteger.valueOf(item_id));
TransactionReceipt transactionReceipt = remove.send();
List<RemoveResultEventResponse> removeResultEvents = tabletest.getRemoveResultEvents(transactionReceipt);
if (removeResultEvents.size() > 0) {
RemoveResultEventResponse reomveResultEventResponse = removeResultEvents.get(0);
logger.info("removeCount = " + reomveResultEventResponse.count.intValue());
System.out.println("removeCount = " + reomveResultEventResponse.count.intValue());
} else {
System.out.println("t_test table does not exist.");
}
} catch (Exception e) {
System.out.println("remove transaction is abnormal, please check the environment");
}
} else {
System.out.println("\nPlease enter as follow example:\n 1 1 remove fruit 1");
}
}
Aggregations