| /******************************************************************************* |
| * Copyright (c) 2009, 2015 Xored Software Inc and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Xored Software Inc - initial API and implementation and/or initial documentation |
| *******************************************************************************/ |
| package org.eclipse.rcptt.tesla.ecl.model.impl; |
| |
| import org.eclipse.rcptt.tesla.ecl.model.ControlHandler; |
| import org.eclipse.rcptt.tesla.ecl.model.GetItem; |
| import org.eclipse.rcptt.tesla.ecl.model.TeslaPackage; |
| |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.rcptt.ecl.core.impl.CommandImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Get Item</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetItemImpl#getId <em>Id</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetItemImpl#getAfter <em>After</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetItemImpl#getType <em>Type</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetItemImpl#getIndex <em>Index</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetItemImpl#getParent <em>Parent</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetItemImpl#getPath <em>Path</em>}</li> |
| * <li>{@link org.eclipse.rcptt.tesla.ecl.model.impl.GetItemImpl#getColumn <em>Column</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class GetItemImpl extends CommandImpl implements GetItem { |
| /** |
| * The default value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected static final String ID_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getId() <em>Id</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getId() |
| * @generated |
| * @ordered |
| */ |
| protected String id = ID_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getAfter() <em>After</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAfter() |
| * @generated |
| * @ordered |
| */ |
| protected ControlHandler after; |
| |
| /** |
| * The default value of the '{@link #getType() <em>Type</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getType() |
| * @generated |
| * @ordered |
| */ |
| protected static final String TYPE_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getType() <em>Type</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getType() |
| * @generated |
| * @ordered |
| */ |
| protected String type = TYPE_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIndex() |
| * @generated |
| * @ordered |
| */ |
| protected static final Integer INDEX_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIndex() |
| * @generated |
| * @ordered |
| */ |
| protected Integer index = INDEX_EDEFAULT; |
| |
| /** |
| * The cached value of the '{@link #getParent() <em>Parent</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getParent() |
| * @generated |
| * @ordered |
| */ |
| protected ControlHandler parent; |
| |
| /** |
| * The default value of the '{@link #getPath() <em>Path</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPath() |
| * @generated |
| * @ordered |
| */ |
| protected static final String PATH_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getPath() <em>Path</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPath() |
| * @generated |
| * @ordered |
| */ |
| protected String path = PATH_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getColumn() <em>Column</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColumn() |
| * @generated |
| * @ordered |
| */ |
| protected static final String COLUMN_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getColumn() <em>Column</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColumn() |
| * @generated |
| * @ordered |
| */ |
| protected String column = COLUMN_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected GetItemImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return TeslaPackage.Literals.GET_ITEM; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getId() { |
| return id; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setId(String newId) { |
| String oldId = id; |
| id = newId; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_ITEM__ID, oldId, id)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ControlHandler getAfter() { |
| if (after != null && after.eIsProxy()) { |
| InternalEObject oldAfter = (InternalEObject)after; |
| after = (ControlHandler)eResolveProxy(oldAfter); |
| if (after != oldAfter) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TeslaPackage.GET_ITEM__AFTER, oldAfter, after)); |
| } |
| } |
| return after; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ControlHandler basicGetAfter() { |
| return after; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setAfter(ControlHandler newAfter) { |
| ControlHandler oldAfter = after; |
| after = newAfter; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_ITEM__AFTER, oldAfter, after)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Integer getIndex() { |
| return index; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIndex(Integer newIndex) { |
| Integer oldIndex = index; |
| index = newIndex; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_ITEM__INDEX, oldIndex, index)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ControlHandler getParent() { |
| if (parent != null && parent.eIsProxy()) { |
| InternalEObject oldParent = (InternalEObject)parent; |
| parent = (ControlHandler)eResolveProxy(oldParent); |
| if (parent != oldParent) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, TeslaPackage.GET_ITEM__PARENT, oldParent, parent)); |
| } |
| } |
| return parent; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ControlHandler basicGetParent() { |
| return parent; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setParent(ControlHandler newParent) { |
| ControlHandler oldParent = parent; |
| parent = newParent; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_ITEM__PARENT, oldParent, parent)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getType() { |
| return type; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setType(String newType) { |
| String oldType = type; |
| type = newType; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_ITEM__TYPE, oldType, type)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getPath() { |
| return path; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPath(String newPath) { |
| String oldPath = path; |
| path = newPath; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_ITEM__PATH, oldPath, path)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getColumn() { |
| return column; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setColumn(String newColumn) { |
| String oldColumn = column; |
| column = newColumn; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, TeslaPackage.GET_ITEM__COLUMN, oldColumn, column)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case TeslaPackage.GET_ITEM__ID: |
| return getId(); |
| case TeslaPackage.GET_ITEM__AFTER: |
| if (resolve) return getAfter(); |
| return basicGetAfter(); |
| case TeslaPackage.GET_ITEM__TYPE: |
| return getType(); |
| case TeslaPackage.GET_ITEM__INDEX: |
| return getIndex(); |
| case TeslaPackage.GET_ITEM__PARENT: |
| if (resolve) return getParent(); |
| return basicGetParent(); |
| case TeslaPackage.GET_ITEM__PATH: |
| return getPath(); |
| case TeslaPackage.GET_ITEM__COLUMN: |
| return getColumn(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case TeslaPackage.GET_ITEM__ID: |
| setId((String)newValue); |
| return; |
| case TeslaPackage.GET_ITEM__AFTER: |
| setAfter((ControlHandler)newValue); |
| return; |
| case TeslaPackage.GET_ITEM__TYPE: |
| setType((String)newValue); |
| return; |
| case TeslaPackage.GET_ITEM__INDEX: |
| setIndex((Integer)newValue); |
| return; |
| case TeslaPackage.GET_ITEM__PARENT: |
| setParent((ControlHandler)newValue); |
| return; |
| case TeslaPackage.GET_ITEM__PATH: |
| setPath((String)newValue); |
| return; |
| case TeslaPackage.GET_ITEM__COLUMN: |
| setColumn((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case TeslaPackage.GET_ITEM__ID: |
| setId(ID_EDEFAULT); |
| return; |
| case TeslaPackage.GET_ITEM__AFTER: |
| setAfter((ControlHandler)null); |
| return; |
| case TeslaPackage.GET_ITEM__TYPE: |
| setType(TYPE_EDEFAULT); |
| return; |
| case TeslaPackage.GET_ITEM__INDEX: |
| setIndex(INDEX_EDEFAULT); |
| return; |
| case TeslaPackage.GET_ITEM__PARENT: |
| setParent((ControlHandler)null); |
| return; |
| case TeslaPackage.GET_ITEM__PATH: |
| setPath(PATH_EDEFAULT); |
| return; |
| case TeslaPackage.GET_ITEM__COLUMN: |
| setColumn(COLUMN_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case TeslaPackage.GET_ITEM__ID: |
| return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); |
| case TeslaPackage.GET_ITEM__AFTER: |
| return after != null; |
| case TeslaPackage.GET_ITEM__TYPE: |
| return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); |
| case TeslaPackage.GET_ITEM__INDEX: |
| return INDEX_EDEFAULT == null ? index != null : !INDEX_EDEFAULT.equals(index); |
| case TeslaPackage.GET_ITEM__PARENT: |
| return parent != null; |
| case TeslaPackage.GET_ITEM__PATH: |
| return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); |
| case TeslaPackage.GET_ITEM__COLUMN: |
| return COLUMN_EDEFAULT == null ? column != null : !COLUMN_EDEFAULT.equals(column); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuilder result = new StringBuilder(super.toString()); |
| result.append(" (id: "); |
| result.append(id); |
| result.append(", type: "); |
| result.append(type); |
| result.append(", index: "); |
| result.append(index); |
| result.append(", path: "); |
| result.append(path); |
| result.append(", column: "); |
| result.append(column); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //GetItemImpl |