1 7 package Olj.impl; 8 9 import Olj.OljPackage; 10 import Olj.RelationColumnType; 11 import Olj.RelationColumnsType; 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 RelationColumnsTypeImpl extends EObjectImpl implements RelationColumnsType { 42 50 protected EList relationColumn = null; 51 52 57 protected RelationColumnsTypeImpl() { 58 super(); 59 } 60 61 66 protected EClass eStaticClass() { 67 return OljPackage.eINSTANCE.getRelationColumnsType(); 68 } 69 70 75 public EList getRelationColumn() { 76 if (relationColumn == null) { 77 relationColumn = new EObjectContainmentEList(RelationColumnType.class, this, OljPackage.RELATION_COLUMNS_TYPE__RELATION_COLUMN); 78 } 79 return relationColumn; 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.RELATION_COLUMNS_TYPE__RELATION_COLUMN: 91 return ((InternalEList)getRelationColumn()).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.RELATION_COLUMNS_TYPE__RELATION_COLUMN: 107 return getRelationColumn(); 108 } 109 return eDynamicGet(eFeature, resolve); 110 } 111 112 117 public void eSet(EStructuralFeature eFeature, Object newValue) { 118 switch (eDerivedStructuralFeatureID(eFeature)) { 119 case OljPackage.RELATION_COLUMNS_TYPE__RELATION_COLUMN: 120 getRelationColumn().clear(); 121 getRelationColumn().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.RELATION_COLUMNS_TYPE__RELATION_COLUMN: 135 getRelationColumn().clear(); 136 return; 137 } 138 eDynamicUnset(eFeature); 139 } 140 141 146 public boolean eIsSet(EStructuralFeature eFeature) { 147 switch (eDerivedStructuralFeatureID(eFeature)) { 148 case OljPackage.RELATION_COLUMNS_TYPE__RELATION_COLUMN: 149 return relationColumn != null && !relationColumn.isEmpty(); 150 } 151 return eDynamicIsSet(eFeature); 152 } 153 154 } | Popular Tags |