From: Mailing l. f. S. c. m. <jtc...@li...> - 2007-07-18 11:56:50
|
Revision: 2736 http://jtcfrost.svn.sourceforge.net/jtcfrost/?rev=2736&view=rev Author: bback Date: 2007-07-18 04:56:46 -0700 (Wed, 18 Jul 2007) Log Message: ----------- - 1.5 compliance Modified Paths: -------------- trunk/frost-wot/source/frost/gui/sentmessages/SentMessagesTableModel.java trunk/frost-wot/source/frost/messages/SentMessagesManager.java trunk/frost-wot/source/frost/storage/database/applayer/SentMessageDatabaseTable.java Modified: trunk/frost-wot/source/frost/gui/sentmessages/SentMessagesTableModel.java =================================================================== --- trunk/frost-wot/source/frost/gui/sentmessages/SentMessagesTableModel.java 2007-07-18 11:53:50 UTC (rev 2735) +++ trunk/frost-wot/source/frost/gui/sentmessages/SentMessagesTableModel.java 2007-07-18 11:56:46 UTC (rev 2736) @@ -30,8 +30,8 @@ } public void loadTableModel() { - List msgs = SentMessagesManager.retrieveSentMessages(); - for( Iterator i = msgs.iterator(); i.hasNext(); ) { + List<FrostMessageObject> msgs = SentMessagesManager.retrieveSentMessages(); + for( Iterator<FrostMessageObject> i = msgs.iterator(); i.hasNext(); ) { FrostMessageObject mo = (FrostMessageObject) i.next(); SentMessagesTableItem item = new SentMessagesTableItem(mo); addSendMessageItem(item); Modified: trunk/frost-wot/source/frost/messages/SentMessagesManager.java =================================================================== --- trunk/frost-wot/source/frost/messages/SentMessagesManager.java 2007-07-18 11:53:50 UTC (rev 2735) +++ trunk/frost-wot/source/frost/messages/SentMessagesManager.java 2007-07-18 11:56:46 UTC (rev 2736) @@ -28,14 +28,14 @@ private static final Logger logger = Logger.getLogger(SentMessagesManager.class.getName()); - public static List retrieveSentMessages() { + public static List<FrostMessageObject> retrieveSentMessages() { try { return AppLayerDatabase.getSentMessageTable().retrieveAllMessages(); } catch(Throwable t) { logger.log(Level.SEVERE, "Error retrieving sent messages", t); } - return new LinkedList(); + return new LinkedList<FrostMessageObject>(); } public static boolean addSentMessage(FrostMessageObject sentMo) { @@ -49,7 +49,7 @@ return true; // if we return false the msg is resent ! } - public static int deleteSentMessages(List msgObjects) { + public static int deleteSentMessages(List<FrostMessageObject> msgObjects) { int deleted = 0; try { deleted = AppLayerDatabase.getSentMessageTable().deleteMessages(msgObjects); Modified: trunk/frost-wot/source/frost/storage/database/applayer/SentMessageDatabaseTable.java =================================================================== --- trunk/frost-wot/source/frost/storage/database/applayer/SentMessageDatabaseTable.java 2007-07-18 11:53:50 UTC (rev 2735) +++ trunk/frost-wot/source/frost/storage/database/applayer/SentMessageDatabaseTable.java 2007-07-18 11:56:46 UTC (rev 2736) @@ -86,13 +86,13 @@ return "sentmsgcont_index"; } - public int deleteMessages(List messages) throws SQLException { + public int deleteMessages(List<FrostMessageObject> messages) throws SQLException { AppLayerDatabase db = AppLayerDatabase.getInstance(); PreparedStatement ps = db.prepareStatement("DELETE FROM "+getMessageTableName()+" WHERE primkey=?"); int deletedCount = 0; - for(Iterator i=messages.iterator(); i.hasNext(); ) { + for(Iterator<FrostMessageObject> i=messages.iterator(); i.hasNext(); ) { FrostMessageObject mo = (FrostMessageObject) i.next(); ps.setLong(1, mo.getMsgIdentity()); deletedCount += ps.executeUpdate(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |