Rev 1312 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1312 | Rev 1350 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | private 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(LoadCourseUnitService.class); |
38 | private 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(LoadCourseUnitService.class); |
39 | 39 | ||
40 | public CourseUnitView run(long id, boolean initTeachers, boolean initStudents, boolean initBlog, UserSession userSession) throws ServiceException |
40 | public CourseUnitView run(long id, boolean initTeachers, boolean initStudents, boolean initBlog, UserSession userSession) throws ServiceException |
41 | { |
41 | { |
42 | CourseUnit c = DaoFactory.getCourseUnitDaoImpl().get(id); |
42 | CourseUnit c = DaoFactory.getCourseUnitDaoImpl().get(id); |
- | 43 | return runCleared(id,initTeachers,initStudents,initBlog,userSession,DaoFactory.getCourseUnitDaoImpl().narrow(c)); |
|
- | 44 | } |
|
- | 45 | ||
- | 46 | public CourseUnitView runCleared(long id, boolean initTeachers, boolean initStudents, boolean initBlog, UserSession userSession,CourseUnit c) throws ServiceException |
|
- | 47 | { |
|
43 | c.setCourseUnitEvaluation(DaoFactory.getCourseUnitEvaluationDaoImpl().narrow(c.getCourseUnitEvaluation())); |
48 | c.setCourseUnitEvaluation(DaoFactory.getCourseUnitEvaluationDaoImpl().narrow(c.getCourseUnitEvaluation())); |
44 | c.setCourseUnitProgram(DaoFactory.getCourseUnitProgramDaoImpl().narrow(c.getCourseUnitProgram())); |
49 | c.setCourseUnitProgram(DaoFactory.getCourseUnitProgramDaoImpl().narrow(c.getCourseUnitProgram())); |
45 | 50 | ||
46 | if(c == null) |
51 | if(c == null) |
47 | return null; |
52 | return null; |
Line 75... | Line 80... | ||
75 | } |
80 | } |
76 | return cV; |
81 | return cV; |
77 | } |
82 | } |
78 | 83 | ||
79 | 84 | ||
80 | public CourseUnitView loadCourseUnitViewAndCourse(long id, boolean initTeachers, boolean initStudents, boolean initBlog, boolean initCourseView, UserSession userSession) throws ServiceException |
85 | public CourseUnitView loadCourseUnitViewAndCourse(long id, boolean initTeachers, boolean initStudents, boolean initBlog, boolean initCourseView, UserSession userSession,CourseUnitImpl clearedUnit) throws ServiceException |
81 | { |
86 | { |
82 | 87 | ||
83 | CourseUnitView cV = run(id,initTeachers,initStudents,initBlog,userSession); |
88 | CourseUnitView cV = runCleared(id, initTeachers, initStudents, initBlog, userSession, clearedUnit); |
84 | if(initCourseView) |
89 | if(initCourseView) |
85 | { |
90 | { |
86 | CourseView coV = new CourseView(cV.getCourseUnit().getCourse()); |
91 | CourseView coV = new CourseView(cV.getCourseUnit().getCourse()); |
87 | cV.setCourseView(coV); |
92 | cV.setCourseView(coV); |
88 | } |
93 | } |