| /******************************************************************************* |
| * Copyright (c) 2018 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.ecl.operations.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.rcptt.ecl.core.impl.CommandImpl; |
| |
| import org.eclipse.rcptt.ecl.operations.FindAll; |
| import org.eclipse.rcptt.ecl.operations.OperationsPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Find All</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.rcptt.ecl.operations.impl.FindAllImpl#getStr <em>Str</em>}</li> |
| * <li>{@link org.eclipse.rcptt.ecl.operations.impl.FindAllImpl#getRegex <em>Regex</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class FindAllImpl extends CommandImpl implements FindAll { |
| /** |
| * The default value of the '{@link #getStr() <em>Str</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getStr() |
| * @generated |
| * @ordered |
| */ |
| protected static final String STR_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getStr() <em>Str</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getStr() |
| * @generated |
| * @ordered |
| */ |
| protected String str = STR_EDEFAULT; |
| |
| /** |
| * The default value of the '{@link #getRegex() <em>Regex</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRegex() |
| * @generated |
| * @ordered |
| */ |
| protected static final String REGEX_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getRegex() <em>Regex</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRegex() |
| * @generated |
| * @ordered |
| */ |
| protected String regex = REGEX_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected FindAllImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return OperationsPackage.Literals.FIND_ALL; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getStr() { |
| return str; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setStr(String newStr) { |
| String oldStr = str; |
| str = newStr; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, OperationsPackage.FIND_ALL__STR, oldStr, str)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getRegex() { |
| return regex; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setRegex(String newRegex) { |
| String oldRegex = regex; |
| regex = newRegex; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, OperationsPackage.FIND_ALL__REGEX, oldRegex, regex)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case OperationsPackage.FIND_ALL__STR: |
| return getStr(); |
| case OperationsPackage.FIND_ALL__REGEX: |
| return getRegex(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case OperationsPackage.FIND_ALL__STR: |
| setStr((String)newValue); |
| return; |
| case OperationsPackage.FIND_ALL__REGEX: |
| setRegex((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case OperationsPackage.FIND_ALL__STR: |
| setStr(STR_EDEFAULT); |
| return; |
| case OperationsPackage.FIND_ALL__REGEX: |
| setRegex(REGEX_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case OperationsPackage.FIND_ALL__STR: |
| return STR_EDEFAULT == null ? str != null : !STR_EDEFAULT.equals(str); |
| case OperationsPackage.FIND_ALL__REGEX: |
| return REGEX_EDEFAULT == null ? regex != null : !REGEX_EDEFAULT.equals(regex); |
| } |
| 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(" (str: "); |
| result.append(str); |
| result.append(", regex: "); |
| result.append(regex); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //FindAllImpl |