Package org.fenixedu.academic.domain.student

Examples of org.fenixedu.academic.domain.student.PrecedentDegreeInformation


                excelSpreadsheet.addCell(process.getCandidacyStudent().getNumber());
            } else {
                excelSpreadsheet.addCell("-");
            }
            excelSpreadsheet.addCell(process.getPersonalDetails().getName());
            final PrecedentDegreeInformation information = process.getPrecedentDegreeInformation();
            excelSpreadsheet.addCell(information.getDegreeAndInstitutionName());
            excelSpreadsheet.addCell(getValue(process.getCandidacyAffinity()));
            excelSpreadsheet.addCell(getValue(process.getCandidacyDegreeNature()));
            excelSpreadsheet.addCell(getValue(information.getNumberOfApprovedCurricularCourses()));
            excelSpreadsheet.addCell(getValue(information.getGradeSum()));
            excelSpreadsheet.addCell(getValue(information.getApprovedEcts()));
            excelSpreadsheet.addCell(getValue(information.getEnroledEcts()));
            excelSpreadsheet.addCell(getValue(calculateA(process, true)));
            excelSpreadsheet.addCell(getValue(calculateB(process, true)));
            excelSpreadsheet.addCell(getValue(calculateC(process)));
            if (process.isCandidacyAccepted() || process.isCandidacyRejected()) {
                excelSpreadsheet.addCell(BundleUtil.getString(Bundle.ENUMERATION, process.getCandidacyState().getQualifiedName())
View Full Code Here


        } else if (registration.getDegree().getDegreeType().isMasterDegree()) {
            studentCandidacy = new MDCandidacy(registration.getPerson(), executionDegree);
        }

        studentCandidacy.getPrecedentDegreeInformation().delete();
        PrecedentDegreeInformation refactoredPrecedentDegreeInformation = getRefactoredPrecedentDegreeInformation();
        refactoredPrecedentDegreeInformation.setRegistration(registration);
        studentCandidacy.setPrecedentDegreeInformation(refactoredPrecedentDegreeInformation);
        studentCandidacy.setRegistration(registration);

        PersonalIngressionData personalIngressionDataByExecutionYear =
                registration.getStudent().getPersonalIngressionDataByExecutionYear(startExecutionYear);
View Full Code Here

        if (processBean.isStandalone()) {
            return null;
        }

        PrecedentDegreeInformation pid = null;
        if (processBean.isDegreeChange() || processBean.isDegreeTransfer()) {
            pid = createForDegreeTransferOrDegreeChange(processBean);
        } else if (processBean.isSecondCycle() || processBean.isDegreeCandidacyForGraduatedPerson()) {
            pid = createForSecondCycleOrDegreeCandidacyForGraduatedPerson(processBean);
        } else if (processBean.isOver23()) {
            pid = createForOver23(processBean);
        } else if (processBean.isErasmus()) {
            pid = createForErasmus(processBean);
        }

        pid.setIndividualCandidacy(individualCandidacy);

        return pid;
    }
View Full Code Here

    private static PrecedentDegreeInformation createForErasmus(final IndividualCandidacyProcessBean processBean) {
        MobilityIndividualApplicationProcessBean erasmusBean = (MobilityIndividualApplicationProcessBean) processBean;
        MobilityStudentDataBean erasmusStudentDataBean = erasmusBean.getMobilityStudentDataBean();

        PrecedentDegreeInformation pdi = new PrecedentDegreeInformation();
        pdi.setCandidacyInternal(false);

        pdi.setPrecedentCountry(erasmusStudentDataBean.getSelectedCountry());
        pdi.setPrecedentInstitution(erasmusStudentDataBean.getSelectedUniversity());
        pdi.setPrecedentSchoolLevel(erasmusStudentDataBean.getCurrentSchoolLevel());
        pdi.setOtherPrecedentSchoolLevel(erasmusStudentDataBean.getCurrentOtherSchoolLevel());
        pdi.setCountryHighSchool(erasmusStudentDataBean.getCountryWhereFinishedHighSchoolLevel());

        if (erasmusStudentDataBean.getHasDiplomaOrDegree()) {
            pdi.setDegreeDesignation(erasmusStudentDataBean.getDiplomaName());
            pdi.setConclusionYear(erasmusStudentDataBean.getDiplomaConclusionYear());
        }

        return pdi;
    }
