
BusinessDomainDsl.impl.EnumerationPropertyImpl 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.BusinessDomainDslPackage;
import BusinessDomainDsl.Enumeration;
import BusinessDomainDsl.EnumerationProperty;
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;
/**
*
* An implementation of the model object 'Enumeration Property'.
*
*
* The following features are implemented:
*
* - {@link BusinessDomainDsl.impl.EnumerationPropertyImpl#getType Type}
* - {@link BusinessDomainDsl.impl.EnumerationPropertyImpl#getDefaultValueAsString Default Value As String}
*
*
*
* @generated
*/
public class EnumerationPropertyImpl extends PropertyImpl implements EnumerationProperty {
/**
* The cached value of the '{@link #getType() Type}' reference.
*
*
* @see #getType()
* @generated
* @ordered
*/
protected Enumeration type;
/**
* The default value of the '{@link #getDefaultValueAsString() Default Value As String}' attribute.
*
*
* @see #getDefaultValueAsString()
* @generated
* @ordered
*/
protected static final String DEFAULT_VALUE_AS_STRING_EDEFAULT = null;
/**
* The cached value of the '{@link #getDefaultValueAsString() Default Value As String}' attribute.
*
*
* @see #getDefaultValueAsString()
* @generated
* @ordered
*/
protected String defaultValueAsString = DEFAULT_VALUE_AS_STRING_EDEFAULT;
/**
*
*
* @generated
*/
protected EnumerationPropertyImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BusinessDomainDslPackage.Literals.ENUMERATION_PROPERTY;
}
/**
*
*
* @generated
*/
public Enumeration getType() {
if (type != null && type.eIsProxy()) {
InternalEObject oldType = (InternalEObject)type;
type = (Enumeration)eResolveProxy(oldType);
if (type != oldType) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BusinessDomainDslPackage.ENUMERATION_PROPERTY__TYPE, oldType, type));
}
}
return type;
}
/**
*
*
* @generated
*/
public Enumeration basicGetType() {
return type;
}
/**
*
*
* @generated
*/
public void setType(Enumeration newType) {
Enumeration oldType = type;
type = newType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ENUMERATION_PROPERTY__TYPE, oldType, type));
}
/**
*
*
* @generated
*/
public String getDefaultValueAsString() {
return defaultValueAsString;
}
/**
*
*
* @generated
*/
public void setDefaultValueAsString(String newDefaultValueAsString) {
String oldDefaultValueAsString = defaultValueAsString;
defaultValueAsString = newDefaultValueAsString;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ENUMERATION_PROPERTY__DEFAULT_VALUE_AS_STRING, oldDefaultValueAsString, defaultValueAsString));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BusinessDomainDslPackage.ENUMERATION_PROPERTY__TYPE:
if (resolve) return getType();
return basicGetType();
case BusinessDomainDslPackage.ENUMERATION_PROPERTY__DEFAULT_VALUE_AS_STRING:
return getDefaultValueAsString();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BusinessDomainDslPackage.ENUMERATION_PROPERTY__TYPE:
setType((Enumeration)newValue);
return;
case BusinessDomainDslPackage.ENUMERATION_PROPERTY__DEFAULT_VALUE_AS_STRING:
setDefaultValueAsString((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BusinessDomainDslPackage.ENUMERATION_PROPERTY__TYPE:
setType((Enumeration)null);
return;
case BusinessDomainDslPackage.ENUMERATION_PROPERTY__DEFAULT_VALUE_AS_STRING:
setDefaultValueAsString(DEFAULT_VALUE_AS_STRING_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BusinessDomainDslPackage.ENUMERATION_PROPERTY__TYPE:
return type != null;
case BusinessDomainDslPackage.ENUMERATION_PROPERTY__DEFAULT_VALUE_AS_STRING:
return DEFAULT_VALUE_AS_STRING_EDEFAULT == null ? defaultValueAsString != null : !DEFAULT_VALUE_AS_STRING_EDEFAULT.equals(defaultValueAsString);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (defaultValueAsString: ");
result.append(defaultValueAsString);
result.append(')');
return result.toString();
}
} //EnumerationPropertyImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy