Step back in refactoring, case sensitive ignored in autocomplite, adding lesson type...
[SkiSchool.git] / SkiSchool-ejb / src / java / org / cvut / skischool / beans / LessonManagementLocal.java
blob24d086e849d5d556c4662b8996e884d6623890fd
1 package org.cvut.skischool.beans;
3 import java.util.Date;
4 import java.util.List;
5 import javax.ejb.Local;
6 import org.cvut.skischool.model.Instructor;
7 import org.cvut.skischool.model.Lesson;
8 import org.cvut.skischool.model.Student;
10 /**
12 * @author matej
14 @Local
15 public interface LessonManagementLocal {
17 void createLesson(Lesson lesson);
19 void updateLesson(Lesson lesson);
21 void deleteLesson(Lesson lesson);
23 Lesson getLesson(Long id);
25 /**
26 * Check lesson whether all instructors are available during the specified
27 * lesson.
29 * @param lesson Lesson to check
30 * @return instructors who are not available during specified time
32 List<Instructor> checkLessonAvailability(Date startTime, Date endTime, List<Instructor> instructors);
34 /**
35 * Check lesson whether all instructors have any other reserved lessons
36 * conflicting with the specified lesson.
38 * @param lesson Lesson to check
39 * @return conflicting lessons
41 List<Lesson> checkLessonReservations(Date startTime, Date endTime, List<Instructor> instructors);
43 List<Lesson> getAllLessons();
45 List<Lesson> getLessonsByDate(Instructor instructor, Date date);
47 List<Lesson> getAllLessonsByType(String type);
49 List<Lesson> getLessonsByInstructorAndInterval(Instructor instructor, Date startDate, Date endDate);
51 long countLessonsLangBonus(Instructor instructor, Date startDate, Date endDate);
53 List<Lesson> countLessons(Instructor instructor, Date startDate, Date endDate, String type);
55 List<Lesson> getLessonsByStudentAndInterval(Student student, Date startDate, Date endDate);