Class AbstractLogItemEventCommand

java.lang.Object
marauroa.server.db.command.AbstractDBCommand
games.stendhal.server.core.engine.dbcommand.AbstractLogItemEventCommand
All Implemented Interfaces:
DBCommand
Direct Known Subclasses:
LogMergeItemEventCommand, LogSimpleItemEventCommand, LogSplitItemEventCommand

public abstract class AbstractLogItemEventCommand extends AbstractDBCommand
base class for item logging
Author:
hendrik
  • Constructor Details

    • AbstractLogItemEventCommand

      public AbstractLogItemEventCommand()
  • Method Details

    • execute

      public void execute(DBTransaction transaction) throws SQLException
      Description copied from class: AbstractDBCommand
      processes the database request.
      Specified by:
      execute in interface DBCommand
      Specified by:
      execute in class AbstractDBCommand
      Parameters:
      transaction - DBTransaction
      Throws:
      SQLException - in case of an database error
    • log

      protected abstract void log(DBTransaction transaction) throws SQLException
      logs the event to the database.
      Parameters:
      transaction - DBTransaction
      Throws:
      SQLException - in case of an database error
    • getQuantity

      protected String getQuantity(RPObject item)
      gets the quantity from an item; correctly handles non stackable items
      Parameters:
      item - Item
      Returns:
      quantity