| /** |
| * <copyright> |
| * Copyright (c) 2008 Open Canarias 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: |
| * A. Sanchez-Barbudo - initial API and implementation |
| * |
| * </copyright> |
| * |
| * $Id: HelperImpl.java,v 1.4 2009/02/20 11:04:08 radvorak Exp $ |
| */ |
| package org.eclipse.m2m.qvt.oml.ecore.QVTOperational.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.m2m.qvt.oml.ecore.QVTOperational.Helper; |
| import org.eclipse.m2m.qvt.oml.ecore.QVTOperational.QVTOperationalPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Helper</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.m2m.qvt.oml.ecore.QVTOperational.impl.HelperImpl#isIsQuery <em>Is Query</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class HelperImpl extends ImperativeOperationImpl implements Helper { |
| /** |
| * The default value of the '{@link #isIsQuery() <em>Is Query</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsQuery() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean IS_QUERY_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isIsQuery() <em>Is Query</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isIsQuery() |
| * @generated |
| * @ordered |
| */ |
| protected boolean isQuery = IS_QUERY_EDEFAULT; |
| |
| /** |
| * This is true if the Is Query attribute has been set. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| * @ordered |
| */ |
| protected boolean isQueryESet; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected HelperImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return QVTOperationalPackage.Literals.HELPER; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isIsQuery() { |
| return isQuery; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIsQuery(boolean newIsQuery) { |
| boolean oldIsQuery = isQuery; |
| isQuery = newIsQuery; |
| boolean oldIsQueryESet = isQueryESet; |
| isQueryESet = true; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, QVTOperationalPackage.HELPER__IS_QUERY, oldIsQuery, isQuery, !oldIsQueryESet)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void unsetIsQuery() { |
| boolean oldIsQuery = isQuery; |
| boolean oldIsQueryESet = isQueryESet; |
| isQuery = IS_QUERY_EDEFAULT; |
| isQueryESet = false; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.UNSET, QVTOperationalPackage.HELPER__IS_QUERY, oldIsQuery, IS_QUERY_EDEFAULT, oldIsQueryESet)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public boolean isSetIsQuery() { |
| return isQueryESet; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case QVTOperationalPackage.HELPER__IS_QUERY: |
| return isIsQuery(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case QVTOperationalPackage.HELPER__IS_QUERY: |
| setIsQuery((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case QVTOperationalPackage.HELPER__IS_QUERY: |
| unsetIsQuery(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case QVTOperationalPackage.HELPER__IS_QUERY: |
| return isSetIsQuery(); |
| } |
| 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(" (isQuery: "); |
| if (isQueryESet) result.append(isQuery); else result.append("<unset>"); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //HelperImpl |