Date beginDate, Date endDate, PartyType type, Integer departmentID, Integer degreeID)
Date beginDate, Date endDate, PartyTypeEnum type, Integer departmentID, Integer degreeID)
    public void run(Integer unitID, Integer parentUnitID, String unitName, String unitCostCenter,            Date beginDate, Date endDate, PartyType type, Integer departmentID, Integer degreeID)            throws ExcepcaoPersistencia, FenixServiceException, DomainException {        Unit unit = null;        if (unitID == null) {            unit = DomainFactory.makeUnit();        } else {            unit = (Unit) persistentObject.readByOID(Unit.class, unitID);            if (unit == null) {                throw new FenixServiceException("error.noUnit");            }        }        Unit parentUnit = setParentUnits(parentUnitID, unit);        Integer costCenterCode = null;        if (unitCostCenter != null && !unitCostCenter.equals("")) {            costCenterCode = (Integer.valueOf(unitCostCenter));        }                unit.edit(unitName, costCenterCode, beginDate, endDate, type, parentUnit);        setDepartment(departmentID, unit);        setDegree(degreeID, unit);    }