From e53c8aae20af8bc0296b507d03e6424fcf40b69f Mon Sep 17 00:00:00 2001 From: Tom Conkling Date: Mon, 11 Aug 2008 23:04:13 +0000 Subject: [PATCH] Ok, now we're ready for this change git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@724 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../stats/server/persist/StatRepository.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/stats/server/persist/StatRepository.java b/src/java/com/threerings/stats/server/persist/StatRepository.java index ee80881d..ef529888 100644 --- a/src/java/com/threerings/stats/server/persist/StatRepository.java +++ b/src/java/com/threerings/stats/server/persist/StatRepository.java @@ -64,10 +64,10 @@ public class StatRepository extends DepotRepository * Applies a modification to a single stat. If the stat in question does not exist, a blank * instance will be created via {@link Stat.Type#newStat}. * - * @return true if the stat was modified and written to the database, false if the modifier had + * @return the modified Stat, if any modification took place; or null if the modification had * no effect on the stat's data. */ - public boolean updateStat (int playerId, StatModifier modifier) + public T updateStat (int playerId, StatModifier modifier) throws PersistenceException { Where where = new Where(StatRecord.PLAYER_ID_C, playerId, @@ -80,10 +80,10 @@ public class StatRepository extends DepotRepository @SuppressWarnings("unchecked") T tstat = (T)stat; modifier.modify(tstat); if (!tstat.isModified()) { - return false; + return null; } - if (updateStat(playerId, stat, false)) { - return true; + if (updateStat(playerId, tstat, false)) { + return tstat; } }