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