org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl Maven / Gradle / Ivy
/**
* generated by Xtext 2.21.0
*/
package org.contextmapper.tactic.dsl.tacticdsl.impl;
import java.util.Collection;
import org.contextmapper.tactic.dsl.tacticdsl.Attribute;
import org.contextmapper.tactic.dsl.tacticdsl.DiscriminatorType;
import org.contextmapper.tactic.dsl.tacticdsl.DomainObject;
import org.contextmapper.tactic.dsl.tacticdsl.DomainObjectOperation;
import org.contextmapper.tactic.dsl.tacticdsl.InheritanceType;
import org.contextmapper.tactic.dsl.tacticdsl.Reference;
import org.contextmapper.tactic.dsl.tacticdsl.Repository;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;
import org.contextmapper.tactic.dsl.tacticdsl.Trait;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Domain Object'.
*
*
* The following features are implemented:
*
*
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getComment Comment}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#isAbstract Abstract}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getExtendsName Extends Name}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getTraits Traits}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#isCache Cache}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#isGapClass Gap Class}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#isNoGapClass No Gap Class}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#isScaffold Scaffold}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getDatabaseTable Database Table}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getDiscriminatorValue Discriminator Value}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getDiscriminatorColumn Discriminator Column}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getDiscriminatorType Discriminator Type}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getDiscriminatorLength Discriminator Length}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getInheritanceType Inheritance Type}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getValidate Validate}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#isAggregateRoot Aggregate Root}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getBelongsTo Belongs To}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getAttributes Attributes}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getReferences References}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getOperations Operations}
* - {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DomainObjectImpl#getRepository Repository}
*
*
* @generated
*/
public class DomainObjectImpl extends SimpleDomainObjectImpl implements DomainObject
{
/**
* The default value of the '{@link #getComment() Comment}' attribute.
*
*
* @see #getComment()
* @generated
* @ordered
*/
protected static final String COMMENT_EDEFAULT = null;
/**
* The cached value of the '{@link #getComment() Comment}' attribute.
*
*
* @see #getComment()
* @generated
* @ordered
*/
protected String comment = COMMENT_EDEFAULT;
/**
* The default value of the '{@link #isAbstract() Abstract}' attribute.
*
*
* @see #isAbstract()
* @generated
* @ordered
*/
protected static final boolean ABSTRACT_EDEFAULT = false;
/**
* The cached value of the '{@link #isAbstract() Abstract}' attribute.
*
*
* @see #isAbstract()
* @generated
* @ordered
*/
protected boolean abstract_ = ABSTRACT_EDEFAULT;
/**
* The default value of the '{@link #getExtendsName() Extends Name}' attribute.
*
*
* @see #getExtendsName()
* @generated
* @ordered
*/
protected static final String EXTENDS_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getExtendsName() Extends Name}' attribute.
*
*
* @see #getExtendsName()
* @generated
* @ordered
*/
protected String extendsName = EXTENDS_NAME_EDEFAULT;
/**
* The cached value of the '{@link #getTraits() Traits}' reference list.
*
*
* @see #getTraits()
* @generated
* @ordered
*/
protected EList traits;
/**
* The default value of the '{@link #isCache() Cache}' attribute.
*
*
* @see #isCache()
* @generated
* @ordered
*/
protected static final boolean CACHE_EDEFAULT = false;
/**
* The cached value of the '{@link #isCache() Cache}' attribute.
*
*
* @see #isCache()
* @generated
* @ordered
*/
protected boolean cache = CACHE_EDEFAULT;
/**
* The default value of the '{@link #isGapClass() Gap Class}' attribute.
*
*
* @see #isGapClass()
* @generated
* @ordered
*/
protected static final boolean GAP_CLASS_EDEFAULT = false;
/**
* The cached value of the '{@link #isGapClass() Gap Class}' attribute.
*
*
* @see #isGapClass()
* @generated
* @ordered
*/
protected boolean gapClass = GAP_CLASS_EDEFAULT;
/**
* The default value of the '{@link #isNoGapClass() No Gap Class}' attribute.
*
*
* @see #isNoGapClass()
* @generated
* @ordered
*/
protected static final boolean NO_GAP_CLASS_EDEFAULT = false;
/**
* The cached value of the '{@link #isNoGapClass() No Gap Class}' attribute.
*
*
* @see #isNoGapClass()
* @generated
* @ordered
*/
protected boolean noGapClass = NO_GAP_CLASS_EDEFAULT;
/**
* The default value of the '{@link #isScaffold() Scaffold}' attribute.
*
*
* @see #isScaffold()
* @generated
* @ordered
*/
protected static final boolean SCAFFOLD_EDEFAULT = false;
/**
* The cached value of the '{@link #isScaffold() Scaffold}' attribute.
*
*
* @see #isScaffold()
* @generated
* @ordered
*/
protected boolean scaffold = SCAFFOLD_EDEFAULT;
/**
* The default value of the '{@link #getDatabaseTable() Database Table}' attribute.
*
*
* @see #getDatabaseTable()
* @generated
* @ordered
*/
protected static final String DATABASE_TABLE_EDEFAULT = null;
/**
* The cached value of the '{@link #getDatabaseTable() Database Table}' attribute.
*
*
* @see #getDatabaseTable()
* @generated
* @ordered
*/
protected String databaseTable = DATABASE_TABLE_EDEFAULT;
/**
* The default value of the '{@link #getDiscriminatorValue() Discriminator Value}' attribute.
*
*
* @see #getDiscriminatorValue()
* @generated
* @ordered
*/
protected static final String DISCRIMINATOR_VALUE_EDEFAULT = null;
/**
* The cached value of the '{@link #getDiscriminatorValue() Discriminator Value}' attribute.
*
*
* @see #getDiscriminatorValue()
* @generated
* @ordered
*/
protected String discriminatorValue = DISCRIMINATOR_VALUE_EDEFAULT;
/**
* The default value of the '{@link #getDiscriminatorColumn() Discriminator Column}' attribute.
*
*
* @see #getDiscriminatorColumn()
* @generated
* @ordered
*/
protected static final String DISCRIMINATOR_COLUMN_EDEFAULT = null;
/**
* The cached value of the '{@link #getDiscriminatorColumn() Discriminator Column}' attribute.
*
*
* @see #getDiscriminatorColumn()
* @generated
* @ordered
*/
protected String discriminatorColumn = DISCRIMINATOR_COLUMN_EDEFAULT;
/**
* The default value of the '{@link #getDiscriminatorType() Discriminator Type}' attribute.
*
*
* @see #getDiscriminatorType()
* @generated
* @ordered
*/
protected static final DiscriminatorType DISCRIMINATOR_TYPE_EDEFAULT = DiscriminatorType.STRING;
/**
* The cached value of the '{@link #getDiscriminatorType() Discriminator Type}' attribute.
*
*
* @see #getDiscriminatorType()
* @generated
* @ordered
*/
protected DiscriminatorType discriminatorType = DISCRIMINATOR_TYPE_EDEFAULT;
/**
* The default value of the '{@link #getDiscriminatorLength() Discriminator Length}' attribute.
*
*
* @see #getDiscriminatorLength()
* @generated
* @ordered
*/
protected static final String DISCRIMINATOR_LENGTH_EDEFAULT = null;
/**
* The cached value of the '{@link #getDiscriminatorLength() Discriminator Length}' attribute.
*
*
* @see #getDiscriminatorLength()
* @generated
* @ordered
*/
protected String discriminatorLength = DISCRIMINATOR_LENGTH_EDEFAULT;
/**
* The default value of the '{@link #getInheritanceType() Inheritance Type}' attribute.
*
*
* @see #getInheritanceType()
* @generated
* @ordered
*/
protected static final InheritanceType INHERITANCE_TYPE_EDEFAULT = InheritanceType.JOINED;
/**
* The cached value of the '{@link #getInheritanceType() Inheritance Type}' attribute.
*
*
* @see #getInheritanceType()
* @generated
* @ordered
*/
protected InheritanceType inheritanceType = INHERITANCE_TYPE_EDEFAULT;
/**
* The default value of the '{@link #getValidate() Validate}' attribute.
*
*
* @see #getValidate()
* @generated
* @ordered
*/
protected static final String VALIDATE_EDEFAULT = null;
/**
* The cached value of the '{@link #getValidate() Validate}' attribute.
*
*
* @see #getValidate()
* @generated
* @ordered
*/
protected String validate = VALIDATE_EDEFAULT;
/**
* The default value of the '{@link #isAggregateRoot() Aggregate Root}' attribute.
*
*
* @see #isAggregateRoot()
* @generated
* @ordered
*/
protected static final boolean AGGREGATE_ROOT_EDEFAULT = false;
/**
* The cached value of the '{@link #isAggregateRoot() Aggregate Root}' attribute.
*
*
* @see #isAggregateRoot()
* @generated
* @ordered
*/
protected boolean aggregateRoot = AGGREGATE_ROOT_EDEFAULT;
/**
* The cached value of the '{@link #getBelongsTo() Belongs To}' reference.
*
*
* @see #getBelongsTo()
* @generated
* @ordered
*/
protected DomainObject belongsTo;
/**
* The cached value of the '{@link #getAttributes() Attributes}' containment reference list.
*
*
* @see #getAttributes()
* @generated
* @ordered
*/
protected EList attributes;
/**
* The cached value of the '{@link #getReferences() References}' containment reference list.
*
*
* @see #getReferences()
* @generated
* @ordered
*/
protected EList references;
/**
* The cached value of the '{@link #getOperations() Operations}' containment reference list.
*
*
* @see #getOperations()
* @generated
* @ordered
*/
protected EList operations;
/**
* The cached value of the '{@link #getRepository() Repository}' containment reference.
*
*
* @see #getRepository()
* @generated
* @ordered
*/
protected Repository repository;
/**
*
*
* @generated
*/
protected DomainObjectImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return TacticdslPackage.Literals.DOMAIN_OBJECT;
}
/**
*
*
* @generated
*/
@Override
public String getComment()
{
return comment;
}
/**
*
*
* @generated
*/
@Override
public void setComment(String newComment)
{
String oldComment = comment;
comment = newComment;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__COMMENT, oldComment, comment));
}
/**
*
*
* @generated
*/
@Override
public boolean isAbstract()
{
return abstract_;
}
/**
*
*
* @generated
*/
@Override
public void setAbstract(boolean newAbstract)
{
boolean oldAbstract = abstract_;
abstract_ = newAbstract;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__ABSTRACT, oldAbstract, abstract_));
}
/**
*
*
* @generated
*/
@Override
public String getExtendsName()
{
return extendsName;
}
/**
*
*
* @generated
*/
@Override
public void setExtendsName(String newExtendsName)
{
String oldExtendsName = extendsName;
extendsName = newExtendsName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__EXTENDS_NAME, oldExtendsName, extendsName));
}
/**
*
*
* @generated
*/
@Override
public EList getTraits()
{
if (traits == null)
{
traits = new EObjectResolvingEList(Trait.class, this, TacticdslPackage.DOMAIN_OBJECT__TRAITS);
}
return traits;
}
/**
*
*
* @generated
*/
@Override
public boolean isCache()
{
return cache;
}
/**
*
*
* @generated
*/
@Override
public void setCache(boolean newCache)
{
boolean oldCache = cache;
cache = newCache;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__CACHE, oldCache, cache));
}
/**
*
*
* @generated
*/
@Override
public boolean isGapClass()
{
return gapClass;
}
/**
*
*
* @generated
*/
@Override
public void setGapClass(boolean newGapClass)
{
boolean oldGapClass = gapClass;
gapClass = newGapClass;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__GAP_CLASS, oldGapClass, gapClass));
}
/**
*
*
* @generated
*/
@Override
public boolean isNoGapClass()
{
return noGapClass;
}
/**
*
*
* @generated
*/
@Override
public void setNoGapClass(boolean newNoGapClass)
{
boolean oldNoGapClass = noGapClass;
noGapClass = newNoGapClass;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__NO_GAP_CLASS, oldNoGapClass, noGapClass));
}
/**
*
*
* @generated
*/
@Override
public boolean isScaffold()
{
return scaffold;
}
/**
*
*
* @generated
*/
@Override
public void setScaffold(boolean newScaffold)
{
boolean oldScaffold = scaffold;
scaffold = newScaffold;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__SCAFFOLD, oldScaffold, scaffold));
}
/**
*
*
* @generated
*/
@Override
public String getDatabaseTable()
{
return databaseTable;
}
/**
*
*
* @generated
*/
@Override
public void setDatabaseTable(String newDatabaseTable)
{
String oldDatabaseTable = databaseTable;
databaseTable = newDatabaseTable;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__DATABASE_TABLE, oldDatabaseTable, databaseTable));
}
/**
*
*
* @generated
*/
@Override
public String getDiscriminatorValue()
{
return discriminatorValue;
}
/**
*
*
* @generated
*/
@Override
public void setDiscriminatorValue(String newDiscriminatorValue)
{
String oldDiscriminatorValue = discriminatorValue;
discriminatorValue = newDiscriminatorValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_VALUE, oldDiscriminatorValue, discriminatorValue));
}
/**
*
*
* @generated
*/
@Override
public String getDiscriminatorColumn()
{
return discriminatorColumn;
}
/**
*
*
* @generated
*/
@Override
public void setDiscriminatorColumn(String newDiscriminatorColumn)
{
String oldDiscriminatorColumn = discriminatorColumn;
discriminatorColumn = newDiscriminatorColumn;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_COLUMN, oldDiscriminatorColumn, discriminatorColumn));
}
/**
*
*
* @generated
*/
@Override
public DiscriminatorType getDiscriminatorType()
{
return discriminatorType;
}
/**
*
*
* @generated
*/
@Override
public void setDiscriminatorType(DiscriminatorType newDiscriminatorType)
{
DiscriminatorType oldDiscriminatorType = discriminatorType;
discriminatorType = newDiscriminatorType == null ? DISCRIMINATOR_TYPE_EDEFAULT : newDiscriminatorType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_TYPE, oldDiscriminatorType, discriminatorType));
}
/**
*
*
* @generated
*/
@Override
public String getDiscriminatorLength()
{
return discriminatorLength;
}
/**
*
*
* @generated
*/
@Override
public void setDiscriminatorLength(String newDiscriminatorLength)
{
String oldDiscriminatorLength = discriminatorLength;
discriminatorLength = newDiscriminatorLength;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_LENGTH, oldDiscriminatorLength, discriminatorLength));
}
/**
*
*
* @generated
*/
@Override
public InheritanceType getInheritanceType()
{
return inheritanceType;
}
/**
*
*
* @generated
*/
@Override
public void setInheritanceType(InheritanceType newInheritanceType)
{
InheritanceType oldInheritanceType = inheritanceType;
inheritanceType = newInheritanceType == null ? INHERITANCE_TYPE_EDEFAULT : newInheritanceType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__INHERITANCE_TYPE, oldInheritanceType, inheritanceType));
}
/**
*
*
* @generated
*/
@Override
public String getValidate()
{
return validate;
}
/**
*
*
* @generated
*/
@Override
public void setValidate(String newValidate)
{
String oldValidate = validate;
validate = newValidate;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__VALIDATE, oldValidate, validate));
}
/**
*
*
* @generated
*/
@Override
public boolean isAggregateRoot()
{
return aggregateRoot;
}
/**
*
*
* @generated
*/
@Override
public void setAggregateRoot(boolean newAggregateRoot)
{
boolean oldAggregateRoot = aggregateRoot;
aggregateRoot = newAggregateRoot;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__AGGREGATE_ROOT, oldAggregateRoot, aggregateRoot));
}
/**
*
*
* @generated
*/
@Override
public DomainObject getBelongsTo()
{
if (belongsTo != null && belongsTo.eIsProxy())
{
InternalEObject oldBelongsTo = (InternalEObject)belongsTo;
belongsTo = (DomainObject)eResolveProxy(oldBelongsTo);
if (belongsTo != oldBelongsTo)
{
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.DOMAIN_OBJECT__BELONGS_TO, oldBelongsTo, belongsTo));
}
}
return belongsTo;
}
/**
*
*
* @generated
*/
public DomainObject basicGetBelongsTo()
{
return belongsTo;
}
/**
*
*
* @generated
*/
@Override
public void setBelongsTo(DomainObject newBelongsTo)
{
DomainObject oldBelongsTo = belongsTo;
belongsTo = newBelongsTo;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__BELONGS_TO, oldBelongsTo, belongsTo));
}
/**
*
*
* @generated
*/
@Override
public EList getAttributes()
{
if (attributes == null)
{
attributes = new EObjectContainmentEList(Attribute.class, this, TacticdslPackage.DOMAIN_OBJECT__ATTRIBUTES);
}
return attributes;
}
/**
*
*
* @generated
*/
@Override
public EList getReferences()
{
if (references == null)
{
references = new EObjectContainmentEList(Reference.class, this, TacticdslPackage.DOMAIN_OBJECT__REFERENCES);
}
return references;
}
/**
*
*
* @generated
*/
@Override
public EList getOperations()
{
if (operations == null)
{
operations = new EObjectContainmentEList(DomainObjectOperation.class, this, TacticdslPackage.DOMAIN_OBJECT__OPERATIONS);
}
return operations;
}
/**
*
*
* @generated
*/
@Override
public Repository getRepository()
{
return repository;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetRepository(Repository newRepository, NotificationChain msgs)
{
Repository oldRepository = repository;
repository = newRepository;
if (eNotificationRequired())
{
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__REPOSITORY, oldRepository, newRepository);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
*
*
* @generated
*/
@Override
public void setRepository(Repository newRepository)
{
if (newRepository != repository)
{
NotificationChain msgs = null;
if (repository != null)
msgs = ((InternalEObject)repository).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.DOMAIN_OBJECT__REPOSITORY, null, msgs);
if (newRepository != null)
msgs = ((InternalEObject)newRepository).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TacticdslPackage.DOMAIN_OBJECT__REPOSITORY, null, msgs);
msgs = basicSetRepository(newRepository, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DOMAIN_OBJECT__REPOSITORY, newRepository, newRepository));
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case TacticdslPackage.DOMAIN_OBJECT__ATTRIBUTES:
return ((InternalEList>)getAttributes()).basicRemove(otherEnd, msgs);
case TacticdslPackage.DOMAIN_OBJECT__REFERENCES:
return ((InternalEList>)getReferences()).basicRemove(otherEnd, msgs);
case TacticdslPackage.DOMAIN_OBJECT__OPERATIONS:
return ((InternalEList>)getOperations()).basicRemove(otherEnd, msgs);
case TacticdslPackage.DOMAIN_OBJECT__REPOSITORY:
return basicSetRepository(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case TacticdslPackage.DOMAIN_OBJECT__COMMENT:
return getComment();
case TacticdslPackage.DOMAIN_OBJECT__ABSTRACT:
return isAbstract();
case TacticdslPackage.DOMAIN_OBJECT__EXTENDS_NAME:
return getExtendsName();
case TacticdslPackage.DOMAIN_OBJECT__TRAITS:
return getTraits();
case TacticdslPackage.DOMAIN_OBJECT__CACHE:
return isCache();
case TacticdslPackage.DOMAIN_OBJECT__GAP_CLASS:
return isGapClass();
case TacticdslPackage.DOMAIN_OBJECT__NO_GAP_CLASS:
return isNoGapClass();
case TacticdslPackage.DOMAIN_OBJECT__SCAFFOLD:
return isScaffold();
case TacticdslPackage.DOMAIN_OBJECT__DATABASE_TABLE:
return getDatabaseTable();
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_VALUE:
return getDiscriminatorValue();
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_COLUMN:
return getDiscriminatorColumn();
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_TYPE:
return getDiscriminatorType();
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_LENGTH:
return getDiscriminatorLength();
case TacticdslPackage.DOMAIN_OBJECT__INHERITANCE_TYPE:
return getInheritanceType();
case TacticdslPackage.DOMAIN_OBJECT__VALIDATE:
return getValidate();
case TacticdslPackage.DOMAIN_OBJECT__AGGREGATE_ROOT:
return isAggregateRoot();
case TacticdslPackage.DOMAIN_OBJECT__BELONGS_TO:
if (resolve) return getBelongsTo();
return basicGetBelongsTo();
case TacticdslPackage.DOMAIN_OBJECT__ATTRIBUTES:
return getAttributes();
case TacticdslPackage.DOMAIN_OBJECT__REFERENCES:
return getReferences();
case TacticdslPackage.DOMAIN_OBJECT__OPERATIONS:
return getOperations();
case TacticdslPackage.DOMAIN_OBJECT__REPOSITORY:
return getRepository();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case TacticdslPackage.DOMAIN_OBJECT__COMMENT:
setComment((String)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__ABSTRACT:
setAbstract((Boolean)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__EXTENDS_NAME:
setExtendsName((String)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__TRAITS:
getTraits().clear();
getTraits().addAll((Collection extends Trait>)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__CACHE:
setCache((Boolean)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__GAP_CLASS:
setGapClass((Boolean)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__NO_GAP_CLASS:
setNoGapClass((Boolean)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__SCAFFOLD:
setScaffold((Boolean)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__DATABASE_TABLE:
setDatabaseTable((String)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_VALUE:
setDiscriminatorValue((String)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_COLUMN:
setDiscriminatorColumn((String)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_TYPE:
setDiscriminatorType((DiscriminatorType)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_LENGTH:
setDiscriminatorLength((String)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__INHERITANCE_TYPE:
setInheritanceType((InheritanceType)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__VALIDATE:
setValidate((String)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__AGGREGATE_ROOT:
setAggregateRoot((Boolean)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__BELONGS_TO:
setBelongsTo((DomainObject)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__ATTRIBUTES:
getAttributes().clear();
getAttributes().addAll((Collection extends Attribute>)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__REFERENCES:
getReferences().clear();
getReferences().addAll((Collection extends Reference>)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__OPERATIONS:
getOperations().clear();
getOperations().addAll((Collection extends DomainObjectOperation>)newValue);
return;
case TacticdslPackage.DOMAIN_OBJECT__REPOSITORY:
setRepository((Repository)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case TacticdslPackage.DOMAIN_OBJECT__COMMENT:
setComment(COMMENT_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__ABSTRACT:
setAbstract(ABSTRACT_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__EXTENDS_NAME:
setExtendsName(EXTENDS_NAME_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__TRAITS:
getTraits().clear();
return;
case TacticdslPackage.DOMAIN_OBJECT__CACHE:
setCache(CACHE_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__GAP_CLASS:
setGapClass(GAP_CLASS_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__NO_GAP_CLASS:
setNoGapClass(NO_GAP_CLASS_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__SCAFFOLD:
setScaffold(SCAFFOLD_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__DATABASE_TABLE:
setDatabaseTable(DATABASE_TABLE_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_VALUE:
setDiscriminatorValue(DISCRIMINATOR_VALUE_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_COLUMN:
setDiscriminatorColumn(DISCRIMINATOR_COLUMN_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_TYPE:
setDiscriminatorType(DISCRIMINATOR_TYPE_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_LENGTH:
setDiscriminatorLength(DISCRIMINATOR_LENGTH_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__INHERITANCE_TYPE:
setInheritanceType(INHERITANCE_TYPE_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__VALIDATE:
setValidate(VALIDATE_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__AGGREGATE_ROOT:
setAggregateRoot(AGGREGATE_ROOT_EDEFAULT);
return;
case TacticdslPackage.DOMAIN_OBJECT__BELONGS_TO:
setBelongsTo((DomainObject)null);
return;
case TacticdslPackage.DOMAIN_OBJECT__ATTRIBUTES:
getAttributes().clear();
return;
case TacticdslPackage.DOMAIN_OBJECT__REFERENCES:
getReferences().clear();
return;
case TacticdslPackage.DOMAIN_OBJECT__OPERATIONS:
getOperations().clear();
return;
case TacticdslPackage.DOMAIN_OBJECT__REPOSITORY:
setRepository((Repository)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case TacticdslPackage.DOMAIN_OBJECT__COMMENT:
return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment);
case TacticdslPackage.DOMAIN_OBJECT__ABSTRACT:
return abstract_ != ABSTRACT_EDEFAULT;
case TacticdslPackage.DOMAIN_OBJECT__EXTENDS_NAME:
return EXTENDS_NAME_EDEFAULT == null ? extendsName != null : !EXTENDS_NAME_EDEFAULT.equals(extendsName);
case TacticdslPackage.DOMAIN_OBJECT__TRAITS:
return traits != null && !traits.isEmpty();
case TacticdslPackage.DOMAIN_OBJECT__CACHE:
return cache != CACHE_EDEFAULT;
case TacticdslPackage.DOMAIN_OBJECT__GAP_CLASS:
return gapClass != GAP_CLASS_EDEFAULT;
case TacticdslPackage.DOMAIN_OBJECT__NO_GAP_CLASS:
return noGapClass != NO_GAP_CLASS_EDEFAULT;
case TacticdslPackage.DOMAIN_OBJECT__SCAFFOLD:
return scaffold != SCAFFOLD_EDEFAULT;
case TacticdslPackage.DOMAIN_OBJECT__DATABASE_TABLE:
return DATABASE_TABLE_EDEFAULT == null ? databaseTable != null : !DATABASE_TABLE_EDEFAULT.equals(databaseTable);
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_VALUE:
return DISCRIMINATOR_VALUE_EDEFAULT == null ? discriminatorValue != null : !DISCRIMINATOR_VALUE_EDEFAULT.equals(discriminatorValue);
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_COLUMN:
return DISCRIMINATOR_COLUMN_EDEFAULT == null ? discriminatorColumn != null : !DISCRIMINATOR_COLUMN_EDEFAULT.equals(discriminatorColumn);
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_TYPE:
return discriminatorType != DISCRIMINATOR_TYPE_EDEFAULT;
case TacticdslPackage.DOMAIN_OBJECT__DISCRIMINATOR_LENGTH:
return DISCRIMINATOR_LENGTH_EDEFAULT == null ? discriminatorLength != null : !DISCRIMINATOR_LENGTH_EDEFAULT.equals(discriminatorLength);
case TacticdslPackage.DOMAIN_OBJECT__INHERITANCE_TYPE:
return inheritanceType != INHERITANCE_TYPE_EDEFAULT;
case TacticdslPackage.DOMAIN_OBJECT__VALIDATE:
return VALIDATE_EDEFAULT == null ? validate != null : !VALIDATE_EDEFAULT.equals(validate);
case TacticdslPackage.DOMAIN_OBJECT__AGGREGATE_ROOT:
return aggregateRoot != AGGREGATE_ROOT_EDEFAULT;
case TacticdslPackage.DOMAIN_OBJECT__BELONGS_TO:
return belongsTo != null;
case TacticdslPackage.DOMAIN_OBJECT__ATTRIBUTES:
return attributes != null && !attributes.isEmpty();
case TacticdslPackage.DOMAIN_OBJECT__REFERENCES:
return references != null && !references.isEmpty();
case TacticdslPackage.DOMAIN_OBJECT__OPERATIONS:
return operations != null && !operations.isEmpty();
case TacticdslPackage.DOMAIN_OBJECT__REPOSITORY:
return repository != null;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (comment: ");
result.append(comment);
result.append(", abstract: ");
result.append(abstract_);
result.append(", extendsName: ");
result.append(extendsName);
result.append(", cache: ");
result.append(cache);
result.append(", gapClass: ");
result.append(gapClass);
result.append(", noGapClass: ");
result.append(noGapClass);
result.append(", scaffold: ");
result.append(scaffold);
result.append(", databaseTable: ");
result.append(databaseTable);
result.append(", discriminatorValue: ");
result.append(discriminatorValue);
result.append(", discriminatorColumn: ");
result.append(discriminatorColumn);
result.append(", discriminatorType: ");
result.append(discriminatorType);
result.append(", discriminatorLength: ");
result.append(discriminatorLength);
result.append(", inheritanceType: ");
result.append(inheritanceType);
result.append(", validate: ");
result.append(validate);
result.append(", aggregateRoot: ");
result.append(aggregateRoot);
result.append(')');
return result.toString();
}
} //DomainObjectImpl