for (IUnit subUnit : unit.getSubUnits()) { for (IContract contract : subUnit.getWorkingContracts()) { allEmployees.add(contract.getEmployee()); } }
    public List<ITeacher> getTeachersHistoric() {        IUnit unit = this.getUnit();        Set<IEmployee> allEmployees = new HashSet<IEmployee>();        List<ITeacher> allTeachers = new ArrayList<ITeacher>();        if (unit != null) {            for (IContract contract : unit.getWorkingContracts()) {                allEmployees.add(contract.getEmployee());            }            addTeachers(allTeachers, new ArrayList(allEmployees));        }        return allTeachers;    }