if (evaluation instanceof FinalEvaluation) {
if (evaluation instanceof Proxy) { evaluation = (IEvaluation) ProxyHelper.getRealObject(evaluation); } if (evaluation instanceof IFinalEvaluation) {
    private void copyEvaluations(IExecutionCourse destination, IExecutionCourse source,            ISuportePersistente ps) throws ExcepcaoPersistencia, InvalidArgumentsServiceException {        IPersistentObject persistentObject = ps.getIPersistentObject();        List sourceEvaluations = source.getAssociatedEvaluations();        if (sourceEvaluations != null && !sourceEvaluations.isEmpty()) {            Iterator iter = sourceEvaluations.iterator();            while (iter.hasNext()) {                IEvaluation evaluation = (IEvaluation) iter.next();                if (evaluation instanceof FinalEvaluation) {                    persistentObject.deleteByOID(Evaluation.class, evaluation.getIdInternal());                } else {                    throw new InvalidArgumentsServiceException();                }            }        }    }