final ICourseReport courseReport = (ICourseReport) persistentCourseReport.readByOID( CourseReport.class, courseReportID);
final ICourseReport courseReport; if (courseReportID != 0) { courseReport = (ICourseReport) persistentCourseReport.readByOID(CourseReport.class, courseReportID); } else { final IPersistentExecutionCourse persistentExecutionCourse = persistentSupport.getIPersistentExecutionCourse(); final IExecutionCourse executionCourse = (IExecutionCourse) persistentExecutionCourse.readByOID(ExecutionCourse.class, infoCourseReport.getInfoExecutionCourse().getIdInternal());  courseReport = executionCourse.createCourseReport(newReport); }
    public void run(Integer courseReportID, InfoCourseReport infoCourseReport, String newReport) throws ExcepcaoPersistencia,            FenixServiceException {        final ISuportePersistente persistentSupport = PersistenceSupportFactory                .getDefaultPersistenceSupport();        final IPersistentCourseReport persistentCourseReport = persistentSupport                .getIPersistentCourseReport();        final ICourseReport courseReport = (ICourseReport) persistentCourseReport.readByOID(                CourseReport.class, courseReportID);        if (courseReport == null)            throw new InvalidArgumentsServiceException();        courseReport.edit(newReport);    }