1 package org
.cvut
.skischool
.beans
;
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
;
15 public interface LessonManagementLocal
{
17 void createLesson(Lesson lesson
);
19 void updateLesson(Lesson lesson
);
21 void deleteLesson(Lesson lesson
);
23 Lesson
getLesson(Long id
);
26 * Check lesson whether all instructors are available during the specified
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
);
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
);