1 7 package Olj.impl; 8 9 import Olj.OljPackage; 10 import Olj.SortColumnType; 11 import Olj.SortColumnsType; 12 13 import org.eclipse.emf.common.notify.Notification; 14 import org.eclipse.emf.common.notify.NotificationChain; 15 16 import org.eclipse.emf.ecore.EClass; 17 import org.eclipse.emf.ecore.EStructuralFeature; 18 import org.eclipse.emf.ecore.InternalEObject; 19 20 import org.eclipse.emf.ecore.impl.ENotificationImpl; 21 import org.eclipse.emf.ecore.impl.EObjectImpl; 22 23 36 public class SortColumnsTypeImpl extends EObjectImpl implements SortColumnsType { 37 45 protected SortColumnType sortColumn = null; 46 47 52 protected SortColumnsTypeImpl() { 53 super(); 54 } 55 56 61 protected EClass eStaticClass() { 62 return OljPackage.eINSTANCE.getSortColumnsType(); 63 } 64 65 70 public SortColumnType getSortColumn() { 71 return sortColumn; 72 } 73 74 79 public NotificationChain basicSetSortColumn(SortColumnType newSortColumn, NotificationChain msgs) { 80 SortColumnType oldSortColumn = sortColumn; 81 sortColumn = newSortColumn; 82 if (eNotificationRequired()) { 83 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN, oldSortColumn, newSortColumn); 84 if (msgs == null) msgs = notification; else msgs.add(notification); 85 } 86 return msgs; 87 } 88 89 94 public void setSortColumn(SortColumnType newSortColumn) { 95 if (newSortColumn != sortColumn) { 96 NotificationChain msgs = null; 97 if (sortColumn != null) 98 msgs = ((InternalEObject)sortColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN, null, msgs); 99 if (newSortColumn != null) 100 msgs = ((InternalEObject)newSortColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN, null, msgs); 101 msgs = basicSetSortColumn(newSortColumn, msgs); 102 if (msgs != null) msgs.dispatch(); 103 } 104 else if (eNotificationRequired()) 105 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN, newSortColumn, newSortColumn)); 106 } 107 108 113 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { 114 if (featureID >= 0) { 115 switch (eDerivedStructuralFeatureID(featureID, baseClass)) { 116 case OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN: 117 return basicSetSortColumn(null, msgs); 118 default: 119 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 120 } 121 } 122 return eBasicSetContainer(null, featureID, msgs); 123 } 124 125 130 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 131 switch (eDerivedStructuralFeatureID(eFeature)) { 132 case OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN: 133 return getSortColumn(); 134 } 135 return eDynamicGet(eFeature, resolve); 136 } 137 138 143 public void eSet(EStructuralFeature eFeature, Object newValue) { 144 switch (eDerivedStructuralFeatureID(eFeature)) { 145 case OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN: 146 setSortColumn((SortColumnType)newValue); 147 return; 148 } 149 eDynamicSet(eFeature, newValue); 150 } 151 152 157 public void eUnset(EStructuralFeature eFeature) { 158 switch (eDerivedStructuralFeatureID(eFeature)) { 159 case OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN: 160 setSortColumn((SortColumnType)null); 161 return; 162 } 163 eDynamicUnset(eFeature); 164 } 165 166 171 public boolean eIsSet(EStructuralFeature eFeature) { 172 switch (eDerivedStructuralFeatureID(eFeature)) { 173 case OljPackage.SORT_COLUMNS_TYPE__SORT_COLUMN: 174 return sortColumn != null; 175 } 176 return eDynamicIsSet(eFeature); 177 } 178 179 } | Popular Tags |