org.openxma.dsl.dom.model.impl.QueryParameterValueImpl 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.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.Attribute;
import org.openxma.dsl.dom.model.QueryParameterReference;
import org.openxma.dsl.dom.model.QueryParameterValue;
/**
*
* An implementation of the model object 'Query Parameter Value'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.dom.model.impl.QueryParameterValueImpl#getParameter Parameter}
* - {@link org.openxma.dsl.dom.model.impl.QueryParameterValueImpl#getAttribute Attribute}
*
*
*
* @generated
*/
public class QueryParameterValueImpl extends ExpressionImpl implements QueryParameterValue {
/**
* The cached value of the '{@link #getParameter() Parameter}' reference.
*
*
* @see #getParameter()
* @generated
* @ordered
*/
protected QueryParameterReference parameter;
/**
* The cached value of the '{@link #getAttribute() Attribute}' reference.
*
*
* @see #getAttribute()
* @generated
* @ordered
*/
protected Attribute attribute;
/**
*
*
* @generated
*/
protected QueryParameterValueImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return DomPackage.Literals.QUERY_PARAMETER_VALUE;
}
/**
*
*
* @generated
*/
public QueryParameterReference getParameter() {
if (parameter != null && parameter.eIsProxy()) {
InternalEObject oldParameter = (InternalEObject)parameter;
parameter = (QueryParameterReference)eResolveProxy(oldParameter);
if (parameter != oldParameter) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomPackage.QUERY_PARAMETER_VALUE__PARAMETER, oldParameter, parameter));
}
}
return parameter;
}
/**
*
*
* @generated
*/
public QueryParameterReference basicGetParameter() {
return parameter;
}
/**
*
*
* @generated
*/
public void setParameter(QueryParameterReference newParameter) {
QueryParameterReference oldParameter = parameter;
parameter = newParameter;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.QUERY_PARAMETER_VALUE__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.QUERY_PARAMETER_VALUE__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.QUERY_PARAMETER_VALUE__ATTRIBUTE, oldAttribute, attribute));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DomPackage.QUERY_PARAMETER_VALUE__PARAMETER:
if (resolve) return getParameter();
return basicGetParameter();
case DomPackage.QUERY_PARAMETER_VALUE__ATTRIBUTE:
if (resolve) return getAttribute();
return basicGetAttribute();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DomPackage.QUERY_PARAMETER_VALUE__PARAMETER:
setParameter((QueryParameterReference)newValue);
return;
case DomPackage.QUERY_PARAMETER_VALUE__ATTRIBUTE:
setAttribute((Attribute)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DomPackage.QUERY_PARAMETER_VALUE__PARAMETER:
setParameter((QueryParameterReference)null);
return;
case DomPackage.QUERY_PARAMETER_VALUE__ATTRIBUTE:
setAttribute((Attribute)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DomPackage.QUERY_PARAMETER_VALUE__PARAMETER:
return parameter != null;
case DomPackage.QUERY_PARAMETER_VALUE__ATTRIBUTE:
return attribute != null;
}
return super.eIsSet(featureID);
}
} //QueryParameterValueImpl