All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sculptormetamodel.impl.DomainObjectOperationImpl Maven / Gradle / Ivy

/**
 */
package sculptormetamodel.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.eclipse.emf.ecore.util.EcoreUtil;

import sculptormetamodel.DomainObject;
import sculptormetamodel.DomainObjectOperation;
import sculptormetamodel.SculptormetamodelPackage;

/**
 * 
 * An implementation of the model object 'Domain Object Operation'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link sculptormetamodel.impl.DomainObjectOperationImpl#getDomainObject Domain Object}
  • *
  • {@link sculptormetamodel.impl.DomainObjectOperationImpl#isAbstract Abstract}
  • *
*

* * @generated */ public class DomainObjectOperationImpl extends OperationImpl implements DomainObjectOperation { /** * The default value of the '{@link #isAbstract() Abstract}' attribute. * * * @see #isAbstract() * @generated * @ordered */ protected static final boolean ABSTRACT_EDEFAULT = false; /** * The cached value of the '{@link #isAbstract() Abstract}' attribute. * * * @see #isAbstract() * @generated * @ordered */ protected boolean abstract_ = ABSTRACT_EDEFAULT; /** * * * @generated */ protected DomainObjectOperationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SculptormetamodelPackage.Literals.DOMAIN_OBJECT_OPERATION; } /** * * * @generated */ public DomainObject getDomainObject() { if (eContainerFeatureID() != SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT) return null; return (DomainObject)eInternalContainer(); } /** * * * @generated */ public NotificationChain basicSetDomainObject(DomainObject newDomainObject, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject)newDomainObject, SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT, msgs); return msgs; } /** * * * @generated */ public void setDomainObject(DomainObject newDomainObject) { if (newDomainObject != eInternalContainer() || (eContainerFeatureID() != SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT && newDomainObject != null)) { if (EcoreUtil.isAncestor(this, newDomainObject)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newDomainObject != null) msgs = ((InternalEObject)newDomainObject).eInverseAdd(this, SculptormetamodelPackage.DOMAIN_OBJECT__OPERATIONS, DomainObject.class, msgs); msgs = basicSetDomainObject(newDomainObject, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT, newDomainObject, newDomainObject)); } /** * * * @generated */ public boolean isAbstract() { return abstract_; } /** * * * @generated */ public void setAbstract(boolean newAbstract) { boolean oldAbstract = abstract_; abstract_ = newAbstract; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__ABSTRACT, oldAbstract, abstract_)); } /** * * * @generated */ @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetDomainObject((DomainObject)otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT: return basicSetDomainObject(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { switch (eContainerFeatureID()) { case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT: return eInternalContainer().eInverseRemove(this, SculptormetamodelPackage.DOMAIN_OBJECT__OPERATIONS, DomainObject.class, msgs); } return super.eBasicRemoveFromContainerFeature(msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT: return getDomainObject(); case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__ABSTRACT: return isAbstract(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT: setDomainObject((DomainObject)newValue); return; case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__ABSTRACT: setAbstract((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT: setDomainObject((DomainObject)null); return; case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__ABSTRACT: setAbstract(ABSTRACT_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__DOMAIN_OBJECT: return getDomainObject() != null; case SculptormetamodelPackage.DOMAIN_OBJECT_OPERATION__ABSTRACT: return abstract_ != ABSTRACT_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (abstract: "); result.append(abstract_); result.append(')'); return result.toString(); } } //DomainObjectOperationImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy