| /** |
| * Copyright (c) 2011, 2017 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Joerg Riegel - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.xtext.statemachine.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.osbp.xtext.statemachine.FSMStorageRetrieve; |
| import org.eclipse.osbp.xtext.statemachine.StatemachineDSLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>FSM Storage Retrieve</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.osbp.xtext.statemachine.impl.FSMStorageRetrieveImpl#getKey <em>Key</em>}</li> |
| * <li>{@link org.eclipse.osbp.xtext.statemachine.impl.FSMStorageRetrieveImpl#getAttribute <em>Attribute</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class FSMStorageRetrieveImpl extends FSMLazyResolverImpl implements FSMStorageRetrieve { |
| /** |
| * The default value of the '{@link #getKey() <em>Key</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getKey() |
| * @generated |
| * @ordered |
| */ |
| protected static final String KEY_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getKey() <em>Key</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getKey() |
| * @generated |
| * @ordered |
| */ |
| protected String key = KEY_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getAttribute() <em>Attribute</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAttribute() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ATTRIBUTE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAttribute() |
| * @generated |
| * @ordered |
| */ |
| protected String attribute = ATTRIBUTE_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected FSMStorageRetrieveImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return StatemachineDSLPackage.Literals.FSM_STORAGE_RETRIEVE; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getKey() { |
| return key; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setKey(String newKey) { |
| String oldKey = key; |
| key = newKey; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__KEY, oldKey, key)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getAttribute() { |
| return attribute; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setAttribute(String newAttribute) { |
| String oldAttribute = attribute; |
| attribute = newAttribute; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__ATTRIBUTE, oldAttribute, attribute)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__KEY: |
| return getKey(); |
| case StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__ATTRIBUTE: |
| return getAttribute(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__KEY: |
| setKey((String)newValue); |
| return; |
| case StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__ATTRIBUTE: |
| setAttribute((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__KEY: |
| setKey(KEY_EDEFAULT); |
| return; |
| case StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__ATTRIBUTE: |
| setAttribute(ATTRIBUTE_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__KEY: |
| return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key); |
| case StatemachineDSLPackage.FSM_STORAGE_RETRIEVE__ATTRIBUTE: |
| return ATTRIBUTE_EDEFAULT == null ? attribute != null : !ATTRIBUTE_EDEFAULT.equals(attribute); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (key: "); |
| result.append(key); |
| result.append(", attribute: "); |
| result.append(attribute); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //FSMStorageRetrieveImpl |