/** * Load the GameCharacter from the database. * * @param name The (unique) name of the game character. * @return A GameCharacter object holding all information. * @exception UnknownUserException If no entry with the given name could be found in the database. */ public static GameCharacter load(String name) throws UnknownUserException { // Load user state from database. This method throws a // UserNotFoundException if the user is not in the database. Log.info("CharacterState", "load", "Load data of character: " + name); try { GameCharacter character = JdbcUtil.loadCharacter(name); character.setStateful(true); Log.info("CharacterState", "load", "Character data loaded."); return character; } catch (NoRecordFoundException e) { throw new UnknownUserException("Character name: " + name); } }