Tidying.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@405 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -45,7 +45,6 @@ public class GameCookieRepository extends DepotRepository
|
|||||||
public byte[] getCookie (int gameId, int userId)
|
public byte[] getCookie (int gameId, int userId)
|
||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
// INDEX: Primary key.
|
|
||||||
GameCookieRecord record = load(
|
GameCookieRecord record = load(
|
||||||
GameCookieRecord.class, GameCookieRecord.getKey(gameId, userId));
|
GameCookieRecord.class, GameCookieRecord.getKey(gameId, userId));
|
||||||
return record != null ? record.cookie : null;
|
return record != null ? record.cookie : null;
|
||||||
@@ -54,15 +53,12 @@ public class GameCookieRepository extends DepotRepository
|
|||||||
/**
|
/**
|
||||||
* Set the specified user's game cookie.
|
* Set the specified user's game cookie.
|
||||||
*/
|
*/
|
||||||
public void setCookie (
|
public void setCookie (int gameId, int userId, byte[] cookie)
|
||||||
final int gameId, final int userId, final byte[] cookie)
|
|
||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
if (cookie != null) {
|
if (cookie != null) {
|
||||||
// INDEX: Primary key.
|
|
||||||
store(new GameCookieRecord(gameId, userId, cookie));
|
store(new GameCookieRecord(gameId, userId, cookie));
|
||||||
} else {
|
} else {
|
||||||
// INDEX: Primary key.
|
|
||||||
delete(GameCookieRecord.class, GameCookieRecord.getKey(gameId, userId));
|
delete(GameCookieRecord.class, GameCookieRecord.getKey(gameId, userId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user