if (((FinalEvaluation) evaluation).deleteFrom(executionCourseFrom)) { persistentSupport.getIPersistentObject().deleteByOID(Evaluation.class, evaluation.getIdInternal());
final FinalEvaluation finalEvaluationFrom = (FinalEvaluation) evaluation; if (finalEvaluationFrom.hasAnyMarks()) { throw new FenixServiceException("Cannot merge execution courses: marks exist for final evaluation."); } else { finalEvaluationFrom.delete();
    private void removeEvaluations(final ISuportePersistente persistentSupport,            final ExecutionCourse executionCourseFrom) throws ExcepcaoPersistencia,            InvalidArgumentsServiceException {        final List<Evaluation> associatedEvaluations = new ArrayList();        associatedEvaluations.addAll(executionCourseFrom.getAssociatedEvaluations());        for (final Evaluation evaluation : associatedEvaluations) {            if (evaluation instanceof FinalEvaluation) {                if (((FinalEvaluation) evaluation).deleteFrom(executionCourseFrom)) {                    persistentSupport.getIPersistentObject().deleteByOID(Evaluation.class, evaluation.getIdInternal());                }            } else {                throw new InvalidArgumentsServiceException();            }        }    }