private static CurricularRule createRestrictionNotEnroledDegreeModule(DegreeModule toApplyRule, ExecutionSemester begin,
ExecutionSemester end, CurricularRuleParametersDTO parametersDTO) {
final DegreeModule notEnroledDegreeModule = FenixFramework.getDomainObject(parametersDTO.getSelectedDegreeModuleID());
final CourseGroup contextCourseGroup =
(CourseGroup) FenixFramework.getDomainObject(parametersDTO.getContextCourseGroupID());
return new RestrictionNotEnroledDegreeModule((CurricularCourse) toApplyRule, (CurricularCourse) notEnroledDegreeModule,
contextCourseGroup, parametersDTO.getCurricularPeriodInfoDTO(), begin, end);
}