Package org.joda.time

Examples of org.joda.time.YearMonthDay


    final public boolean isFirstTime() {
        return isFirstTime(ExecutionYear.readCurrentExecutionYear());
    }

    final public StudentCurricularPlan getStudentCurricularPlan(final ExecutionYear executionYear) {
        return executionYear == null ? getStudentCurricularPlan(new YearMonthDay()) : getStudentCurricularPlan(executionYear
                .getEndDateYearMonthDay());
    }
View Full Code Here


    final public StudentCurricularPlan getStudentCurricularPlanForCurrentExecutionYear() {
        return getStudentCurricularPlan(ExecutionYear.readCurrentExecutionYear());
    }

    final public StudentCurricularPlan getStudentCurricularPlan(final ExecutionSemester executionSemester) {
        return executionSemester == null ? getStudentCurricularPlan(new YearMonthDay()) : getStudentCurricularPlan(executionSemester
                .getEndDateYearMonthDay());
    }
View Full Code Here

    }

    final public StudentCurricularPlan getStudentCurricularPlan(final YearMonthDay date) {
        StudentCurricularPlan result = null;
        for (final StudentCurricularPlan studentCurricularPlan : getStudentCurricularPlansSet()) {
            final YearMonthDay startDate = studentCurricularPlan.getStartDateYearMonthDay();
            if (!startDate.isAfter(date) && (result == null || startDate.isAfter(result.getStartDateYearMonthDay()))) {
                result = studentCurricularPlan;
            }
        }
        return result;
    }
View Full Code Here

    final public boolean getIsForDegreeOffice() {
        return isForOffice(AdministrativeOffice.readByAdministrativeOfficeType(AdministrativeOfficeType.DEGREE));
    }

    public void editStartDates(final LocalDate startDate, final LocalDate homologationDate, final LocalDate studiesStartDate) {
        editStartDates(new YearMonthDay(startDate), new YearMonthDay(homologationDate), new YearMonthDay(studiesStartDate));
    }
View Full Code Here

        return StudentStatuteType.SENIOR.createStudentStatute(getStudent(), this, executionYear.getFirstExecutionPeriod(),
                executionYear.getLastExecutionPeriod());
    }

    public void setHomologationDate(final LocalDate homologationDate) {
        setHomologationDate(new YearMonthDay(homologationDate));
    }
View Full Code Here

    public void setHomologationDate(final LocalDate homologationDate) {
        setHomologationDate(new YearMonthDay(homologationDate));
    }

    public void setStudiesStartDate(final LocalDate studiesStartDate) {
        setStudiesStartDate(new YearMonthDay(studiesStartDate));
    }
View Full Code Here

        return result;
    }

    public boolean isInExamPeriod() {
        final YearMonthDay yearMonthDay = new YearMonthDay();
        final ExecutionSemester executionSemester = getExecutionPeriod();
        final ExecutionYear executionYear = getExecutionPeriod().getExecutionYear();
        for (final CurricularCourse curricularCourse : getAssociatedCurricularCoursesSet()) {
            final DegreeCurricularPlan degreeCurricularPlan = curricularCourse.getDegreeCurricularPlan();
            final ExecutionDegree executionDegree = degreeCurricularPlan.getExecutionDegreeByYear(executionYear);
            final YearMonthDay startExamsPeriod;
            if (executionSemester.getSemester().intValue() == 1) {
                startExamsPeriod = executionDegree.getPeriodExamsFirstSemester().getStartYearMonthDay();
            } else if (executionSemester.getSemester().intValue() == 2) {
                startExamsPeriod = executionDegree.getPeriodExamsSecondSemester().getStartYearMonthDay();
            } else {
                throw new DomainException("unsupported.execution.period.semester");
            }
            if (!startExamsPeriod.minusDays(2).isAfter(yearMonthDay)) {
                return true;
            }
        }

        return false;
View Full Code Here

        return false;
    }

    public GenericPair<YearMonthDay, YearMonthDay> getMaxLessonsPeriod() {

        YearMonthDay minBeginDate = null, maxEndDate = null;
        Integer semester = getExecutionPeriod().getSemester();

        for (final CurricularCourse curricularCourse : getAssociatedCurricularCoursesSet()) {
            final ExecutionDegree executionDegree = curricularCourse.getExecutionDegreeFor(getExecutionYear());
            if (semester.intValue() == 1) {
                if (minBeginDate == null
                        || minBeginDate.isAfter(executionDegree.getPeriodLessonsFirstSemester().getStartYearMonthDay())) {
                    minBeginDate = executionDegree.getPeriodLessonsFirstSemester().getStartYearMonthDay();
                }
                if (maxEndDate == null
                        || maxEndDate.isBefore(executionDegree.getPeriodLessonsFirstSemester()
                                .getEndYearMonthDayWithNextPeriods())) {
                    maxEndDate = executionDegree.getPeriodLessonsFirstSemester().getEndYearMonthDayWithNextPeriods();
                }
            } else {
                if (minBeginDate == null
                        || minBeginDate.isAfter(executionDegree.getPeriodLessonsSecondSemester().getStartYearMonthDay())) {
                    minBeginDate = executionDegree.getPeriodLessonsSecondSemester().getStartYearMonthDay();
                }
                if (maxEndDate == null
                        || maxEndDate.isBefore(executionDegree.getPeriodLessonsSecondSemester()
                                .getEndYearMonthDayWithNextPeriods())) {
View Full Code Here

                && getPersonalDetails().getStudent().hasActiveRegistrationFor(degreeCurricularPlan);
    }

    protected YearMonthDay getStartDate() {
        final ExecutionInterval interval = getCandidacyExecutionInterval();
        return interval.isCurrent() ? new YearMonthDay() : interval.getBeginDateYearMonthDay();
    }
View Full Code Here

    protected Candidacy() {
        super();
        setNumber(createCandidacyNumber());
        setRootDomainObject(Bennu.getInstance());
        setStartDate(new YearMonthDay());
    }
View Full Code Here

TOP

Related Classes of org.joda.time.YearMonthDay

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.