return getEquivalencyPlanEntryCurriculumModuleWrapper(degreeCurricularPlan, getOldStudentCurricularPlan().getRoot());
}
private EquivalencyPlanEntryCurriculumModuleWrapper getEquivalencyPlanEntryCurriculumModuleWrapper(
final DegreeCurricularPlan degreeCurricularPlan, final CurriculumModule curriculumModule) {
final EquivalencyPlanEntryCurriculumModuleWrapper equivalencyPlanEntryCurriculumModuleWrapper =
new EquivalencyPlanEntryCurriculumModuleWrapper(curriculumModule);
final DegreeModule degreeModule = curriculumModule.getDegreeModule();
addEquivalencyPlanEntryCurriculumModuleWrappers(equivalencyPlanEntryCurriculumModuleWrapper,
degreeCurricularPlan.getEquivalencePlan(), degreeModule);
for (EquivalencePlanEntry equivalencePlanEntry : getEntriesSet()) {
if (equivalencePlanEntry.isFor(degreeModule)) {
equivalencyPlanEntryCurriculumModuleWrapper.addEquivalencePlanEntriesToApply(equivalencePlanEntry);
}
}
if (!curriculumModule.isLeaf()) {
final CurriculumGroup curriculumGroup = (CurriculumGroup) curriculumModule;
for (final CurriculumModule childCurriculumModule : curriculumGroup.getCurriculumModulesSet()) {
if (!childCurriculumModule.isLeaf() && ((CurriculumGroup) childCurriculumModule).isNoCourseGroupCurriculumGroup()) {
continue;
}
final EquivalencyPlanEntryCurriculumModuleWrapper childEquivalencyPlanEntryCurriculumModuleWrapper =
getEquivalencyPlanEntryCurriculumModuleWrapper(degreeCurricularPlan, childCurriculumModule);
equivalencyPlanEntryCurriculumModuleWrapper.addChildren(childEquivalencyPlanEntryCurriculumModuleWrapper);
}
}