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); }
public LeagueLogic getLeagueLogic(Season season) { final LeagueDao dao = (LeagueDao) UnitOfWork.get().getDao(League.class); return new LeagueLogic(dao, season); }
public static List<Referee> getLicensedReferees(Club c, Season season) { RefereeDao refereeDao = (RefereeDao) UnitOfWork.get().getDao(Referee.class); return refereeDao.findAllLicensedByClub(season, c); }
public static Integer getNumLicensedReferees(Club c, Season season) { RefereeDao refereeDao = (RefereeDao) UnitOfWork.get().getDao(Referee.class); return refereeDao.countLicensedByClub(season, c); }
public List<Referee> getReferees(Club c) { RefereeDao refereeDao = (RefereeDao) UnitOfWork.get().getDao(Referee.class); return refereeDao.findByClub(c); }
public static List<Team> getTeams(Club c, Season season) { TeamDao teamDao = (TeamDao) UnitOfWork.get().getDao(Team.class); return teamDao.findByClub(c, season); }
public static Integer getNumTeams(Club c, Season season) { TeamDao teamDao = (TeamDao) UnitOfWork.get().getDao(Team.class); return teamDao.countByClub(c, season); }
public void update(Person person) { PersonDao dao = (PersonDao) UnitOfWork.get().getDao(Person.class); dao.update(person); }
public void add(Person person) { PersonDao dao = (PersonDao) UnitOfWork.get().getDao(Person.class); dao.insert(person); }
public void updateContact(ClubContact clubContact) { ClubContactDao dao = (ClubContactDao) UnitOfWork.get().getDao(ClubContact.class); dao.update(clubContact); }
public void addContact(ClubContact clubContact) { ClubContactDao dao = (ClubContactDao) UnitOfWork.get().getDao(ClubContact.class); dao.insert(clubContact); }
public static List<Club> getActiveClubs(Association assoc, Season season) { final ClubDao dao = (ClubDao) UnitOfWork.get().getDao(Club.class); return dao.findActiveClubs(assoc, season); }
public static List<Club> getClubs() { final ClubDao dao = (ClubDao) UnitOfWork.get().getDao(Club.class); return dao.findAll(); }