}
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());