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