Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Enrolment


    }

    private void checkParameters(final RegistrationAcademicServiceRequestCreateBean bean) {
        final Registration registration = bean.getRegistration();
        final ExecutionYear executionYear = bean.getExecutionYear();
        final Enrolment enrolment = bean.getEnrolment();

        if (executionYear == null) {
            throw new DomainException("error.ExtraExamRequest.executionYear.cannot.be.null");
        }

        if (!registration.hasEnrolments(enrolment)) {
            throw new DomainException("error.ExtraExamRequest.registration.doesnot.have.enrolment");
        }

        if (!studentHasValidStatutes(registration, enrolment)) {
            throw new DomainException("error.ExtraExamRequest.registration.doesnot.have.valid.statutes");
        }

        if (registrationAlreadyHasRequest(registration, enrolment, executionYear)) {
            throw new DomainException("error.ExtraExamRequest.registration.already.has.same.request", enrolment.getName()
                    .getContent(), executionYear.getYear());
        }
    }
View Full Code Here


    private static void transferAttends(final ExecutionCourse originExecutionCourse,
            final ExecutionCourse destinationExecutionCourse) {
        final Collection<CurricularCourse> curricularCourses = destinationExecutionCourse.getAssociatedCurricularCoursesSet();
        List<Attends> allAttends = new ArrayList<>(originExecutionCourse.getAttendsSet());
        for (Attends attends : allAttends) {
            final Enrolment enrolment = attends.getEnrolment();
            if (enrolment != null && curricularCourses.contains(enrolment.getCurricularCourse())) {
                attends.setDisciplinaExecucao(destinationExecutionCourse);
            }
        }
    }
View Full Code Here

TOP

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

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.