PartyType type = getUnitType();
PartyTypeEnum type = getUnitType();
    public String createSubUnit() throws FenixFilterException, FenixServiceException {        if (verifyCostCenterCode()) {            return "";        }        PrepareDatesResult datesResult = prepareDates(this.getUnitBeginDate(), this.getUnitEndDate());        if (datesResult.isTest()) {            return "";        }        PartyType type = getUnitType();        CreateNewUnitParameters parameters = new CreateNewUnitParameters(this, 1);        final Object[] argsToRead = { null, this.getUnit().getIdInternal(), this.getUnitName(),                this.getUnitCostCenter(), datesResult.getBeginDate(), datesResult.getEndDate(), type,                parameters.getDepartmentID(), parameters.getDegreeID() };        return executeCreateNewUnitService(argsToRead, "backToUnitDetails");    }