Iterator<ExecutionCourse> executionCourseIterator = onlineTest.getAssociatedExecutionCoursesForOnlineTestIterator();
Iterator<ExecutionCourse> executionCourseIterator = onlineTest.getAssociatedExecutionCoursesIterator();
    public void run(Integer executionCourseId, Integer distributedTestId) throws ExcepcaoPersistencia {        IPersistentDistributedTest persistentDistributedTest = persistentSupport.getIPersistentDistributedTest();        DistributedTest distributedTest = (DistributedTest) persistentObject.readByOID(DistributedTest.class, distributedTestId);        persistentSupport.getIPersistentQuestion().cleanQuestions(distributedTest);        persistentSupport.getIPersistentMetadata().cleanMetadatas();        if (distributedTest.getTestType().getType().intValue() == TestType.EVALUATION) {            OnlineTest onlineTest = (OnlineTest) persistentSupport.getIPersistentOnlineTest().readByDistributedTest(distributedTestId);            Iterator<ExecutionCourse> executionCourseIterator = onlineTest.getAssociatedExecutionCoursesForOnlineTestIterator();            while (executionCourseIterator.hasNext()) {                executionCourseIterator.next();                executionCourseIterator.remove();            }            Iterator<Mark> marksIterator = onlineTest.getMarksIterator();            while (marksIterator.hasNext()) {                Mark mark = marksIterator.next();                marksIterator.remove();                persistentSupport.getIPersistentMark().deleteByOID(Mark.class, mark.getIdInternal());            }            // persistentSupport.getIPersistentMark().deleteByEvaluation(onlineTest);            distributedTest.removeOnlineTest();            persistentSupport.getIPersistentOnlineTest().deleteByOID(OnlineTest.class, onlineTest.getIdInternal());        }        distributedTest.removeTestScope();        Iterator<StudentTestQuestion> studentTestQuestionIterator = distributedTest.getDistributedTestQuestionsIterator();        while (studentTestQuestionIterator.hasNext()) {            StudentTestQuestion studentTestQuestion = studentTestQuestionIterator.next();            studentTestQuestionIterator.remove();            studentTestQuestion.delete();        }        Iterator<DistributedTestAdvisory> distributedTestAdvisoryIterator = distributedTest.getDistributedTestAdvisoriesIterator();        while (distributedTestAdvisoryIterator.hasNext()) {            DistributedTestAdvisory distributedTestAdvisory = distributedTestAdvisoryIterator.next();            distributedTestAdvisoryIterator.remove();            persistentSupport.getIPersistentDistributedTestAdvisory().deleteByOID(DistributedTestAdvisory.class,                    distributedTestAdvisory.getIdInternal());        }        Iterator<StudentTestLog> studentTestLogsIterator = distributedTest.getStudentsLogsIterator();        while (studentTestLogsIterator.hasNext()) {            StudentTestLog studentTestLog = studentTestLogsIterator.next();            studentTestLogsIterator.remove();            studentTestLog.removeStudent();            persistentSupport.getIPersistentStudentTestLog().deleteByOID(StudentTestLog.class, studentTestLog.getIdInternal());        }        persistentDistributedTest.deleteByOID(DistributedTest.class, distributedTest.getIdInternal());    }