Exemplo n.º 1
0
 public void addTeamToLeague(Long teamId, Long leagueId) {
   final LeagueDao leagueDao = (LeagueDao) UnitOfWork.get().getDao(League.class);
   League league = leagueDao.find(leagueId);
   final TeamDao teamDao = (TeamDao) UnitOfWork.get().getDao(Team.class);
   Team team = teamDao.find(teamId);
   leagueDao.addToLeague(league, team);
 }
Exemplo n.º 2
0
 public static List<Team> getTeams(Club c, Season season) {
   TeamDao teamDao = (TeamDao) UnitOfWork.get().getDao(Team.class);
   return teamDao.findByClub(c, season);
 }
Exemplo n.º 3
0
 public static Integer getNumTeams(Club c, Season season) {
   TeamDao teamDao = (TeamDao) UnitOfWork.get().getDao(Team.class);
   return teamDao.countByClub(c, season);
 }