diff --git a/src/java/com/threerings/parlor/rating/server/persist/PercentileRecord.java b/src/java/com/threerings/parlor/rating/server/persist/PercentileRecord.java index 3e6744f0..23e9a7ba 100644 --- a/src/java/com/threerings/parlor/rating/server/persist/PercentileRecord.java +++ b/src/java/com/threerings/parlor/rating/server/persist/PercentileRecord.java @@ -61,10 +61,10 @@ public class PercentileRecord extends PersistentRecord */ public static Key getKey (int gameId, int gameMode) { - return new Key( - PercentileRecord.class, - new ColumnExp[] { GAME_ID, GAME_MODE }, - new Comparable[] { gameId, gameMode }); + return newKey(_R, gameId, gameMode); } + + /** Register the key fields in an order matching the getKey() factory. */ + static { registerKeyFields(GAME_ID, GAME_MODE); } // AUTO-GENERATED: METHODS END } diff --git a/src/java/com/threerings/parlor/rating/server/persist/RatingRecord.java b/src/java/com/threerings/parlor/rating/server/persist/RatingRecord.java index 72cf6489..52c6ff99 100644 --- a/src/java/com/threerings/parlor/rating/server/persist/RatingRecord.java +++ b/src/java/com/threerings/parlor/rating/server/persist/RatingRecord.java @@ -96,10 +96,10 @@ public class RatingRecord extends PersistentRecord */ public static Key getKey (int gameId, int playerId) { - return new Key( - RatingRecord.class, - new ColumnExp[] { GAME_ID, PLAYER_ID }, - new Comparable[] { gameId, playerId }); + return newKey(_R, gameId, playerId); } + + /** Register the key fields in an order matching the getKey() factory. */ + static { registerKeyFields(GAME_ID, PLAYER_ID); } // AUTO-GENERATED: METHODS END } diff --git a/src/java/com/threerings/stats/server/persist/StatRecord.java b/src/java/com/threerings/stats/server/persist/StatRecord.java index 80bfb6d2..9da1acd9 100644 --- a/src/java/com/threerings/stats/server/persist/StatRecord.java +++ b/src/java/com/threerings/stats/server/persist/StatRecord.java @@ -98,10 +98,10 @@ public class StatRecord extends PersistentRecord */ public static Key getKey (int playerId, int statCode) { - return new Key( - StatRecord.class, - new ColumnExp[] { PLAYER_ID, STAT_CODE }, - new Comparable[] { playerId, statCode }); + return newKey(_R, playerId, statCode); } + + /** Register the key fields in an order matching the getKey() factory. */ + static { registerKeyFields(PLAYER_ID, STAT_CODE); } // AUTO-GENERATED: METHODS END } diff --git a/src/java/com/threerings/stats/server/persist/StringCodeRecord.java b/src/java/com/threerings/stats/server/persist/StringCodeRecord.java index dc4b9e13..1ad7e647 100644 --- a/src/java/com/threerings/stats/server/persist/StringCodeRecord.java +++ b/src/java/com/threerings/stats/server/persist/StringCodeRecord.java @@ -92,10 +92,10 @@ public class StringCodeRecord extends PersistentRecord */ public static Key getKey (int statCode, String value) { - return new Key( - StringCodeRecord.class, - new ColumnExp[] { STAT_CODE, VALUE }, - new Comparable[] { statCode, value }); + return newKey(_R, statCode, value); } + + /** Register the key fields in an order matching the getKey() factory. */ + static { registerKeyFields(STAT_CODE, VALUE); } // AUTO-GENERATED: METHODS END }