return bean;
}
public static final PrecedentDegreeInformationBean createBean(final StudentCurricularPlan studentCurricularPlan) {
PrecedentDegreeInformationBean bean = new PrecedentDegreeInformationBean();
if (studentCurricularPlan.isBolonhaDegree()
|| !studentCurricularPlan.getRegistration().isRegistrationConclusionProcessed()) {
throw new IllegalArgumentException("error.studentCurricularPlan.must.be.pre.bolonha.and.concluded");
}
bean.setDegreeDesignation(studentCurricularPlan.getName());
bean.setConclusionDate(new LocalDate(studentCurricularPlan.getRegistration().getConclusionDate()));
bean.setConclusionGrade(studentCurricularPlan.getRegistration().getFinalAverage().toString());
bean.setInstitution(Bennu.getInstance().getInstitutionUnit());
bean.setInstitutionName(Bennu.getInstance().getInstitutionUnit().getName());
bean.setInstitutionUnitName(Bennu.getInstance().getInstitutionUnit().getUnitName());
bean.setNumberOfEnroledCurricularCourses(calculateNumberOfEnroledCurricularCourses(studentCurricularPlan));
bean.setNumberOfApprovedCurricularCourses(calculateNumberOfApprovedCurricularCourses(studentCurricularPlan));
bean.setGradeSum(calculateGradeSum(studentCurricularPlan));
bean.setApprovedEcts(calculateApprovedEcts(studentCurricularPlan));
bean.setEnroledEcts(calculateEnroledEcts(studentCurricularPlan));
return bean;
}