@Override public SubstationImpl setTso(String tso) { String oldValue = this.tso; this.tso = tso; getNetwork().getListeners().notifyUpdate(this, "tso", oldValue, tso); return this; }
protected void notifyUpdate(String attribute, Object oldValue, Object newValue) { getNetwork().getListeners().notifyUpdate(this, attribute, oldValue, newValue); }
private void notifyUpdate(String attribute, Object oldValue, Object newValue) { getNetwork().getListeners().notifyUpdate(this, attribute, oldValue, newValue); }
protected void notifyUpdate(String attribute, Object oldValue, Object newValue) { network.get().getListeners().notifyUpdate(this, attribute, oldValue, newValue); }
protected void notifyUpdate(String attribute, Object oldValue, Object newValue) { getNetwork().getListeners().notifyUpdate(this, attribute, oldValue, newValue); }
@Override public void setFictitious(boolean fictitious) { boolean oldValue = this.fictitious; if (oldValue != fictitious) { this.fictitious = fictitious; voltageLevel.invalidateCache(); NetworkImpl network = voltageLevel.getNetwork(); network.getListeners().notifyUpdate(this, "fictitious", oldValue, fictitious); } }
@Override public SubstationImpl setCountry(Country country) { ValidationUtil.checkCountry(this, country); Country oldValue = this.country; this.country = country; getNetwork().getListeners().notifyUpdate(this, "country", oldValue.toString(), country.toString()); return this; }
@Override public void setOpen(boolean open) { NetworkImpl network = voltageLevel.getNetwork(); int index = network.getVariantIndex(); boolean oldValue = this.open.get(index); if (oldValue != open) { this.open.set(index, open); voltageLevel.invalidateCache(); network.getListeners().notifyUpdate(this, "open", oldValue, open); } }
@Override public void setRetained(boolean retained) { if (voltageLevel.getTopologyKind() != TopologyKind.NODE_BREAKER) { throw new ValidationException(this, "retain status is not modifiable in a non node/breaker voltage level"); } NetworkImpl network = voltageLevel.getNetwork(); int index = network.getVariantIndex(); boolean oldValue = this.retained.get(index); if (oldValue != retained) { this.retained.set(index, retained); voltageLevel.invalidateCache(); network.getListeners().notifyUpdate(this, "retained", oldValue, retained); } }
public C setTapPosition(int tapPosition) { if (tapPosition < lowTapPosition || tapPosition > getHighTapPosition()) { throw new ValidationException(parent, "incorrect tap position " + tapPosition + " [" + lowTapPosition + ", " + getHighTapPosition() + "]"); } int oldValue = this.tapPosition.set(network.get().getVariantIndex(), tapPosition); parent.getNetwork().getListeners().notifyUpdate(parent.getTransformer(), getTapChangerAttribute() + ".tapPosition", oldValue, tapPosition); return (C) this; }