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

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

/**
 * generated by Xtext 2.21.0
 */
package org.contextmapper.tactic.dsl.tacticdsl.impl;

import org.contextmapper.tactic.dsl.tacticdsl.DtoReference;
import org.contextmapper.tactic.dsl.tacticdsl.SimpleDomainObject;
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 'Dto Reference'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DtoReferenceImpl#getDomainObjectType Domain Object Type}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DtoReferenceImpl#isValid Valid}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.DtoReferenceImpl#getValidMessage Valid Message}
  • *
* * @generated */ public class DtoReferenceImpl extends DtoPropertyImpl implements DtoReference { /** * The cached value of the '{@link #getDomainObjectType() Domain Object Type}' reference. * * * @see #getDomainObjectType() * @generated * @ordered */ protected SimpleDomainObject domainObjectType; /** * The default value of the '{@link #isValid() Valid}' attribute. * * * @see #isValid() * @generated * @ordered */ protected static final boolean VALID_EDEFAULT = false; /** * The cached value of the '{@link #isValid() Valid}' attribute. * * * @see #isValid() * @generated * @ordered */ protected boolean valid = VALID_EDEFAULT; /** * The default value of the '{@link #getValidMessage() Valid Message}' attribute. * * * @see #getValidMessage() * @generated * @ordered */ protected static final String VALID_MESSAGE_EDEFAULT = null; /** * The cached value of the '{@link #getValidMessage() Valid Message}' attribute. * * * @see #getValidMessage() * @generated * @ordered */ protected String validMessage = VALID_MESSAGE_EDEFAULT; /** * * * @generated */ protected DtoReferenceImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.DTO_REFERENCE; } /** * * * @generated */ @Override public SimpleDomainObject getDomainObjectType() { if (domainObjectType != null && domainObjectType.eIsProxy()) { InternalEObject oldDomainObjectType = (InternalEObject)domainObjectType; domainObjectType = (SimpleDomainObject)eResolveProxy(oldDomainObjectType); if (domainObjectType != oldDomainObjectType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, TacticdslPackage.DTO_REFERENCE__DOMAIN_OBJECT_TYPE, oldDomainObjectType, domainObjectType)); } } return domainObjectType; } /** * * * @generated */ public SimpleDomainObject basicGetDomainObjectType() { return domainObjectType; } /** * * * @generated */ @Override public void setDomainObjectType(SimpleDomainObject newDomainObjectType) { SimpleDomainObject oldDomainObjectType = domainObjectType; domainObjectType = newDomainObjectType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DTO_REFERENCE__DOMAIN_OBJECT_TYPE, oldDomainObjectType, domainObjectType)); } /** * * * @generated */ @Override public boolean isValid() { return valid; } /** * * * @generated */ @Override public void setValid(boolean newValid) { boolean oldValid = valid; valid = newValid; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DTO_REFERENCE__VALID, oldValid, valid)); } /** * * * @generated */ @Override public String getValidMessage() { return validMessage; } /** * * * @generated */ @Override public void setValidMessage(String newValidMessage) { String oldValidMessage = validMessage; validMessage = newValidMessage; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.DTO_REFERENCE__VALID_MESSAGE, oldValidMessage, validMessage)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.DTO_REFERENCE__DOMAIN_OBJECT_TYPE: if (resolve) return getDomainObjectType(); return basicGetDomainObjectType(); case TacticdslPackage.DTO_REFERENCE__VALID: return isValid(); case TacticdslPackage.DTO_REFERENCE__VALID_MESSAGE: return getValidMessage(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.DTO_REFERENCE__DOMAIN_OBJECT_TYPE: setDomainObjectType((SimpleDomainObject)newValue); return; case TacticdslPackage.DTO_REFERENCE__VALID: setValid((Boolean)newValue); return; case TacticdslPackage.DTO_REFERENCE__VALID_MESSAGE: setValidMessage((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.DTO_REFERENCE__DOMAIN_OBJECT_TYPE: setDomainObjectType((SimpleDomainObject)null); return; case TacticdslPackage.DTO_REFERENCE__VALID: setValid(VALID_EDEFAULT); return; case TacticdslPackage.DTO_REFERENCE__VALID_MESSAGE: setValidMessage(VALID_MESSAGE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.DTO_REFERENCE__DOMAIN_OBJECT_TYPE: return domainObjectType != null; case TacticdslPackage.DTO_REFERENCE__VALID: return valid != VALID_EDEFAULT; case TacticdslPackage.DTO_REFERENCE__VALID_MESSAGE: return VALID_MESSAGE_EDEFAULT == null ? validMessage != null : !VALID_MESSAGE_EDEFAULT.equals(validMessage); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (valid: "); result.append(valid); result.append(", validMessage: "); result.append(validMessage); result.append(')'); return result.toString(); } } //DtoReferenceImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy