else{ unit = (IUnit) suportePersistente.getIPersistentObject().readByOID(Unit.class, unitID); if(unit == null){ throw new FenixServiceException("error.noUnit"); } }
    public void run(Integer unitID, Integer parentUnitID, String unitName, String unitCostCenter, Date beginDate, Date endDate,            UnitType type, Integer departmentID, Integer degreeID) throws ExcepcaoPersistencia, FenixServiceException {        ISuportePersistente suportePersistente = PersistenceSupportFactory.getDefaultPersistenceSupport();                IUnit unit = null;        if(unitID == null){            unit = DomainFactory.makeUnit();        }        else{           unit = (IUnit) suportePersistente.getIPersistentObject().readByOID(Unit.class, unitID);           if(unit == null){               throw new FenixServiceException("error.noUnit");           }        }                                IUnit parentUnit = setParentUnits(parentUnitID, suportePersistente, unit);                                          unit.edit(unitName, unitCostCenter, beginDate, endDate, type, parentUnit);                setDepartment(departmentID, suportePersistente, unit);                //setDegree(degreeID, suportePersistente);    }