Package com.sprhib.model

Examples of com.sprhib.model.Team


  public void addTeam(Team team) {
    getCurrentSession().save(team);
  }

  public void updateTeam(Team team) {
    Team teamToUpdate = getTeam(team.getId());
    teamToUpdate.setName(team.getName());
    teamToUpdate.setRating(team.getRating());
    getCurrentSession().update(teamToUpdate);
   
  }
View Full Code Here


    getCurrentSession().update(teamToUpdate);
   
  }

  public Team getTeam(int id) {
    Team team = (Team) getCurrentSession().get(Team.class, id);
    return team;
  }
View Full Code Here

    Team team = (Team) getCurrentSession().get(Team.class, id);
    return team;
  }

  public void deleteTeam(int id) {
    Team team = getTeam(id);
    if (team != null)
      getCurrentSession().delete(team);
  }
View Full Code Here

  private TeamService teamService;
 
  @RequestMapping(value="/add", method=RequestMethod.GET)
  public ModelAndView addTeamPage() {
    ModelAndView modelAndView = new ModelAndView("add-team-form");
    modelAndView.addObject("team", new Team());
    return modelAndView;
  }
View Full Code Here

  }
 
  @RequestMapping(value="/edit/{id}", method=RequestMethod.GET)
  public ModelAndView editTeamPage(@PathVariable Integer id) {
    ModelAndView modelAndView = new ModelAndView("edit-team-form");
    Team team = teamService.getTeam(id);
    modelAndView.addObject("team",team);
    return modelAndView;
  }
View Full Code Here

TOP

Related Classes of com.sprhib.model.Team

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.