Package games.stendhal.tools.loganalyser.itemlog.consistency

Examples of games.stendhal.tools.loganalyser.itemlog.consistency.LogEntry


    DBTransaction transaction = TransactionPool.get().beginWork();
    try {
      final Iterator<LogEntry> itr = queryDatabase(transaction, timedate);
      ItemInfo oldItemInfo = new ItemInfo();
      while (itr.hasNext()) {
        final LogEntry entry = itr.next();

        // detect group change (next item)
        if (!entry.getItemid().equals(oldItemInfo.getItemid())) {
          oldItemInfo = new ItemInfo();
          oldItemInfo.setItemid(entry.getItemid());
          oldItemInfo.setName("");
          oldItemInfo.setQuantity("1");
          oldItemInfo.setOwner(entry.getSource());
        }

        ItemInfo itemInfo = (ItemInfo) oldItemInfo.clone();

        itemInfo.setOwner(entry.getSource());
        ItemEventType eventType = ItemEventTypeFactory.create(entry.getEvent());
        eventType.process(entry, itemInfo);

        if (!oldItemInfo.getOwner().equals(itemInfo.getOwner())) {
          logTransfer(oldItemInfo, itemInfo, entry);
        }
View Full Code Here

TOP

Related Classes of games.stendhal.tools.loganalyser.itemlog.consistency.LogEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.