public static Result getLatestResult(UserAccount user) throws GameServiceException { try { return resultDao.getLatestResult(user); } catch (DAOException e) { e.printStackTrace(); throw new GameServiceException(); } }
public static List<Result> getFriendRanking(GameSetting gameSetting, int size) throws GameServiceException { try { return resultDao.getFriendRanking(gameSetting, size); } catch (DAOException e) { e.printStackTrace(); throw new GameServiceException(); } }
static { DAOFactory factory; try { factory = DAOFactory.getInstance(); resultDao = factory.getResultDao(); } catch (DAOException e) { e.printStackTrace(); } }
public static boolean saveGameResult( UserAccount player, int score, int correct, int incorrect, GameSetting setting) throws GameServiceException { try { resultDao.saveGameResult(player, score, correct, incorrect, setting); } catch (DAOException e) { e.printStackTrace(); throw new GameServiceException(); } return false; }