
BusinessDomainDsl.impl.AbstractBusinessRuleImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mod4j-businessdomain-mm Show documentation
Show all versions of mod4j-businessdomain-mm Show documentation
This Eclipse plug-in project contains the BusinessDomain meta model.
The newest version!
/**
*
*
*
* $Id$
*/
package BusinessDomainDsl.impl;
import BusinessDomainDsl.AbstractBusinessRule;
import BusinessDomainDsl.BusinessClass;
import BusinessDomainDsl.BusinessDomainDslPackage;
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;
/**
*
* An implementation of the model object 'Abstract Business Rule'.
*
*
* The following features are implemented:
*
* - {@link BusinessDomainDsl.impl.AbstractBusinessRuleImpl#getBusinessClass Business Class}
*
*
*
* @generated
*/
public class AbstractBusinessRuleImpl extends ModelElementImpl implements AbstractBusinessRule {
/**
*
*
* @generated
*/
protected AbstractBusinessRuleImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BusinessDomainDslPackage.Literals.ABSTRACT_BUSINESS_RULE;
}
/**
*
*
* @generated
*/
public BusinessClass getBusinessClass() {
if (eContainerFeatureID() != BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS) return null;
return (BusinessClass)eContainer();
}
/**
*
*
* @generated
*/
public NotificationChain basicSetBusinessClass(BusinessClass newBusinessClass, NotificationChain msgs) {
msgs = eBasicSetContainer((InternalEObject)newBusinessClass, BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS, msgs);
return msgs;
}
/**
*
*
* @generated
*/
public void setBusinessClass(BusinessClass newBusinessClass) {
if (newBusinessClass != eInternalContainer() || (eContainerFeatureID() != BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS && newBusinessClass != null)) {
if (EcoreUtil.isAncestor(this, newBusinessClass))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newBusinessClass != null)
msgs = ((InternalEObject)newBusinessClass).eInverseAdd(this, BusinessDomainDslPackage.BUSINESS_CLASS__BUSINESS_RULES, BusinessClass.class, msgs);
msgs = basicSetBusinessClass(newBusinessClass, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS, newBusinessClass, newBusinessClass));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS:
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
return basicSetBusinessClass((BusinessClass)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS:
return basicSetBusinessClass(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
switch (eContainerFeatureID()) {
case BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS:
return eInternalContainer().eInverseRemove(this, BusinessDomainDslPackage.BUSINESS_CLASS__BUSINESS_RULES, BusinessClass.class, msgs);
}
return super.eBasicRemoveFromContainerFeature(msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS:
return getBusinessClass();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS:
setBusinessClass((BusinessClass)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS:
setBusinessClass((BusinessClass)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BusinessDomainDslPackage.ABSTRACT_BUSINESS_RULE__BUSINESS_CLASS:
return getBusinessClass() != null;
}
return super.eIsSet(featureID);
}
} //AbstractBusinessRuleImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy