package kuzumeji.action.home.erp.mng;
import kuzumeji.action.home.BaseEntityHome;
import kuzumeji.action.home.erp.TeamHome;
import kuzumeji.entity.erp.Team;
import kuzumeji.entity.erp.mng.WorkerCost;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@Name("workerCostHome")
public class WorkerCostHome extends BaseEntityHome<WorkerCost> {
    @In(create = true)
    TeamHome teamHome;
    public void setWorkerCostId(Long id) {
        setId(id);
    }
    public Long getWorkerCostId() {
        return (Long) getId();
    }
    @Override
    protected WorkerCost createInstance() {
        WorkerCost workerCost = new WorkerCost();
        return workerCost;
    }
    public void load() {
        if (isIdDefined()) {
            wire();
        }
    }
    public void wire() {
        getInstance();
        Team party = teamHome.getDefinedInstance();
        if (party != null) {
            getInstance().setTeam(party);
        }
    }
    public boolean isWired() {
        return true;
    }
    public WorkerCost getDefinedInstance() {
        return isIdDefined() ? getInstance() : null;
    }
}
