Search in sources :

Example 96 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project openhab1-addons by openhab.

the class MBrickletHumidityImpl method basicSetTfConfig.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
public NotificationChain basicSetTfConfig(TFBaseConfiguration newTfConfig, NotificationChain msgs) {
    TFBaseConfiguration oldTfConfig = tfConfig;
    tfConfig = newTfConfig;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_HUMIDITY__TF_CONFIG, oldTfConfig, newTfConfig);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : TFBaseConfiguration(org.openhab.binding.tinkerforge.internal.model.TFBaseConfiguration) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 97 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project openhab1-addons by openhab.

the class MBrickletDistanceIRImpl method setIpConnection.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setIpConnection(IPConnection newIpConnection) {
    IPConnection oldIpConnection = ipConnection;
    ipConnection = newIpConnection;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_DISTANCE_IR__IP_CONNECTION, oldIpConnection, ipConnection));
}
Also used : IPConnection(com.tinkerforge.IPConnection) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 98 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project openhab1-addons by openhab.

the class MBrickletDistanceIRImpl method setBrickd.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setBrickd(MBrickd newBrickd) {
    if (newBrickd != eInternalContainer() || (eContainerFeatureID() != ModelPackage.MBRICKLET_DISTANCE_IR__BRICKD && newBrickd != null)) {
        if (EcoreUtil.isAncestor(this, newBrickd))
            throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
        NotificationChain msgs = null;
        if (eInternalContainer() != null)
            msgs = eBasicRemoveFromContainer(msgs);
        if (newBrickd != null)
            msgs = ((InternalEObject) newBrickd).eInverseAdd(this, ModelPackage.MBRICKD__MDEVICES, MBrickd.class, msgs);
        msgs = basicSetBrickd(newBrickd, msgs);
        if (msgs != null)
            msgs.dispatch();
    } else if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_DISTANCE_IR__BRICKD, newBrickd, newBrickd));
}
Also used : NotificationChain(org.eclipse.emf.common.notify.NotificationChain) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Example 99 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project openhab1-addons by openhab.

the class MBrickletDistanceIRImpl method setThreshold.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setThreshold(BigDecimal newThreshold) {
    BigDecimal oldThreshold = threshold;
    threshold = newThreshold;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_DISTANCE_IR__THRESHOLD, oldThreshold, threshold));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) BigDecimal(java.math.BigDecimal)

Example 100 with ENotificationImpl

use of org.eclipse.emf.ecore.impl.ENotificationImpl in project openhab1-addons by openhab.

the class MBrickletDistanceIRImpl method setTinkerforgeDevice.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setTinkerforgeDevice(BrickletDistanceIR newTinkerforgeDevice) {
    BrickletDistanceIR oldTinkerforgeDevice = tinkerforgeDevice;
    tinkerforgeDevice = newTinkerforgeDevice;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_DISTANCE_IR__TINKERFORGE_DEVICE, oldTinkerforgeDevice, tinkerforgeDevice));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) MBrickletDistanceIR(org.openhab.binding.tinkerforge.internal.model.MBrickletDistanceIR) BrickletDistanceIR(com.tinkerforge.BrickletDistanceIR)

Aggregations

ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1120 InternalEObject (org.eclipse.emf.ecore.InternalEObject)310 NotificationChain (org.eclipse.emf.common.notify.NotificationChain)289 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)111 Logger (org.slf4j.Logger)110 IPConnection (com.tinkerforge.IPConnection)51 DecimalValue (org.openhab.binding.tinkerforge.internal.types.DecimalValue)51 BigDecimal (java.math.BigDecimal)46 Expression (com.robotoworks.mechanoid.db.sqliteModel.Expression)38 TFBaseConfiguration (org.openhab.binding.tinkerforge.internal.model.TFBaseConfiguration)26 HighLowValue (org.openhab.binding.tinkerforge.internal.types.HighLowValue)17 OnOffValue (org.openhab.binding.tinkerforge.internal.types.OnOffValue)15 MSubDeviceHolder (org.openhab.binding.tinkerforge.internal.model.MSubDeviceHolder)12 TableDefinition (com.robotoworks.mechanoid.db.sqliteModel.TableDefinition)9 SelectCoreExpression (com.robotoworks.mechanoid.db.sqliteModel.SelectCoreExpression)5 MBrickd (org.openhab.binding.tinkerforge.internal.model.MBrickd)5 PercentValue (org.openhab.binding.tinkerforge.internal.types.PercentValue)5 ColumnSource (com.robotoworks.mechanoid.db.sqliteModel.ColumnSource)4 ConflictClause (com.robotoworks.mechanoid.db.sqliteModel.ConflictClause)4 ButtonConfiguration (org.openhab.binding.tinkerforge.internal.model.ButtonConfiguration)4