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