Exemplo n.º 1
0
 // HEADTEACHER COURSE MANAGE CONTROLLER CALL
 @Override
 public void deleteAllCoursesWithIds(Long[] IdArray) {
   for (Long id : IdArray) {
     Course current = courseDao.findById(id);
     current.setArchive(true);
     courseDao.update(current);
   }
 }
Exemplo n.º 2
0
 // HELP METHOD FOR TEACHER AND STUDENT SERVICE
 public List<Course> getCourseForGroup(Group group, Date from, Date till) {
   List<Course> listCourses = new ArrayList<Course>();
   try {
     List<Course> course = courseDao.findByGroupIdAndDataRange(group.getId(), from, till);
     if (course != null) {
       listCourses.addAll(course);
     }
   } catch (Exception e) {
     // nothing to do here, return empty list
   }
   return listCourses;
 }
Exemplo n.º 3
0
 // HEADTEACHER CONTROLLER CALL
 @Override
 public List<CourseDTO> getAllCourses() {
   List<Course> courses = courseDao.findAllByArchiveFlag(COURSE_IS_NOT_ARCHIVE);
   return fillCourseDTO(courses, null, null);
 }
Exemplo n.º 4
0
 // HEADTEACHER GROUP CONTROLLER CALL
 @Override
 public List<CourseDTO> getCoursesForYear(int year) {
   List<Course> courses =
       courseDao.findAdditionCourseByYearAndArchiveFlag(year, COURSE_IS_NOT_ARCHIVE);
   return fillCourseDTO(courses, null, null);
 }
Exemplo n.º 5
0
 // HEADTEACHER COURSE MANAGE CONTROLLER CALL
 @Override
 public void saveNewCourse(Course course) {
   courseDao.save(course);
 }