Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.OccupationPeriod


                result[0] = getAcademicIntervalFromParameter(getAcademicInterval()).getStart().toDate();
                if (semester == 1) {
                    result[1] = executionDegree.getPeriodExamsSpecialSeason().getStart();
                }
            } else if (calendarPeriod.intValue() == 1) {
                final OccupationPeriod occupationPeriod =
                        semester == 1 ? executionDegree.getPeriodLessonsFirstSemester() : executionDegree
                                .getPeriodLessonsSecondSemester();
                result[0] = occupationPeriod.getStart();
            } else if (calendarPeriod.intValue() == 2) {
                final OccupationPeriod occupationPeriod =
                        semester == 1 ? executionDegree.getPeriodExamsFirstSemester() : executionDegree
                                .getPeriodExamsSecondSemester();
                result[0] = occupationPeriod.getStart();
                result[1] = executionDegree.getPeriodExamsSpecialSeason().getStart();
            }
        }

        return result;
View Full Code Here


                result[0] = getAcademicIntervalFromParameter(getAcademicInterval()).getEnd().toDate();
                if (semester == 1) {
                    result[1] = executionDegree.getPeriodExamsSpecialSeason().getEnd();
                }
            } else if (calendarPeriod.intValue() == 1) {
                final OccupationPeriod occupationPeriod =
                        semester == 1 ? executionDegree.getPeriodLessonsFirstSemester() : executionDegree
                                .getPeriodLessonsSecondSemester();
                result[0] = occupationPeriod.getLastOccupationPeriodOfNestedPeriods().getEnd();
            } else if (calendarPeriod.intValue() == 2) {
                final OccupationPeriod occupationPeriod =
                        semester == 1 ? executionDegree.getPeriodExamsFirstSemester() : executionDegree
                                .getPeriodExamsSecondSemester();
                result[0] = occupationPeriod.getEnd();
                result[1] = executionDegree.getPeriodExamsSpecialSeason().getEnd();
            }
        }

        return result;
View Full Code Here

    @Override
    public List<Interval> getEventSpaceOccupationIntervals(YearMonthDay startDateToSearch, YearMonthDay endDateToSearch) {

        List<Interval> result = new ArrayList<Interval>();
        OccupationPeriod occupationPeriod = getPeriod();

        if (getPeriod() != null) {

            result.addAll(generateEventSpaceOccupationIntervals(occupationPeriod.getStartYearMonthDay(),
                    occupationPeriod.getEndYearMonthDay(), getStartTimeDateHourMinuteSecond(), getEndTimeDateHourMinuteSecond(),
                    getFrequency(), getDayOfWeek(), getDailyFrequencyMarkSaturday(), getDailyFrequencyMarkSunday(),
                    startDateToSearch, endDateToSearch));

            while (occupationPeriod.getNextPeriod() != null) {
                result.addAll(generateEventSpaceOccupationIntervals(occupationPeriod.getNextPeriod().getStartYearMonthDay(),
                        occupationPeriod.getNextPeriod().getEndYearMonthDay(), getStartTimeDateHourMinuteSecond(),
                        getEndTimeDateHourMinuteSecond(), getFrequency(), getDayOfWeek(), getDailyFrequencyMarkSaturday(),
                        getDailyFrequencyMarkSunday(), startDateToSearch, endDateToSearch));

                occupationPeriod = occupationPeriod.getNextPeriod();
            }
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.OccupationPeriod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.