package kuzumeji.action.home.erp;
import java.util.ArrayList;
import java.util.List;
import kuzumeji.action.home.BaseEntityHome;
import kuzumeji.entity.Person;
import kuzumeji.entity.erp.Team;
import kuzumeji.entity.erp.mng.Activity;
import kuzumeji.entity.erp.mng.WorkerCost;
import org.jboss.seam.annotations.Name;
/**
 * TeamHome
 * @author nilcy
 */
@Name("teamHome")
public class TeamHome extends BaseEntityHome<Team> {
    /** S/N */
    private static final long serialVersionUID = -4030035316068359607L;
    /**
     * get TeamId
     * @return TeamId
     */
    public Long getTeamId() {
        return (Long) getId();
    }
    /**
     * set TeamId
     * @param aTeamId TeamId
     */
    public void setTeamId(Long aTeamId) {
        setId(aTeamId);
    }
    @Override
    protected Team createInstance() {
        Team team = new Team();
        return team;
    }
    /**
     * load
     */
    public void load() {
        if (isIdDefined()) {
            wire();
        }
    }
    /**
     * wire
     */
    public void wire() {
        getInstance();
    }
    /**
     * isWired
     * @return isWired
     */
    public boolean isWired() {
        return true;
    }
    /**
     * get DefinedInstance
     * @return DefinedInstance
     */
    public Team getDefinedInstance() {
        return isIdDefined() ? getInstance() : null;
    }
    /**
     * get Activities
     * @return Activities
     */
    public List<Activity> getActivities() {
        return getInstance() == null ? null : new ArrayList<Activity>(getInstance().getActivities());
    }
    /**
     * get WorkerCosts
     * @return WorkerCosts
     */
    public List<WorkerCost> getWorkerCosts() {
        return getInstance() == null ? null : new ArrayList<WorkerCost>(getInstance().getWorkerCosts());
    }
    /**
     * get Workers
     * @return Workers
     */
    public List<Person> getWorkers() {
        return getInstance() == null ? null : new ArrayList<Person>(getInstance().getWorkers());
    }
}
