try { ISuportePersistente persistentSuport = PersistenceSupportFactory.getDefaultPersistenceSupport(); ICursoPersistente persistentDegree = persistentSuport.getICursoPersistente();
ISuportePersistente persistentSuport = PersistenceSupportFactory.getDefaultPersistenceSupport(); ICursoPersistente persistentDegree = persistentSuport.getICursoPersistente();
    public void run(InfoDegree infoDegree) throws FenixServiceException {        try {            ISuportePersistente persistentSuport = PersistenceSupportFactory.getDefaultPersistenceSupport();            ICursoPersistente persistentDegree = persistentSuport.getICursoPersistente();            String code = infoDegree.getSigla();            String name = infoDegree.getNome();            TipoCurso type = infoDegree.getTipoCurso();            IDegree degree = new Degree();            persistentDegree.simpleLockWrite(degree);            degree.setSigla(code);            degree.setNome(name);            degree.setTipoCurso(type);            degree.setConcreteClassForDegreeCurricularPlans(DegreeCurricularPlan.class.getName());        } catch (ExistingPersistentException existingException) {            throw new ExistingServiceException(existingException);        } catch (ExcepcaoPersistencia excepcaoPersistencia) {            throw new FenixServiceException(excepcaoPersistencia);        }    }