destination.getAssociatedCurricularCourses().addAll(source.getAssociatedCurricularCourses()); persistentExecutionCourse.deleteExecutionCourse(source); } catch (ExcepcaoPersistencia e) { throw new FenixServiceException(e); }
destination.getAssociatedCurricularCourses().addAll(source.getAssociatedCurricularCourses()); persistentExecutionCourse.deleteExecutionCourse(source);
    public void run(Integer executionCourseDestinationId, Integer executionCourseSourceId)            throws FenixServiceException {        try {            ISuportePersistente ps = SuportePersistenteOJB.getInstance();            IPersistentExecutionCourse persistentExecutionCourse = ps.getIPersistentExecutionCourse();            IExecutionCourse destination;            IExecutionCourse source;            destination = (IExecutionCourse) persistentExecutionCourse.readByOID(ExecutionCourse.class,                    executionCourseDestinationId, true);            source = (IExecutionCourse) persistentExecutionCourse.readByOID(ExecutionCourse.class,                    executionCourseSourceId);            if (!isMergeAllowed(destination, source, ps)) {                throw new InvalidArgumentsServiceException();            }            copyProfessorshipsAndResponsibleFors(destination, source, ps);            copyAttends(destination, source, ps);            copyBibliography(destination, source, ps);            copyEvaluations(destination, source, ps);            copySites(destination, source, ps);            copyShiftsAndLessons(destination, source, ps);            copyCourseReport(destination, source, ps);            copyGroups(destination, source, ps);            copySummaries(destination, source, ps);            copyEvaluationMethod(destination, source, ps);            destination.getAssociatedCurricularCourses().addAll(source.getAssociatedCurricularCourses());            persistentExecutionCourse.deleteExecutionCourse(source);        } catch (ExcepcaoPersistencia e) {            throw new FenixServiceException(e);        }    }