View Full Code Here

    private static PrecedentDegreeInformation createForOver23(IndividualCandidacyProcessBean processBean) {
        Over23IndividualCandidacyProcessBean over23Bean = (Over23IndividualCandidacyProcessBean) processBean;

        if (!over23Bean.getFormationConcludedBeanList().isEmpty()) {
            PrecedentDegreeInformation pid = new PrecedentDegreeInformation();
            pid.setCandidacyInternal(false);
            FormationBean formationBean = over23Bean.getFormationConcludedBeanList().iterator().next();

            pid.setDegreeDesignation(formationBean.getDesignation());
            pid.setInstitution(getOrCreateInstitution(formationBean.getInstitutionName()));
            pid.setConclusionYear(formationBean.getConclusionExecutionYear().getEndCivilYear());

            return pid;
        } else if (!over23Bean.getFormationNonConcludedBeanList().isEmpty()) {
            PrecedentDegreeInformation pdi = new PrecedentDegreeInformation();
            pdi.setCandidacyInternal(false);
            FormationBean formationBean = over23Bean.getFormationNonConcludedBeanList().iterator().next();

            pdi.setDegreeDesignation(formationBean.getDesignation());
            pdi.setInstitution(getOrCreateInstitution(formationBean.getInstitutionName()));

            return pdi;
        }

        return null;
View Full Code Here

    private static PrecedentDegreeInformation createForDegreeTransferOrDegreeChange(IndividualCandidacyProcessBean processBean) {
        IndividualCandidacyProcessWithPrecedentDegreeInformationBean candidacyProcessWithPDIBean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) processBean;
        PrecedentDegreeInformationBean bean = candidacyProcessWithPDIBean.getPrecedentDegreeInformation();

        PrecedentDegreeInformation pdi = new PrecedentDegreeInformation();
        pdi.setPrecedentDegreeDesignation(bean.getDegreeDesignation());
        pdi.setNumberOfEnroledCurricularCourses(bean.getNumberOfEnroledCurricularCourses());
        pdi.setNumberOfApprovedCurricularCourses(bean.getNumberOfApprovedCurricularCourses());
        pdi.setGradeSum(bean.getGradeSum());
        pdi.setApprovedEcts(bean.getApprovedEcts());
        pdi.setEnroledEcts(bean.getEnroledEcts());

        if (candidacyProcessWithPDIBean.isExternalPrecedentDegreeType()) {
            pdi.setPrecedentInstitution(getOrCreateInstitution(bean));
            pdi.setNumberOfEnrolmentsInPreviousDegrees(candidacyProcessWithPDIBean
                    .getNumberOfPreviousYearEnrolmentsInPrecedentDegree());
            pdi.setCandidacyInternal(false);
        } else {
            pdi.setCandidacyInternal(true);
            final StudentCurricularPlan studentCurricularPlan = candidacyProcessWithPDIBean.getPrecedentStudentCurricularPlan();

            if (studentCurricularPlan == null) {
                throw new DomainException("error.IndividualCandidacy.invalid.precedentDegreeInformation");
            }

            pdi.setStudentCurricularPlan(studentCurricularPlan);
        }

        return pdi;
    }
View Full Code Here

        IndividualCandidacyProcessWithPrecedentDegreeInformationBean candidacyProcessWithPrecedentDegreeInformationBean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) processBean;

        PrecedentDegreeInformationBean bean = candidacyProcessWithPrecedentDegreeInformationBean.getPrecedentDegreeInformation();

        PrecedentDegreeInformation pdi = new PrecedentDegreeInformation();
        pdi.setCandidacyInternal(false);
        pdi.setDegreeDesignation(bean.getDegreeDesignation());
        pdi.setInstitution(getOrCreateInstitution(bean));
        pdi.setCountry(bean.getCountry());
        pdi.setConclusionDate(bean.getConclusionDate());

        if (bean.getConclusionDate() != null) {
            pdi.setConclusionYear(bean.getConclusionDate().getYear());
        }

        pdi.setConclusionGrade(bean.getConclusionGrade());

        return pdi;
    }
