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

org.openxma.dsl.dom.model.impl.JoinImpl Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
/**
 * 
 * 
 *
 * $Id$
 */
package org.openxma.dsl.dom.model.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.openxma.dsl.dom.DomPackage;
import org.openxma.dsl.dom.model.Attribute;
import org.openxma.dsl.dom.model.Expression;
import org.openxma.dsl.dom.model.Join;
import org.openxma.dsl.dom.model.JoinEntity;

/**
 * 
 * An implementation of the model object 'Join'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openxma.dsl.dom.model.impl.JoinImpl#getType Type}
  • *
  • {@link org.openxma.dsl.dom.model.impl.JoinImpl#isFetch Fetch}
  • *
  • {@link org.openxma.dsl.dom.model.impl.JoinImpl#getEntity Entity}
  • *
  • {@link org.openxma.dsl.dom.model.impl.JoinImpl#getReference Reference}
  • *
  • {@link org.openxma.dsl.dom.model.impl.JoinImpl#isPropertyFetch Property Fetch}
  • *
  • {@link org.openxma.dsl.dom.model.impl.JoinImpl#getExpression Expression}
  • *
*

* * @generated */ public class JoinImpl extends JoinEntityImpl implements Join { /** * The default value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected static final String TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected String type = TYPE_EDEFAULT; /** * The default value of the '{@link #isFetch() Fetch}' attribute. * * * @see #isFetch() * @generated * @ordered */ protected static final boolean FETCH_EDEFAULT = false; /** * The cached value of the '{@link #isFetch() Fetch}' attribute. * * * @see #isFetch() * @generated * @ordered */ protected boolean fetch = FETCH_EDEFAULT; /** * The cached value of the '{@link #getEntity() Entity}' reference. * * * @see #getEntity() * @generated * @ordered */ protected JoinEntity entity; /** * The cached value of the '{@link #getReference() Reference}' reference. * * * @see #getReference() * @generated * @ordered */ protected Attribute reference; /** * The default value of the '{@link #isPropertyFetch() Property Fetch}' attribute. * * * @see #isPropertyFetch() * @generated * @ordered */ protected static final boolean PROPERTY_FETCH_EDEFAULT = false; /** * The cached value of the '{@link #isPropertyFetch() Property Fetch}' attribute. * * * @see #isPropertyFetch() * @generated * @ordered */ protected boolean propertyFetch = PROPERTY_FETCH_EDEFAULT; /** * The cached value of the '{@link #getExpression() Expression}' containment reference. * * * @see #getExpression() * @generated * @ordered */ protected Expression expression; /** * * * @generated */ protected JoinImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DomPackage.Literals.JOIN; } /** * * * @generated */ public String getType() { return type; } /** * * * @generated */ public void setType(String newType) { String oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.JOIN__TYPE, oldType, type)); } /** * * * @generated */ public boolean isFetch() { return fetch; } /** * * * @generated */ public void setFetch(boolean newFetch) { boolean oldFetch = fetch; fetch = newFetch; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.JOIN__FETCH, oldFetch, fetch)); } /** * * * @generated */ public JoinEntity getEntity() { if (entity != null && entity.eIsProxy()) { InternalEObject oldEntity = (InternalEObject)entity; entity = (JoinEntity)eResolveProxy(oldEntity); if (entity != oldEntity) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomPackage.JOIN__ENTITY, oldEntity, entity)); } } return entity; } /** * * * @generated */ public JoinEntity basicGetEntity() { return entity; } /** * * * @generated */ public void setEntity(JoinEntity newEntity) { JoinEntity oldEntity = entity; entity = newEntity; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.JOIN__ENTITY, oldEntity, entity)); } /** * * * @generated */ public Attribute getReference() { if (reference != null && reference.eIsProxy()) { InternalEObject oldReference = (InternalEObject)reference; reference = (Attribute)eResolveProxy(oldReference); if (reference != oldReference) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomPackage.JOIN__REFERENCE, oldReference, reference)); } } return reference; } /** * * * @generated */ public Attribute basicGetReference() { return reference; } /** * * * @generated */ public void setReference(Attribute newReference) { Attribute oldReference = reference; reference = newReference; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.JOIN__REFERENCE, oldReference, reference)); } /** * * * @generated */ public boolean isPropertyFetch() { return propertyFetch; } /** * * * @generated */ public void setPropertyFetch(boolean newPropertyFetch) { boolean oldPropertyFetch = propertyFetch; propertyFetch = newPropertyFetch; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.JOIN__PROPERTY_FETCH, oldPropertyFetch, propertyFetch)); } /** * * * @generated */ public Expression getExpression() { return expression; } /** * * * @generated */ public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) { Expression oldExpression = expression; expression = newExpression; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DomPackage.JOIN__EXPRESSION, oldExpression, newExpression); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setExpression(Expression newExpression) { if (newExpression != expression) { NotificationChain msgs = null; if (expression != null) msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DomPackage.JOIN__EXPRESSION, null, msgs); if (newExpression != null) msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DomPackage.JOIN__EXPRESSION, null, msgs); msgs = basicSetExpression(newExpression, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DomPackage.JOIN__EXPRESSION, newExpression, newExpression)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DomPackage.JOIN__EXPRESSION: return basicSetExpression(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DomPackage.JOIN__TYPE: return getType(); case DomPackage.JOIN__FETCH: return isFetch(); case DomPackage.JOIN__ENTITY: if (resolve) return getEntity(); return basicGetEntity(); case DomPackage.JOIN__REFERENCE: if (resolve) return getReference(); return basicGetReference(); case DomPackage.JOIN__PROPERTY_FETCH: return isPropertyFetch(); case DomPackage.JOIN__EXPRESSION: return getExpression(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DomPackage.JOIN__TYPE: setType((String)newValue); return; case DomPackage.JOIN__FETCH: setFetch((Boolean)newValue); return; case DomPackage.JOIN__ENTITY: setEntity((JoinEntity)newValue); return; case DomPackage.JOIN__REFERENCE: setReference((Attribute)newValue); return; case DomPackage.JOIN__PROPERTY_FETCH: setPropertyFetch((Boolean)newValue); return; case DomPackage.JOIN__EXPRESSION: setExpression((Expression)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DomPackage.JOIN__TYPE: setType(TYPE_EDEFAULT); return; case DomPackage.JOIN__FETCH: setFetch(FETCH_EDEFAULT); return; case DomPackage.JOIN__ENTITY: setEntity((JoinEntity)null); return; case DomPackage.JOIN__REFERENCE: setReference((Attribute)null); return; case DomPackage.JOIN__PROPERTY_FETCH: setPropertyFetch(PROPERTY_FETCH_EDEFAULT); return; case DomPackage.JOIN__EXPRESSION: setExpression((Expression)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DomPackage.JOIN__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); case DomPackage.JOIN__FETCH: return fetch != FETCH_EDEFAULT; case DomPackage.JOIN__ENTITY: return entity != null; case DomPackage.JOIN__REFERENCE: return reference != null; case DomPackage.JOIN__PROPERTY_FETCH: return propertyFetch != PROPERTY_FETCH_EDEFAULT; case DomPackage.JOIN__EXPRESSION: return expression != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (type: "); result.append(type); result.append(", fetch: "); result.append(fetch); result.append(", propertyFetch: "); result.append(propertyFetch); result.append(')'); return result.toString(); } } //JoinImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy