/** * Copyright 2010 The University of Nottingham * * This file is part of lobbyservice. * * lobbyservice is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * lobbyservice is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with lobbyservice. If not, see <http://www.gnu.org/licenses/>. * */ package uk.ac.horizon.ug.lobby.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Lob; import com.google.appengine.api.datastore.Key; /** * @author cmg * */ @Entity public class GameTemplateAuditRecord { /** key - autogenerated */ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key key; /** game template id */ private String gameTemplateId; /** game instance factory key (if created from a game instance factory) */ private Key gameInstanceFactoryKey; /** game instance */ private Key gameInstanceKey; /** account key */ private Key accountKey; /** client IP */ private String clientIp; /** time */ private long time; /** created time */ private GameTemplateAuditRecordType type; /** level */ private AuditRecordLevel level; /** details - JSON */ @Lob private String detailsJson; /** message */ private String message; /** cons */ public GameTemplateAuditRecord() { } /** * @param key * @param gameTemplateId * @param gameInstanceFactoryKey * @param gameInstanceKey * @param accountKey * @param clientIp * @param time * @param type * @param level * @param detailsJson * @param message */ public GameTemplateAuditRecord(Key key, String gameTemplateId, Key gameInstanceFactoryKey, Key gameInstanceKey, Key accountKey, String clientIp, long time, GameTemplateAuditRecordType type, AuditRecordLevel level, String detailsJson, String message) { super(); this.key = key; this.gameTemplateId = gameTemplateId; this.gameInstanceFactoryKey = gameInstanceFactoryKey; this.gameInstanceKey = gameInstanceKey; this.accountKey = accountKey; this.clientIp = clientIp; this.time = time; this.type = type; this.level = level; this.detailsJson = detailsJson; this.message = message; } /** * @return the key */ public Key getKey() { return key; } /** * @param key the key to set */ public void setKey(Key key) { this.key = key; } /** * @return the gameTemplateId */ public String getGameTemplateId() { return gameTemplateId; } /** * @param gameTemplateId the gameTemplateId to set */ public void setGameTemplateId(String gameTemplateId) { this.gameTemplateId = gameTemplateId; } /** * @return the gameInstanceFactoryKey */ public Key getGameInstanceFactoryKey() { return gameInstanceFactoryKey; } /** * @param gameInstanceFactoryKey the gameInstanceFactoryKey to set */ public void setGameInstanceFactoryKey(Key gameInstanceFactoryKey) { this.gameInstanceFactoryKey = gameInstanceFactoryKey; } /** * @return the gameInstanceKey */ public Key getGameInstanceKey() { return gameInstanceKey; } /** * @param gameInstanceKey the gameInstanceKey to set */ public void setGameInstanceKey(Key gameInstanceKey) { this.gameInstanceKey = gameInstanceKey; } /** * @return the accountKey */ public Key getAccountKey() { return accountKey; } /** * @param accountKey the accountKey to set */ public void setAccountKey(Key accountKey) { this.accountKey = accountKey; } /** * @return the clientIp */ public String getClientIp() { return clientIp; } /** * @param clientIp the clientIp to set */ public void setClientIp(String clientIp) { this.clientIp = clientIp; } /** * @return the time */ public long getTime() { return time; } /** * @param time the time to set */ public void setTime(long time) { this.time = time; } /** * @return the type */ public GameTemplateAuditRecordType getType() { return type; } /** * @param type the type to set */ public void setType(GameTemplateAuditRecordType type) { this.type = type; } /** * @return the level */ public AuditRecordLevel getLevel() { return level; } /** * @param level the level to set */ public void setLevel(AuditRecordLevel level) { this.level = level; } /** * @return the detailsJson */ public String getDetailsJson() { return detailsJson; } /** * @param detailsJson the detailsJson to set */ public void setDetailsJson(String detailsJson) { this.detailsJson = detailsJson; } /** * @return the message */ public String getMessage() { return message; } /** * @param message the message to set */ public void setMessage(String message) { this.message = message; } }