org.contextmapper.dsl.contextMappingDSL.impl.RelationshipImpl Maven / Gradle / Ivy
/**
* generated by Xtext 2.20.0
*/
package org.contextmapper.dsl.contextMappingDSL.impl;
import org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage;
import org.contextmapper.dsl.contextMappingDSL.Relationship;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
*
* An implementation of the model object 'Relationship'.
*
*
* The following features are implemented:
*
*
* - {@link org.contextmapper.dsl.contextMappingDSL.impl.RelationshipImpl#getName Name}
* - {@link org.contextmapper.dsl.contextMappingDSL.impl.RelationshipImpl#getImplementationTechnology Implementation Technology}
*
*
* @generated
*/
public class RelationshipImpl extends MinimalEObjectImpl.Container implements Relationship
{
/**
* The default value of the '{@link #getName() Name}' attribute.
*
*
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() Name}' attribute.
*
*
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The default value of the '{@link #getImplementationTechnology() Implementation Technology}' attribute.
*
*
* @see #getImplementationTechnology()
* @generated
* @ordered
*/
protected static final String IMPLEMENTATION_TECHNOLOGY_EDEFAULT = null;
/**
* The cached value of the '{@link #getImplementationTechnology() Implementation Technology}' attribute.
*
*
* @see #getImplementationTechnology()
* @generated
* @ordered
*/
protected String implementationTechnology = IMPLEMENTATION_TECHNOLOGY_EDEFAULT;
/**
*
*
* @generated
*/
protected RelationshipImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ContextMappingDSLPackage.Literals.RELATIONSHIP;
}
/**
*
*
* @generated
*/
public String getName()
{
return name;
}
/**
*
*
* @generated
*/
public void setName(String newName)
{
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.RELATIONSHIP__NAME, oldName, name));
}
/**
*
*
* @generated
*/
public String getImplementationTechnology()
{
return implementationTechnology;
}
/**
*
*
* @generated
*/
public void setImplementationTechnology(String newImplementationTechnology)
{
String oldImplementationTechnology = implementationTechnology;
implementationTechnology = newImplementationTechnology;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.RELATIONSHIP__IMPLEMENTATION_TECHNOLOGY, oldImplementationTechnology, implementationTechnology));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ContextMappingDSLPackage.RELATIONSHIP__NAME:
return getName();
case ContextMappingDSLPackage.RELATIONSHIP__IMPLEMENTATION_TECHNOLOGY:
return getImplementationTechnology();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ContextMappingDSLPackage.RELATIONSHIP__NAME:
setName((String)newValue);
return;
case ContextMappingDSLPackage.RELATIONSHIP__IMPLEMENTATION_TECHNOLOGY:
setImplementationTechnology((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case ContextMappingDSLPackage.RELATIONSHIP__NAME:
setName(NAME_EDEFAULT);
return;
case ContextMappingDSLPackage.RELATIONSHIP__IMPLEMENTATION_TECHNOLOGY:
setImplementationTechnology(IMPLEMENTATION_TECHNOLOGY_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ContextMappingDSLPackage.RELATIONSHIP__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case ContextMappingDSLPackage.RELATIONSHIP__IMPLEMENTATION_TECHNOLOGY:
return IMPLEMENTATION_TECHNOLOGY_EDEFAULT == null ? implementationTechnology != null : !IMPLEMENTATION_TECHNOLOGY_EDEFAULT.equals(implementationTechnology);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
result.append(name);
result.append(", implementationTechnology: ");
result.append(implementationTechnology);
result.append(')');
return result.toString();
}
} //RelationshipImpl