예제 #1
0
 public static Result getLatestResult(UserAccount user) throws GameServiceException {
   try {
     return resultDao.getLatestResult(user);
   } catch (DAOException e) {
     e.printStackTrace();
     throw new GameServiceException();
   }
 }
예제 #2
0
 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();
   }
 }
예제 #3
0
 static {
   DAOFactory factory;
   try {
     factory = DAOFactory.getInstance();
     resultDao = factory.getResultDao();
   } catch (DAOException e) {
     e.printStackTrace();
   }
 }
예제 #4
0
  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;
  }