org.openxma.dsl.dom.model.impl.CallInputParameterImpl Maven / Gradle / Ivy
/**
*
*
*
* $Id$
*/
package org.openxma.dsl.dom.model.impl;
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.emf.ecore.impl.MinimalEObjectImpl;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.Attribute;
import org.openxma.dsl.dom.model.CallInputParameter;
import org.openxma.dsl.dom.model.QueryParameter;
/**
*
* An implementation of the model object 'Call Input Parameter'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.dom.model.impl.CallInputParameterImpl#getParameter Parameter}
* - {@link org.openxma.dsl.dom.model.impl.CallInputParameterImpl#getAttribute Attribute}
* - {@link org.openxma.dsl.dom.model.impl.CallInputParameterImpl#getName Name}
*
*
*
* @generated
*/
public class CallInputParameterImpl extends MinimalEObjectImpl.Container implements CallInputParameter {
/**
* The cached value of the '{@link #getParameter() Parameter}' reference.
*
*
* @see #getParameter()
* @generated
* @ordered
*/
protected QueryParameter parameter;
/**
* The cached value of the '{@link #getAttribute() Attribute}' reference.
*
*
* @see #getAttribute()
* @generated
* @ordered
*/
protected Attribute attribute;
/**
* The default value of the '{@link #getName() Name}' attribute.
*
*
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() Name}' attribute.
*
*
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
*
*
* @generated
*/
protected CallInputParameterImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return DomPackage.Literals.CALL_INPUT_PARAMETER;
}
/**
*
*
* @generated
*/
public QueryParameter getParameter() {
if (parameter != null && parameter.eIsProxy()) {
InternalEObject oldParameter = (InternalEObject)parameter;
parameter = (QueryParameter)eResolveProxy(oldParameter);
if (parameter != oldParameter) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomPackage.CALL_INPUT_PARAMETER__PARAMETER, oldParameter, parameter));
}
}
return parameter;
}
/**
*
*
* @generated
*/
public QueryParameter basicGetParameter() {
return parameter;
}
/**
*
*
* @generated
*/
public void setParameter(QueryParameter newParameter) {
QueryParameter oldParameter = parameter;
parameter = newParameter;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.CALL_INPUT_PARAMETER__PARAMETER, oldParameter, parameter));
}
/**
*
*
* @generated
*/
public Attribute getAttribute() {
if (attribute != null && attribute.eIsProxy()) {
InternalEObject oldAttribute = (InternalEObject)attribute;
attribute = (Attribute)eResolveProxy(oldAttribute);
if (attribute != oldAttribute) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomPackage.CALL_INPUT_PARAMETER__ATTRIBUTE, oldAttribute, attribute));
}
}
return attribute;
}
/**
*
*
* @generated
*/
public Attribute basicGetAttribute() {
return attribute;
}
/**
*
*
* @generated
*/
public void setAttribute(Attribute newAttribute) {
Attribute oldAttribute = attribute;
attribute = newAttribute;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.CALL_INPUT_PARAMETER__ATTRIBUTE, oldAttribute, attribute));
}
/**
*
*
* @generated
*/
public String getName() {
return name;
}
/**
*
*
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.CALL_INPUT_PARAMETER__NAME, oldName, name));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DomPackage.CALL_INPUT_PARAMETER__PARAMETER:
if (resolve) return getParameter();
return basicGetParameter();
case DomPackage.CALL_INPUT_PARAMETER__ATTRIBUTE:
if (resolve) return getAttribute();
return basicGetAttribute();
case DomPackage.CALL_INPUT_PARAMETER__NAME:
return getName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DomPackage.CALL_INPUT_PARAMETER__PARAMETER:
setParameter((QueryParameter)newValue);
return;
case DomPackage.CALL_INPUT_PARAMETER__ATTRIBUTE:
setAttribute((Attribute)newValue);
return;
case DomPackage.CALL_INPUT_PARAMETER__NAME:
setName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DomPackage.CALL_INPUT_PARAMETER__PARAMETER:
setParameter((QueryParameter)null);
return;
case DomPackage.CALL_INPUT_PARAMETER__ATTRIBUTE:
setAttribute((Attribute)null);
return;
case DomPackage.CALL_INPUT_PARAMETER__NAME:
setName(NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DomPackage.CALL_INPUT_PARAMETER__PARAMETER:
return parameter != null;
case DomPackage.CALL_INPUT_PARAMETER__ATTRIBUTE:
return attribute != null;
case DomPackage.CALL_INPUT_PARAMETER__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //CallInputParameterImpl