package org.sistema.spring.autowiring.annotations.models;

import java.util.Hashtable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

/**
 * Represents a football stadium
 * 
 * @author Eugenia Pérez Martínez
 */
public class Team {
	private String name;
	private Hashtable<Integer, Player> players;
	@Autowired
	@Qualifier("sadar")
	private Home homeStadium;

	/**
	 * default constructor
	 */
	public Team() {
	}

	/**
	 * @param name
	 * @param players
	 * @param homeStadium
	 */
	public Team(String name, Hashtable<Integer, Player> players,
			Home homeStadium) {
		super();
		this.name = name;
		this.players = players;
		this.homeStadium = homeStadium;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Team [name=" + name + ", players=" + players.toString()
				+ ",homeStadium=" + homeStadium + "]";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Hashtable<Integer, Player> getPlayers() {
		return players;
	}

	public void setPlayers(Hashtable<Integer, Player> players) {
		this.players = players;
	}

	public Home getHomeStadium() {
		return homeStadium;
	}

	public void setHomeStadium(Home homeStadium) {
		this.homeStadium = homeStadium;
	}

}