View Full Code Here

        MobilityIndividualApplicationProcess erasmusIndividualCandidacyProcess =
                (MobilityIndividualApplicationProcess) processBean.getIndividualCandidacyProcess();
        MobilityIndividualApplication erasmusCandidacy = erasmusIndividualCandidacyProcess.getCandidacy();

        PrecedentDegreeInformation pid = erasmusCandidacy.getRefactoredPrecedentDegreeInformation();

        pid.setPrecedentCountry(erasmusStudentDataBean.getSelectedCountry());
        pid.setPrecedentInstitution(erasmusStudentDataBean.getSelectedUniversity());
        pid.setPrecedentSchoolLevel(erasmusStudentDataBean.getCurrentSchoolLevel());
        pid.setOtherPrecedentSchoolLevel(erasmusStudentDataBean.getCurrentOtherSchoolLevel());
        pid.setCountryHighSchool(erasmusStudentDataBean.getCountryWhereFinishedHighSchoolLevel());

        if (erasmusStudentDataBean.getHasDiplomaOrDegree()) {
            pid.setDegreeDesignation(erasmusStudentDataBean.getDiplomaName());
            pid.setConclusionYear(erasmusStudentDataBean.getDiplomaConclusionYear());
        }
    }
View Full Code Here

    private static void editForOver23(IndividualCandidacyProcessBean processBean) {
        Over23IndividualCandidacyProcessBean over23Bean = (Over23IndividualCandidacyProcessBean) processBean;

        IndividualCandidacyProcess individualCandidacyProcess = processBean.getIndividualCandidacyProcess();
        IndividualCandidacy candidacy = individualCandidacyProcess.getCandidacy();
        PrecedentDegreeInformation pid = candidacy.getRefactoredPrecedentDegreeInformation();

        if (!over23Bean.getFormationConcludedBeanList().isEmpty()) {
            FormationBean formationBean = over23Bean.getFormationConcludedBeanList().iterator().next();

            pid.setDegreeDesignation(formationBean.getDesignation());
            pid.setInstitution(getOrCreateInstitution(formationBean.getInstitutionName()));
            pid.setConclusionYear(formationBean.getConclusionExecutionYear().getEndCivilYear());
        } else if (over23Bean.getFormationNonConcludedBeanList().isEmpty()) {
            FormationBean formationBean = over23Bean.getFormationNonConcludedBeanList().iterator().next();

            pid.setDegreeDesignation(formationBean.getDesignation());
            pid.setInstitution(getOrCreateInstitution(formationBean.getInstitutionName()));
        }

    }
View Full Code Here

    private static void editForSecondCycleOrDegreeCandidacyForGraduatedPerson(IndividualCandidacyProcessBean processBean) {
        IndividualCandidacyProcessWithPrecedentDegreeInformationBean candidacyProcessWithPrecedentDegreeInformationBean =
                (IndividualCandidacyProcessWithPrecedentDegreeInformationBean) processBean;
        IndividualCandidacyProcess individualCandidacyProcess = processBean.getIndividualCandidacyProcess();
        IndividualCandidacy candidacy = individualCandidacyProcess.getCandidacy();
        PrecedentDegreeInformation pid = candidacy.getRefactoredPrecedentDegreeInformation();

        PrecedentDegreeInformationBean bean = candidacyProcessWithPrecedentDegreeInformationBean.getPrecedentDegreeInformation();

        pid.setDegreeDesignation(bean.getDegreeDesignation());
        pid.setInstitution(getOrCreateInstitution(bean));
        pid.setCountry(bean.getCountry());
        pid.setConclusionDate(bean.getConclusionDate());

        if (bean.getConclusionDate() != null) {
            pid.setConclusionYear(bean.getConclusionDate().getYear());
        }

        pid.setConclusionGrade(bean.getConclusionGrade());

    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.student.PrecedentDegreeInformation

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.