Set<NextPossibleSummaryLessonsAndDatesBean> summariesCalendar = new TreeSet<NextPossibleSummaryLessonsAndDatesBean>(NextPossibleSummaryLessonsAndDatesBean.COMPARATOR_BY_DATE);
List<NextPossibleSummaryLessonsAndDatesBean> summariesCalendar = new ArrayList<NextPossibleSummaryLessonsAndDatesBean>();
    public ActionForward showSummariesCalendarPostBack(ActionMapping mapping, ActionForm form,	    HttpServletRequest request, HttpServletResponse response) {			final IViewState viewState = RenderUtils.getViewState();	SummariesCalendarBean bean = (SummariesCalendarBean) viewState.getMetaObject().getObject();	ExecutionCourse executionCourse = bean.getExecutionCourse();	Shift shift = bean.getShift();	ShiftType shiftType = bean.getShiftType();	LessonCalendarViewType calendarViewType = bean.getCalendarViewType();		Set<NextPossibleSummaryLessonsAndDatesBean> summariesCalendar = new TreeSet<NextPossibleSummaryLessonsAndDatesBean>(NextPossibleSummaryLessonsAndDatesBean.COMPARATOR_BY_DATE);	for (Lesson lesson : executionCourse.getLessons()) {	    boolean insert = true;	    if ((shift != null && !shift.getAssociatedLessons().contains(lesson))		    || (shiftType != null && !lesson.getShift().getTipo().equals(shiftType))) {		insert = false;	    }	    if (insert) {					for (YearMonthDay lessonDate : lesson.getAllLessonDates()) {		    if((calendarViewType.equals(LessonCalendarViewType.ALL_LESSONS))			    || (calendarViewType.equals(LessonCalendarViewType.PAST_LESSON) && lesson.isTimeValidToInsertSummary(new HourMinuteSecond(), lessonDate))			    || (calendarViewType.equals(LessonCalendarViewType.PAST_LESSON_WITHOUT_SUMMARY) 				    && lesson.getSummaryByDate(lessonDate) == null) 				    && lesson.isTimeValidToInsertSummary(new HourMinuteSecond(), lessonDate)) {					    summariesCalendar.add(new NextPossibleSummaryLessonsAndDatesBean(lesson, lessonDate));		    }		}	    }	    	   	}			request.setAttribute("summariesCalendarResult", summariesCalendar);	request.setAttribute("showSummariesCalendarBean", bean);	return mapping.findForward("showSummariesCalendar");    }