blob: 32690cea554484bd51429639d47521c412523c54 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2014 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.core.ecl.core.model.impl;
import org.eclipse.rcptt.core.ecl.core.model.CreateVerification;
import org.eclipse.rcptt.core.ecl.core.model.Q7CorePackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
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>Create Verification</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.rcptt.core.ecl.core.model.impl.CreateVerificationImpl#getType <em>Type</em>}</li>
* <li>{@link org.eclipse.rcptt.core.ecl.core.model.impl.CreateVerificationImpl#getParam <em>Param</em>}</li>
* </ul>
*
* @generated
*/
public class CreateVerificationImpl extends CommandImpl implements CreateVerification {
/**
* 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 cached value of the '{@link #getParam() <em>Param</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getParam()
* @generated
* @ordered
*/
protected EObject param;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CreateVerificationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return Q7CorePackage.Literals.CREATE_VERIFICATION;
}
/**
* <!-- 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, Q7CorePackage.CREATE_VERIFICATION__TYPE, oldType, type));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EObject getParam() {
if (param != null && param.eIsProxy()) {
InternalEObject oldParam = (InternalEObject)param;
param = eResolveProxy(oldParam);
if (param != oldParam) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Q7CorePackage.CREATE_VERIFICATION__PARAM, oldParam, param));
}
}
return param;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EObject basicGetParam() {
return param;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setParam(EObject newParam) {
EObject oldParam = param;
param = newParam;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Q7CorePackage.CREATE_VERIFICATION__PARAM, oldParam, param));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Q7CorePackage.CREATE_VERIFICATION__TYPE:
return getType();
case Q7CorePackage.CREATE_VERIFICATION__PARAM:
if (resolve) return getParam();
return basicGetParam();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Q7CorePackage.CREATE_VERIFICATION__TYPE:
setType((String)newValue);
return;
case Q7CorePackage.CREATE_VERIFICATION__PARAM:
setParam((EObject)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Q7CorePackage.CREATE_VERIFICATION__TYPE:
setType(TYPE_EDEFAULT);
return;
case Q7CorePackage.CREATE_VERIFICATION__PARAM:
setParam((EObject)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Q7CorePackage.CREATE_VERIFICATION__TYPE:
return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
case Q7CorePackage.CREATE_VERIFICATION__PARAM:
return param != null;
}
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(" (type: ");
result.append(type);
result.append(')');
return result.toString();
}
} //CreateVerificationImpl