use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class RotaryEncoderImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletRotaryEncoder newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.ROTARY_ENCODER__MBRICK && newMbrick != null)) {
if (EcoreUtil.isAncestor(this, newMbrick))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newMbrick != null)
msgs = ((InternalEObject) newMbrick).eInverseAdd(this, ModelPackage.MSUB_DEVICE_HOLDER__MSUBDEVICES, MSubDeviceHolder.class, msgs);
msgs = basicSetMbrick(newMbrick, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.ROTARY_ENCODER__MBRICK, newMbrick, newMbrick));
}
use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class MBrickdImpl method setEcosystem.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setEcosystem(Ecosystem newEcosystem) {
if (newEcosystem != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKD__ECOSYSTEM && newEcosystem != null)) {
if (EcoreUtil.isAncestor(this, newEcosystem))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newEcosystem != null)
msgs = ((InternalEObject) newEcosystem).eInverseAdd(this, ModelPackage.ECOSYSTEM__MBRICKDS, Ecosystem.class, msgs);
msgs = basicSetEcosystem(newEcosystem, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKD__ECOSYSTEM, newEcosystem, newEcosystem));
}
use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class DigitalSensorImpl method setTfConfig.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTfConfig(TFIOSensorConfiguration newTfConfig) {
if (newTfConfig != tfConfig) {
NotificationChain msgs = null;
if (tfConfig != null)
msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.DIGITAL_SENSOR__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.DIGITAL_SENSOR__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DIGITAL_SENSOR__TF_CONFIG, newTfConfig, newTfConfig));
}
use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class Dual020mADeviceImpl method setTfConfig.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTfConfig(TFBaseConfiguration newTfConfig) {
if (newTfConfig != tfConfig) {
NotificationChain msgs = null;
if (tfConfig != null)
msgs = ((InternalEObject) tfConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.DUAL020M_ADEVICE__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.DUAL020M_ADEVICE__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DUAL020M_ADEVICE__TF_CONFIG, newTfConfig, newTfConfig));
}
use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class JoystickYPositionImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletJoystick newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.JOYSTICK_YPOSITION__MBRICK && newMbrick != null)) {
if (EcoreUtil.isAncestor(this, newMbrick))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newMbrick != null)
msgs = ((InternalEObject) newMbrick).eInverseAdd(this, ModelPackage.MSUB_DEVICE_HOLDER__MSUBDEVICES, MSubDeviceHolder.class, msgs);
msgs = basicSetMbrick(newMbrick, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.JOYSTICK_YPOSITION__MBRICK, newMbrick, newMbrick));
}
Aggregations