}
System.exit(0);
}
private void logTransfer(ItemInfo oldItemInfo, ItemInfo itemInfo, LogEntry entry) {
DBTransaction transaction = TransactionPool.get().beginWork();
try {
String query = "INSERT INTO itemtransfer_analyse (itemid, name, quantity, giver, receiver, oldid) VALUES ([itemid], '[name]', '[quantity]', '[giver]', '[receiver]', [oldid]);";
Map<String, Object> params = new HashMap<String, Object>();
params.put("itemid", oldItemInfo.getItemid());
params.put("name", oldItemInfo.getName());
params.put("quantity", itemInfo.getQuantity());
params.put("giver", oldItemInfo.getOwner());
params.put("receiver", itemInfo.getOwner());
params.put("oldid", entry.getId());
transaction.execute(query, params);
//System.out.println(itemInfo + " " + oldItemInfo.getOwner() + " " + itemInfo.getOwner());
TransactionPool.get().commit(transaction);
} catch (Exception e) {
TransactionPool.get().rollback(transaction);