PartyType type, Unit parentUnit) {
PartyTypeEnum type, Unit parentUnit) {
    public void edit(String unitName, Integer unitCostCenter, Date beginDate, Date endDate,            PartyType type, Unit parentUnit) {        this.setName(unitName);        this.setBeginDate(beginDate);        this.setEndDate(endDate);        this.setType(type);        this.setCostCenterCode(unitCostCenter);        if (parentUnit != null) {            this.addParents(parentUnit);        }        if (endDate != null && endDate.before(beginDate)) {            throw new DomainException("error.endDateBeforeBeginDate");        }    }