From: Hendrik B. <nh...@us...> - 2013-07-09 20:03:30
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/core/engine/dbcommand In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv18986/src/games/stendhal/server/core/engine/dbcommand Modified Files: AbstractLogItemEventCommand.java Log Message: fixed javadoc warnings Index: AbstractLogItemEventCommand.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/core/engine/dbcommand/AbstractLogItemEventCommand.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AbstractLogItemEventCommand.java 24 Apr 2013 20:19:42 -0000 1.6 --- AbstractLogItemEventCommand.java 9 Jul 2013 20:03:26 -0000 1.7 *************** *** 1,4 **** /*************************************************************************** ! * (C) Copyright 2007-2010 - Stendhal * *************************************************************************** *************************************************************************** --- 1,4 ---- /*************************************************************************** ! * (C) Copyright 2007-2013 - Stendhal * *************************************************************************** *************************************************************************** *************** *** 31,34 **** --- 31,35 ---- */ public abstract class AbstractLogItemEventCommand extends AbstractDBCommand { + /** attribute name of itemid */ public static final String ATTR_ITEM_LOGID = "logid"; *************** *** 39,45 **** ! protected abstract void log(DBTransaction transaction) throws SQLException; protected String getQuantity(final RPObject item) { int quantity = 1; --- 40,57 ---- ! /** ! * logs the event to the database. ! * ! * @param transaction DBTransaction ! * @throws SQLException in case of an database error ! */ protected abstract void log(DBTransaction transaction) throws SQLException; + /** + * gets the quantity from an item; correctly handles non stackable items + * + * @param item Item + * @return quantity + */ protected String getQuantity(final RPObject item) { int quantity = 1; *************** *** 75,78 **** --- 87,91 ---- /** * Logs the name of the item on first. + * * @param transaction * @param item *************** *** 83,86 **** --- 96,112 ---- } + /** + * writes a log entry + * + * @param transaction DBTransaction + * @param item item + * @param player player object + * @param event name of event + * @param param1 param 1 + * @param param2 param 2 + * @param param3 param 3 + * @param param4 param 4 + * @throws SQLException in case of an database error + */ protected void itemLogWriteEntry(final DBTransaction transaction, final RPObject item, final RPEntity player, final String event, final String param1, final String param2, final String param3, final String param4) throws SQLException { int itemid = item.getInt(ATTR_ITEM_LOGID); *************** *** 88,91 **** --- 114,130 ---- } + /** + * writes a log entry + * + * @param transaction DBTransaction + * @param itemid itemid of item + * @param player player object + * @param event name of event + * @param param1 param 1 + * @param param2 param 2 + * @param param3 param 3 + * @param param4 param 4 + * @throws SQLException in case of an database error + */ protected void itemLogWriteEntry(final DBTransaction transaction, final int itemid, final RPEntity player, final String event, final String param1, final String param2, final String param3, final String param4) throws SQLException { String playerName = null; |