public Result getTournamentByTextId(int id) {

    TournamentService service = (TournamentService) ctx.getBean("tournamentService");
    Tournament t = service.getTournament(id);
    return ok(toJson(t));
  }
 public Result getAllTournaments() {
   TournamentService service = (TournamentService) ctx.getBean("tournamentService");
   List<Tournament> tournaments = service.getAllTournaments();
   return ok(toJson(tournaments));
 }