org.contextmapper.dsl.contextMappingDSL.impl.UseCaseImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of context-mapper-dsl Show documentation
Show all versions of context-mapper-dsl Show documentation
Use the ContextMapper DSL in your standalone application.
/**
* generated by Xtext 2.21.0
*/
package org.contextmapper.dsl.contextMappingDSL.impl;
import org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage;
import org.contextmapper.dsl.contextMappingDSL.UseCase;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Use Case'.
*
*
* The following features are implemented:
*
*
* - {@link org.contextmapper.dsl.contextMappingDSL.impl.UseCaseImpl#getScope Scope}
* - {@link org.contextmapper.dsl.contextMappingDSL.impl.UseCaseImpl#getLevel Level}
*
*
* @generated
*/
public class UseCaseImpl extends UserRequirementImpl implements UseCase
{
/**
* The default value of the '{@link #getScope() Scope}' attribute.
*
*
* @see #getScope()
* @generated
* @ordered
*/
protected static final String SCOPE_EDEFAULT = null;
/**
* The cached value of the '{@link #getScope() Scope}' attribute.
*
*
* @see #getScope()
* @generated
* @ordered
*/
protected String scope = SCOPE_EDEFAULT;
/**
* The default value of the '{@link #getLevel() Level}' attribute.
*
*
* @see #getLevel()
* @generated
* @ordered
*/
protected static final String LEVEL_EDEFAULT = null;
/**
* The cached value of the '{@link #getLevel() Level}' attribute.
*
*
* @see #getLevel()
* @generated
* @ordered
*/
protected String level = LEVEL_EDEFAULT;
/**
*
*
* @generated
*/
protected UseCaseImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ContextMappingDSLPackage.Literals.USE_CASE;
}
/**
*
*
* @generated
*/
@Override
public String getScope()
{
return scope;
}
/**
*
*
* @generated
*/
@Override
public void setScope(String newScope)
{
String oldScope = scope;
scope = newScope;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.USE_CASE__SCOPE, oldScope, scope));
}
/**
*
*
* @generated
*/
@Override
public String getLevel()
{
return level;
}
/**
*
*
* @generated
*/
@Override
public void setLevel(String newLevel)
{
String oldLevel = level;
level = newLevel;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.USE_CASE__LEVEL, oldLevel, level));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ContextMappingDSLPackage.USE_CASE__SCOPE:
return getScope();
case ContextMappingDSLPackage.USE_CASE__LEVEL:
return getLevel();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ContextMappingDSLPackage.USE_CASE__SCOPE:
setScope((String)newValue);
return;
case ContextMappingDSLPackage.USE_CASE__LEVEL:
setLevel((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case ContextMappingDSLPackage.USE_CASE__SCOPE:
setScope(SCOPE_EDEFAULT);
return;
case ContextMappingDSLPackage.USE_CASE__LEVEL:
setLevel(LEVEL_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ContextMappingDSLPackage.USE_CASE__SCOPE:
return SCOPE_EDEFAULT == null ? scope != null : !SCOPE_EDEFAULT.equals(scope);
case ContextMappingDSLPackage.USE_CASE__LEVEL:
return LEVEL_EDEFAULT == null ? level != null : !LEVEL_EDEFAULT.equals(level);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (scope: ");
result.append(scope);
result.append(", level: ");
result.append(level);
result.append(')');
return result.toString();
}
} //UseCaseImpl