request.setAttribute("schoolClass", schoolClass);
return mapping.findForward("Sucess");
}
private static InfoSiteTimetable getInfoSiteTimetable(SchoolClass domainClass) {
InfoSiteTimetable component = new InfoSiteTimetable();
List infoLessonList = null;
Collection<Shift> shiftList = domainClass.getAssociatedShiftsSet();
infoLessonList = new ArrayList();
ExecutionSemester executionSemester = domainClass.getExecutionPeriod();
InfoExecutionPeriod infoExecutionPeriod = InfoExecutionPeriod.newInfoFromDomain(executionSemester);
for (Object element : shiftList) {
Shift shift = (Shift) element;
infoLessonList.addAll(InfoLessonInstanceAggregation.getAggregations(shift));
}
component.setInfoExecutionPeriod(infoExecutionPeriod);
component.setLessons(infoLessonList);
return component;
}