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