org.openxma.dsl.dom.model.impl.DaoFeatureImpl 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.DaoFeature;
/**
*
* An implementation of the model object 'Dao Feature'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.dom.model.impl.DaoFeatureImpl#getAttribute Attribute}
*
*
*
* @generated
*/
public abstract class DaoFeatureImpl extends MinimalEObjectImpl.Container implements DaoFeature {
/**
* The cached value of the '{@link #getAttribute() Attribute}' reference.
*
*
* @see #getAttribute()
* @generated
* @ordered
*/
protected Attribute attribute;
/**
*
*
* @generated
*/
protected DaoFeatureImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return DomPackage.Literals.DAO_FEATURE;
}
/**
*
*
* @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.DAO_FEATURE__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.DAO_FEATURE__ATTRIBUTE, oldAttribute, attribute));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DomPackage.DAO_FEATURE__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.DAO_FEATURE__ATTRIBUTE:
setAttribute((Attribute)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DomPackage.DAO_FEATURE__ATTRIBUTE:
setAttribute((Attribute)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DomPackage.DAO_FEATURE__ATTRIBUTE:
return attribute != null;
}
return super.eIsSet(featureID);
}
} //DaoFeatureImpl