CurricularPeriod degreeCurricularPeriod = (CurricularPeriod) curricularCourse .getDegreeCurricularPlan().getDegreeStructure();
    public void run(CurricularCourse curricularCourse, Context context, CourseGroup courseGroup,            Integer year, Integer semester) throws ExcepcaoPersistencia, FenixServiceException {        // TODO: check CurricularSemesterID for null value        CurricularPeriod degreeCurricularPeriod = (CurricularPeriod) curricularCourse                .getDegreeCurricularPlan().getDegreeStructure();        CurricularPeriod curricularPeriod = degreeCurricularPeriod.getCurricularPeriod(                new CurricularPeriodInfoDTO(year, CurricularPeriodType.YEAR),                new CurricularPeriodInfoDTO(semester, CurricularPeriodType.SEMESTER));        if (curricularPeriod == null) {            curricularPeriod = degreeCurricularPeriod.addCurricularPeriod(new CurricularPeriodInfoDTO(                    year, CurricularPeriodType.YEAR), new CurricularPeriodInfoDTO(semester,                    CurricularPeriodType.SEMESTER));        }        curricularCourse.editContext(context, courseGroup, curricularPeriod);    }