All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl Maven / Gradle / Ivy

There is a newer version: 6.12.0
Show newest version
/**
 * generated by Xtext 2.21.0
 */
package org.contextmapper.tactic.dsl.tacticdsl.impl;

import java.util.Collection;

import org.contextmapper.tactic.dsl.tacticdsl.DataTransferObject;
import org.contextmapper.tactic.dsl.tacticdsl.DtoAttribute;
import org.contextmapper.tactic.dsl.tacticdsl.DtoReference;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;

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.InternalEList;

/**
 * 
 * An implementation of the model object 'Data Transfer Object'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#getComment Comment}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#isAbstract Abstract}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#getExtends Extends}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#getExtendsName Extends Name}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#isGapClass Gap Class}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#isNoGapClass No Gap Class}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#getValidate Validate}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#getAttributes Attributes}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DataTransferObjectImpl#getReferences References}
  • *
* * @generated */ public class DataTransferObjectImpl extends SimpleDomainObjectImpl implements DataTransferObject { /** * 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 cached value of the '{@link #getExtends() Extends}' reference. * * * @see #getExtends() * @generated * @ordered */ protected DataTransferObject extends_; /** * 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 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 #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 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; /** * * * @generated */ protected DataTransferObjectImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.DATA_TRANSFER_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.DATA_TRANSFER_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.DATA_TRANSFER_OBJECT__ABSTRACT, oldAbstract, abstract_)); } /** * * * @generated */ @Override public DataTransferObject getExtends() { if (extends_ != null && extends_.eIsProxy()) { InternalEObject oldExtends = (InternalEObject)extends_; extends_ = (DataTransferObject)eResolveProxy(oldExtends); if (extends_ != oldExtends) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS, oldExtends, extends_)); } } return extends_; } /** * * * @generated */ public DataTransferObject basicGetExtends() { return extends_; } /** * * * @generated */ @Override public void setExtends(DataTransferObject newExtends) { DataTransferObject oldExtends = extends_; extends_ = newExtends; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS, oldExtends, extends_)); } /** * * * @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.DATA_TRANSFER_OBJECT__EXTENDS_NAME, oldExtendsName, extendsName)); } /** * * * @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.DATA_TRANSFER_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.DATA_TRANSFER_OBJECT__NO_GAP_CLASS, oldNoGapClass, noGapClass)); } /** * * * @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.DATA_TRANSFER_OBJECT__VALIDATE, oldValidate, validate)); } /** * * * @generated */ @Override public EList getAttributes() { if (attributes == null) { attributes = new EObjectContainmentEList(DtoAttribute.class, this, TacticdslPackage.DATA_TRANSFER_OBJECT__ATTRIBUTES); } return attributes; } /** * * * @generated */ @Override public EList getReferences() { if (references == null) { references = new EObjectContainmentEList(DtoReference.class, this, TacticdslPackage.DATA_TRANSFER_OBJECT__REFERENCES); } return references; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case TacticdslPackage.DATA_TRANSFER_OBJECT__ATTRIBUTES: return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs); case TacticdslPackage.DATA_TRANSFER_OBJECT__REFERENCES: return ((InternalEList)getReferences()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.DATA_TRANSFER_OBJECT__COMMENT: return getComment(); case TacticdslPackage.DATA_TRANSFER_OBJECT__ABSTRACT: return isAbstract(); case TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS: if (resolve) return getExtends(); return basicGetExtends(); case TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS_NAME: return getExtendsName(); case TacticdslPackage.DATA_TRANSFER_OBJECT__GAP_CLASS: return isGapClass(); case TacticdslPackage.DATA_TRANSFER_OBJECT__NO_GAP_CLASS: return isNoGapClass(); case TacticdslPackage.DATA_TRANSFER_OBJECT__VALIDATE: return getValidate(); case TacticdslPackage.DATA_TRANSFER_OBJECT__ATTRIBUTES: return getAttributes(); case TacticdslPackage.DATA_TRANSFER_OBJECT__REFERENCES: return getReferences(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.DATA_TRANSFER_OBJECT__COMMENT: setComment((String)newValue); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__ABSTRACT: setAbstract((Boolean)newValue); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS: setExtends((DataTransferObject)newValue); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS_NAME: setExtendsName((String)newValue); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__GAP_CLASS: setGapClass((Boolean)newValue); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__NO_GAP_CLASS: setNoGapClass((Boolean)newValue); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__VALIDATE: setValidate((String)newValue); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__ATTRIBUTES: getAttributes().clear(); getAttributes().addAll((Collection)newValue); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__REFERENCES: getReferences().clear(); getReferences().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.DATA_TRANSFER_OBJECT__COMMENT: setComment(COMMENT_EDEFAULT); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__ABSTRACT: setAbstract(ABSTRACT_EDEFAULT); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS: setExtends((DataTransferObject)null); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS_NAME: setExtendsName(EXTENDS_NAME_EDEFAULT); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__GAP_CLASS: setGapClass(GAP_CLASS_EDEFAULT); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__NO_GAP_CLASS: setNoGapClass(NO_GAP_CLASS_EDEFAULT); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__VALIDATE: setValidate(VALIDATE_EDEFAULT); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__ATTRIBUTES: getAttributes().clear(); return; case TacticdslPackage.DATA_TRANSFER_OBJECT__REFERENCES: getReferences().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.DATA_TRANSFER_OBJECT__COMMENT: return COMMENT_EDEFAULT == null ? comment != null : !COMMENT_EDEFAULT.equals(comment); case TacticdslPackage.DATA_TRANSFER_OBJECT__ABSTRACT: return abstract_ != ABSTRACT_EDEFAULT; case TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS: return extends_ != null; case TacticdslPackage.DATA_TRANSFER_OBJECT__EXTENDS_NAME: return EXTENDS_NAME_EDEFAULT == null ? extendsName != null : !EXTENDS_NAME_EDEFAULT.equals(extendsName); case TacticdslPackage.DATA_TRANSFER_OBJECT__GAP_CLASS: return gapClass != GAP_CLASS_EDEFAULT; case TacticdslPackage.DATA_TRANSFER_OBJECT__NO_GAP_CLASS: return noGapClass != NO_GAP_CLASS_EDEFAULT; case TacticdslPackage.DATA_TRANSFER_OBJECT__VALIDATE: return VALIDATE_EDEFAULT == null ? validate != null : !VALIDATE_EDEFAULT.equals(validate); case TacticdslPackage.DATA_TRANSFER_OBJECT__ATTRIBUTES: return attributes != null && !attributes.isEmpty(); case TacticdslPackage.DATA_TRANSFER_OBJECT__REFERENCES: return references != null && !references.isEmpty(); } 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(", gapClass: "); result.append(gapClass); result.append(", noGapClass: "); result.append(noGapClass); result.append(", validate: "); result.append(validate); result.append(')'); return result.toString(); } } //DataTransferObjectImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy