From ceb4ea2a07bd7fdc714c277383a174ecc287c20b Mon Sep 17 00:00:00 2001 From: Mark Johnson Date: Fri, 23 Mar 2007 00:49:37 +0000 Subject: [PATCH] Added the ability to delete stat records for a player ID git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@261 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../threerings/stats/server/persist/StatRepository.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/java/com/threerings/stats/server/persist/StatRepository.java b/src/java/com/threerings/stats/server/persist/StatRepository.java index c4658a4a..06e9d156 100644 --- a/src/java/com/threerings/stats/server/persist/StatRepository.java +++ b/src/java/com/threerings/stats/server/persist/StatRepository.java @@ -93,6 +93,15 @@ public class StatRepository extends SimpleRepository return stats; } + /** + * Deletes all stats associated with the specified player. + */ + public void deleteStats (int playerId) + throws PersistenceException + { + update("delete from STATS where PLAYER_ID = " + playerId); + } + /** * Writes out any of the stats in the supplied array that have been modified since they were * first loaded. Exceptions that occur while writing the stats will be caught and logged.