/** * <copyright> * </copyright> * * $Id$ */ package com.hundsun.ares.studio.jres.model.chouse.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; import com.hundsun.ares.studio.jres.model.chouse.ChousePackage; import com.hundsun.ares.studio.jres.model.chouse.StockTableProperty; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Stock Table Property</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link com.hundsun.ares.studio.jres.model.chouse.impl.StockTablePropertyImpl#isHistory <em>History</em>}</li> * </ul> * </p> * * @generated */ public class StockTablePropertyImpl extends EObjectImpl implements StockTableProperty { /** * The default value of the '{@link #isHistory() <em>History</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isHistory() * @generated * @ordered */ protected static final boolean HISTORY_EDEFAULT = false; /** * The cached value of the '{@link #isHistory() <em>History</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isHistory() * @generated * @ordered */ protected boolean history = HISTORY_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected StockTablePropertyImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ChousePackage.Literals.STOCK_TABLE_PROPERTY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public boolean isHistory() { return history; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setHistory(boolean newHistory) { boolean oldHistory = history; history = newHistory; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ChousePackage.STOCK_TABLE_PROPERTY__HISTORY, oldHistory, history)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ChousePackage.STOCK_TABLE_PROPERTY__HISTORY: return isHistory(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ChousePackage.STOCK_TABLE_PROPERTY__HISTORY: setHistory((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ChousePackage.STOCK_TABLE_PROPERTY__HISTORY: setHistory(HISTORY_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ChousePackage.STOCK_TABLE_PROPERTY__HISTORY: return history != HISTORY_EDEFAULT; } 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(" (history: "); result.append(history); result.append(')'); return result.toString(); } } //StockTablePropertyImpl