org.contextmapper.tactic.dsl.tacticdsl.impl.EntityImpl Maven / Gradle / Ivy
/**
* generated by Xtext 2.20.0
*/
package org.contextmapper.tactic.dsl.tacticdsl.impl;
import org.contextmapper.tactic.dsl.tacticdsl.Entity;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;
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 'Entity'.
*
*
* The following features are implemented:
*
*
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EntityImpl#getExtends Extends}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EntityImpl#isNotOptimisticLocking Not Optimistic Locking}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EntityImpl#isNotAuditable Not Auditable}
*
*
* @generated
*/
public class EntityImpl extends DomainObjectImpl implements Entity
{
/**
* The cached value of the '{@link #getExtends() Extends}' reference.
*
*
* @see #getExtends()
* @generated
* @ordered
*/
protected Entity extends_;
/**
* The default value of the '{@link #isNotOptimisticLocking() Not Optimistic Locking}' attribute.
*
*
* @see #isNotOptimisticLocking()
* @generated
* @ordered
*/
protected static final boolean NOT_OPTIMISTIC_LOCKING_EDEFAULT = false;
/**
* The cached value of the '{@link #isNotOptimisticLocking() Not Optimistic Locking}' attribute.
*
*
* @see #isNotOptimisticLocking()
* @generated
* @ordered
*/
protected boolean notOptimisticLocking = NOT_OPTIMISTIC_LOCKING_EDEFAULT;
/**
* The default value of the '{@link #isNotAuditable() Not Auditable}' attribute.
*
*
* @see #isNotAuditable()
* @generated
* @ordered
*/
protected static final boolean NOT_AUDITABLE_EDEFAULT = false;
/**
* The cached value of the '{@link #isNotAuditable() Not Auditable}' attribute.
*
*
* @see #isNotAuditable()
* @generated
* @ordered
*/
protected boolean notAuditable = NOT_AUDITABLE_EDEFAULT;
/**
*
*
* @generated
*/
protected EntityImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return TacticdslPackage.Literals.ENTITY;
}
/**
*
*
* @generated
*/
public Entity getExtends()
{
if (extends_ != null && extends_.eIsProxy())
{
InternalEObject oldExtends = (InternalEObject)extends_;
extends_ = (Entity)eResolveProxy(oldExtends);
if (extends_ != oldExtends)
{
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.ENTITY__EXTENDS, oldExtends, extends_));
}
}
return extends_;
}
/**
*
*
* @generated
*/
public Entity basicGetExtends()
{
return extends_;
}
/**
*
*
* @generated
*/
public void setExtends(Entity newExtends)
{
Entity oldExtends = extends_;
extends_ = newExtends;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENTITY__EXTENDS, oldExtends, extends_));
}
/**
*
*
* @generated
*/
public boolean isNotOptimisticLocking()
{
return notOptimisticLocking;
}
/**
*
*
* @generated
*/
public void setNotOptimisticLocking(boolean newNotOptimisticLocking)
{
boolean oldNotOptimisticLocking = notOptimisticLocking;
notOptimisticLocking = newNotOptimisticLocking;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENTITY__NOT_OPTIMISTIC_LOCKING, oldNotOptimisticLocking, notOptimisticLocking));
}
/**
*
*
* @generated
*/
public boolean isNotAuditable()
{
return notAuditable;
}
/**
*
*
* @generated
*/
public void setNotAuditable(boolean newNotAuditable)
{
boolean oldNotAuditable = notAuditable;
notAuditable = newNotAuditable;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENTITY__NOT_AUDITABLE, oldNotAuditable, notAuditable));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case TacticdslPackage.ENTITY__EXTENDS:
if (resolve) return getExtends();
return basicGetExtends();
case TacticdslPackage.ENTITY__NOT_OPTIMISTIC_LOCKING:
return isNotOptimisticLocking();
case TacticdslPackage.ENTITY__NOT_AUDITABLE:
return isNotAuditable();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case TacticdslPackage.ENTITY__EXTENDS:
setExtends((Entity)newValue);
return;
case TacticdslPackage.ENTITY__NOT_OPTIMISTIC_LOCKING:
setNotOptimisticLocking((Boolean)newValue);
return;
case TacticdslPackage.ENTITY__NOT_AUDITABLE:
setNotAuditable((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case TacticdslPackage.ENTITY__EXTENDS:
setExtends((Entity)null);
return;
case TacticdslPackage.ENTITY__NOT_OPTIMISTIC_LOCKING:
setNotOptimisticLocking(NOT_OPTIMISTIC_LOCKING_EDEFAULT);
return;
case TacticdslPackage.ENTITY__NOT_AUDITABLE:
setNotAuditable(NOT_AUDITABLE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case TacticdslPackage.ENTITY__EXTENDS:
return extends_ != null;
case TacticdslPackage.ENTITY__NOT_OPTIMISTIC_LOCKING:
return notOptimisticLocking != NOT_OPTIMISTIC_LOCKING_EDEFAULT;
case TacticdslPackage.ENTITY__NOT_AUDITABLE:
return notAuditable != NOT_AUDITABLE_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (notOptimisticLocking: ");
result.append(notOptimisticLocking);
result.append(", notAuditable: ");
result.append(notAuditable);
result.append(')');
return result.toString();
}
} //EntityImpl