use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class LaserRangeFinderVelocityImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletLaserRangeFinder newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.LASER_RANGE_FINDER_VELOCITY__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.LASER_RANGE_FINDER_VELOCITY__MBRICK, newMbrick, newMbrick));
}
use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class LoadCellLedImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletLoadCell newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.LOAD_CELL_LED__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.LOAD_CELL_LED__MBRICK, newMbrick, newMbrick));
}
use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class LoadCellWeightImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletLoadCell newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.LOAD_CELL_WEIGHT__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.LOAD_CELL_WEIGHT__MBRICK, newMbrick, newMbrick));
}
use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class MBarometerTemperatureImpl method setMbrick.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setMbrick(MBrickletBarometer newMbrick) {
if (newMbrick != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBAROMETER_TEMPERATURE__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.MBAROMETER_TEMPERATURE__MBRICK, newMbrick, newMbrick));
}
use of org.eclipse.emf.ecore.InternalEObject in project openhab1-addons by openhab.
the class IndustrialDualAnalogInChannelImpl 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.INDUSTRIAL_DUAL_ANALOG_IN_CHANNEL__TF_CONFIG, null, msgs);
if (newTfConfig != null)
msgs = ((InternalEObject) newTfConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.INDUSTRIAL_DUAL_ANALOG_IN_CHANNEL__TF_CONFIG, null, msgs);
msgs = basicSetTfConfig(newTfConfig, msgs);
if (msgs != null)
msgs.dispatch();
} else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.INDUSTRIAL_DUAL_ANALOG_IN_CHANNEL__TF_CONFIG, newTfConfig, newTfConfig));
}
Aggregations