this.unit = (Unit) RootDomainObject.getInstance().readPartyByOID( Integer.valueOf(this.getUnitIDHidden().getValue().toString()));  if (toRemoveParentUnit) { getParentUnitsRelationTypes(); } else{ getSubUnitsRelationTypes(); }
this.unit = (Unit) rootDomainObject.readPartyByOID( Integer.valueOf(this.getUnitIDHidden().getValue().toString())); } if (toRemoveParentUnit) { getParentUnitsRelationTypes(); } else { getSubUnitsRelationTypes();
    public Unit getUnit() throws FenixFilterException, FenixServiceException {        if (this.unit == null && this.getUnitIDHidden() != null                && this.getUnitIDHidden().getValue() != null                && !this.getUnitIDHidden().getValue().equals("")) {            this.unit = (Unit) RootDomainObject.getInstance().readPartyByOID(                    Integer.valueOf(this.getUnitIDHidden().getValue().toString()));            if (toRemoveParentUnit) {                getParentUnitsRelationTypes();            } else{                getSubUnitsRelationTypes();              }        }        return unit;    }