1 7 package org.enhydra.dods.editor.Doml.impl; 8 9 import org.eclipse.emf.common.notify.Notification; 10 11 import org.eclipse.emf.ecore.EClass; 12 import org.eclipse.emf.ecore.EStructuralFeature; 13 14 import org.eclipse.emf.ecore.impl.ENotificationImpl; 15 import org.eclipse.emf.ecore.impl.EObjectImpl; 16 17 import org.enhydra.dods.editor.Doml.DomlPackage; 18 import org.enhydra.dods.editor.Doml.IndexColumnType; 19 20 33 public class IndexColumnTypeImpl extends EObjectImpl implements IndexColumnType { 34 42 protected static final String ID_EDEFAULT = null; 43 44 52 protected String id = ID_EDEFAULT; 53 54 59 protected IndexColumnTypeImpl() { 60 super(); 61 } 62 63 68 protected EClass eStaticClass() { 69 return DomlPackage.eINSTANCE.getIndexColumnType(); 70 } 71 72 77 public String getId() { 78 return id; 79 } 80 81 86 public void setId(String newId) { 87 String oldId = id; 88 id = newId; 89 if (eNotificationRequired()) 90 eNotify(new ENotificationImpl(this, Notification.SET, DomlPackage.INDEX_COLUMN_TYPE__ID, oldId, id)); 91 } 92 93 98 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 99 switch (eDerivedStructuralFeatureID(eFeature)) { 100 case DomlPackage.INDEX_COLUMN_TYPE__ID: 101 return getId(); 102 } 103 return eDynamicGet(eFeature, resolve); 104 } 105 106 111 public void eSet(EStructuralFeature eFeature, Object newValue) { 112 switch (eDerivedStructuralFeatureID(eFeature)) { 113 case DomlPackage.INDEX_COLUMN_TYPE__ID: 114 setId((String )newValue); 115 return; 116 } 117 eDynamicSet(eFeature, newValue); 118 } 119 120 125 public void eUnset(EStructuralFeature eFeature) { 126 switch (eDerivedStructuralFeatureID(eFeature)) { 127 case DomlPackage.INDEX_COLUMN_TYPE__ID: 128 setId(ID_EDEFAULT); 129 return; 130 } 131 eDynamicUnset(eFeature); 132 } 133 134 139 public boolean eIsSet(EStructuralFeature eFeature) { 140 switch (eDerivedStructuralFeatureID(eFeature)) { 141 case DomlPackage.INDEX_COLUMN_TYPE__ID: 142 return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); 143 } 144 return eDynamicIsSet(eFeature); 145 } 146 147 152 public String toString() { 153 if (eIsProxy()) return super.toString(); 154 155 StringBuffer result = new StringBuffer (super.toString()); 156 result.append(" (id: "); 157 result.append(id); 158 result.append(')'); 159 return result.toString(); 160 } 161 162 } | Popular Tags |