blob: bce9b4b3bf917435f780ce568f1694b3103c740a [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
package org.eclipse.osbp.ecview.core.common.model.core.impl;
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;
import org.eclipse.osbp.ecview.core.common.model.core.CoreModelPackage;
import org.eclipse.osbp.ecview.core.common.model.core.YBeanSlot;
import org.eclipse.osbp.ecview.core.common.model.core.YDetailBeanSlot;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>YDetail Bean Slot</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.osbp.ecview.core.common.model.core.impl.YDetailBeanSlotImpl#getMasterBeanSlot <em>Master Bean Slot</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.common.model.core.impl.YDetailBeanSlotImpl#getPropertyPath <em>Property Path</em>}</li>
* </ul>
*
* @generated
*/
public class YDetailBeanSlotImpl extends YBeanSlotImpl implements YDetailBeanSlot {
/**
* The cached value of the '{@link #getMasterBeanSlot() <em>Master Bean Slot</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMasterBeanSlot()
* @generated
* @ordered
*/
protected YBeanSlot masterBeanSlot;
/**
* The default value of the '{@link #getPropertyPath() <em>Property Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPropertyPath()
* @generated
* @ordered
*/
protected static final String PROPERTY_PATH_EDEFAULT = null;
/**
* The cached value of the '{@link #getPropertyPath() <em>Property Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPropertyPath()
* @generated
* @ordered
*/
protected String propertyPath = PROPERTY_PATH_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected YDetailBeanSlotImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return CoreModelPackage.Literals.YDETAIL_BEAN_SLOT;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public YBeanSlot getMasterBeanSlot() {
if (masterBeanSlot != null && masterBeanSlot.eIsProxy()) {
InternalEObject oldMasterBeanSlot = (InternalEObject)masterBeanSlot;
masterBeanSlot = (YBeanSlot)eResolveProxy(oldMasterBeanSlot);
if (masterBeanSlot != oldMasterBeanSlot) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, CoreModelPackage.YDETAIL_BEAN_SLOT__MASTER_BEAN_SLOT, oldMasterBeanSlot, masterBeanSlot));
}
}
return masterBeanSlot;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public YBeanSlot basicGetMasterBeanSlot() {
return masterBeanSlot;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMasterBeanSlot(YBeanSlot newMasterBeanSlot) {
YBeanSlot oldMasterBeanSlot = masterBeanSlot;
masterBeanSlot = newMasterBeanSlot;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDETAIL_BEAN_SLOT__MASTER_BEAN_SLOT, oldMasterBeanSlot, masterBeanSlot));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getPropertyPath() {
return propertyPath;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPropertyPath(String newPropertyPath) {
String oldPropertyPath = propertyPath;
propertyPath = newPropertyPath;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, CoreModelPackage.YDETAIL_BEAN_SLOT__PROPERTY_PATH, oldPropertyPath, propertyPath));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CoreModelPackage.YDETAIL_BEAN_SLOT__MASTER_BEAN_SLOT:
if (resolve) return getMasterBeanSlot();
return basicGetMasterBeanSlot();
case CoreModelPackage.YDETAIL_BEAN_SLOT__PROPERTY_PATH:
return getPropertyPath();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CoreModelPackage.YDETAIL_BEAN_SLOT__MASTER_BEAN_SLOT:
setMasterBeanSlot((YBeanSlot)newValue);
return;
case CoreModelPackage.YDETAIL_BEAN_SLOT__PROPERTY_PATH:
setPropertyPath((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CoreModelPackage.YDETAIL_BEAN_SLOT__MASTER_BEAN_SLOT:
setMasterBeanSlot((YBeanSlot)null);
return;
case CoreModelPackage.YDETAIL_BEAN_SLOT__PROPERTY_PATH:
setPropertyPath(PROPERTY_PATH_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CoreModelPackage.YDETAIL_BEAN_SLOT__MASTER_BEAN_SLOT:
return masterBeanSlot != null;
case CoreModelPackage.YDETAIL_BEAN_SLOT__PROPERTY_PATH:
return PROPERTY_PATH_EDEFAULT == null ? propertyPath != null : !PROPERTY_PATH_EDEFAULT.equals(propertyPath);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (propertyPath: ");
result.append(propertyPath);
result.append(')');
return result.toString();
}
} //YDetailBeanSlotImpl