while (iterator.hasNext()) allInfoExecutionDegrees.add(Cloner.get((IExecutionDegree) iterator.next()));
while (iterator.hasNext()) { IExecutionDegree executionDegree = (IExecutionDegree) iterator.next(); InfoExecutionDegree infoExecutionDegree = InfoExecutionDegree.newInfoFromDomain(executionDegree);  allInfoExecutionDegrees.add(infoExecutionDegree); }
    public List run(Integer idDegree) throws FenixServiceException {        ISuportePersistente sp;        List allExecutionDegrees = null;        try {            IDegree degree = new Degree();            degree.setIdInternal(idDegree);            sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            IPersistentExecutionDegree cursoExecucaoPersistente = sp.getIPersistentExecutionDegree();            allExecutionDegrees = cursoExecucaoPersistente.readExecutionsDegreesByDegree(degree);        } catch (ExcepcaoPersistencia excepcaoPersistencia) {            throw new FenixServiceException(excepcaoPersistencia);        }        if (allExecutionDegrees == null || allExecutionDegrees.isEmpty()) {            throw new FenixServiceException();        }        // build the result of this service        Iterator iterator = allExecutionDegrees.iterator();        List allInfoExecutionDegrees = new ArrayList(allExecutionDegrees.size());        while (iterator.hasNext())            allInfoExecutionDegrees.add(Cloner.get((IExecutionDegree) iterator.next()));        return allInfoExecutionDegrees;    }