Subversion Repositories bacoAlunos

Rev

Rev 225 | Rev 254 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 225 Rev 253
Line 23... Line 23...
23
    public static final 1.5.0/docs/api/java/lang/String.html">String TEACHER_ROLE = Globals.TEACHER_ROLE;
23
    public static final 1.5.0/docs/api/java/lang/String.html">String TEACHER_ROLE = Globals.TEACHER_ROLE;
24
 
24
 
25
    public static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(TeacherImpl.class);
25
    public static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(TeacherImpl.class);
26
 
26
 
27
    private List<CourseUnit> teachedUnitsView = null;
27
    private List<CourseUnit> teachedUnitsView = null;
-
 
28
    private List<CourseUnit> teachedUnitsCurrentYearView = null;
28
    private List<Course> teachedCoursesView = null;
29
    private List<Course> teachedCoursesView = null;
-
 
30
    private List<Course> teachedCoursesCurrentYearView = null;
29
 
31
 
30
    public TeacherImpl()
32
    public TeacherImpl()
31
    {
33
    {
32
        setScholarDegree(Globals.PROFILE_SCHOLAR_DEGREE_SUPERIOR);
34
        setScholarDegree(Globals.PROFILE_SCHOLAR_DEGREE_SUPERIOR);
33
    }
35
    }
Line 69... Line 71...
69
            }
71
            }
70
        }
72
        }
71
        return teachedUnitsView;
73
        return teachedUnitsView;
72
    }
74
    }
73
 
75
 
-
 
76
    public List<CourseUnit> getTeachedUnitsCurrentYearView()
-
 
77
    {
-
 
78
        if(teachedUnitsCurrentYearView == null)
-
 
79
        {
-
 
80
            teachedCoursesCurrentYearView = new ArrayList<Course>();
-
 
81
            try
-
 
82
            {
-
 
83
                IServiceManager sm = ServiceManager.getInstance();
-
 
84
                1.5.0/docs/api/java/lang/String.html">String[] names = new 1.5.0/docs/api/java/lang/String.html">String[]{"serializable"};
-
 
85
                5+0%2Fdocs%2Fapi+Object">Object[] args = new 5+0%2Fdocs%2Fapi+Object">Object[]{getId()};
-
 
86
                teachedUnitsCurrentYearView = (List<CourseUnit>) sm.execute(null, "LoadTeachedUnitsCurrentYear", args, names);
-
 
87
                if(teachedUnitsCurrentYearView == null)
-
 
88
                    teachedUnitsCurrentYearView = new ArrayList<CourseUnit>();
-
 
89
                for(CourseUnit c: teachedUnitsCurrentYearView)
-
 
90
                {
-
 
91
                    if(!teachedCoursesCurrentYearView.contains(c.getCourse()))
-
 
92
                    {
-
 
93
                        teachedCoursesCurrentYearView.add(c.getCourse());
-
 
94
                    }
-
 
95
                }
-
 
96
            }
-
 
97
            catch (1.5.0/docs/api/java/lang/Throwable.html">Throwable e)
-
 
98
            {
-
 
99
                logger.error(e,e);
-
 
100
            }
-
 
101
        }
-
 
102
        return teachedUnitsCurrentYearView;
-
 
103
    }
-
 
104
 
74
    public boolean hasCourseUnit(long id)
105
    public boolean hasCourseUnit(long id)
75
    {
106
    {
76
        return hasCourseUnit(id,false);
107
        return hasCourseUnit(id,false);
77
    }
108
    }
78
 
109