1 7 package Olj.impl; 8 9 import Olj.OljPackage; 10 import Olj.TableType; 11 import Olj.TablesType; 12 13 import java.util.Collection ; 14 15 import org.eclipse.emf.common.notify.NotificationChain; 16 17 import org.eclipse.emf.common.util.EList; 18 19 import org.eclipse.emf.ecore.EClass; 20 import org.eclipse.emf.ecore.EStructuralFeature; 21 import org.eclipse.emf.ecore.InternalEObject; 22 23 import org.eclipse.emf.ecore.impl.EObjectImpl; 24 25 import org.eclipse.emf.ecore.util.EObjectContainmentEList; 26 import org.eclipse.emf.ecore.util.InternalEList; 27 28 41 public class TablesTypeImpl extends EObjectImpl implements TablesType { 42 50 protected EList table = null; 51 52 57 protected TablesTypeImpl() { 58 super(); 59 } 60 61 66 protected EClass eStaticClass() { 67 return OljPackage.eINSTANCE.getTablesType(); 68 } 69 70 75 public EList getTable() { 76 if (table == null) { 77 table = new EObjectContainmentEList(TableType.class, this, OljPackage.TABLES_TYPE__TABLE); 78 } 79 return table; 80 } 81 82 87 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { 88 if (featureID >= 0) { 89 switch (eDerivedStructuralFeatureID(featureID, baseClass)) { 90 case OljPackage.TABLES_TYPE__TABLE: 91 return ((InternalEList)getTable()).basicRemove(otherEnd, msgs); 92 default: 93 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 94 } 95 } 96 return eBasicSetContainer(null, featureID, msgs); 97 } 98 99 104 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 105 switch (eDerivedStructuralFeatureID(eFeature)) { 106 case OljPackage.TABLES_TYPE__TABLE: 107 return getTable(); 108 } 109 return eDynamicGet(eFeature, resolve); 110 } 111 112 117 public void eSet(EStructuralFeature eFeature, Object newValue) { 118 switch (eDerivedStructuralFeatureID(eFeature)) { 119 case OljPackage.TABLES_TYPE__TABLE: 120 getTable().clear(); 121 getTable().addAll((Collection )newValue); 122 return; 123 } 124 eDynamicSet(eFeature, newValue); 125 } 126 127 132 public void eUnset(EStructuralFeature eFeature) { 133 switch (eDerivedStructuralFeatureID(eFeature)) { 134 case OljPackage.TABLES_TYPE__TABLE: 135 getTable().clear(); 136 return; 137 } 138 eDynamicUnset(eFeature); 139 } 140 141 146 public boolean eIsSet(EStructuralFeature eFeature) { 147 switch (eDerivedStructuralFeatureID(eFeature)) { 148 case OljPackage.TABLES_TYPE__TABLE: 149 return table != null && !table.isEmpty(); 150 } 151 return eDynamicIsSet(eFeature); 152 } 153 154 } | Popular Tags |