1 7 package Olj.impl; 8 9 import Olj.OljPackage; 10 import Olj.SqlStmtType; 11 12 import java.util.Collection ; 13 14 import org.eclipse.emf.common.notify.NotificationChain; 15 16 import org.eclipse.emf.common.util.EList; 17 18 import org.eclipse.emf.ecore.EClass; 19 import org.eclipse.emf.ecore.EStructuralFeature; 20 import org.eclipse.emf.ecore.InternalEObject; 21 22 import org.eclipse.emf.ecore.impl.EObjectImpl; 23 24 import org.eclipse.emf.ecore.util.BasicFeatureMap; 25 import org.eclipse.emf.ecore.util.FeatureMap; 26 import org.eclipse.emf.ecore.util.InternalEList; 27 28 43 public class SqlStmtTypeImpl extends EObjectImpl implements SqlStmtType { 44 52 protected FeatureMap mixed = null; 53 54 59 protected SqlStmtTypeImpl() { 60 super(); 61 } 62 63 68 protected EClass eStaticClass() { 69 return OljPackage.eINSTANCE.getSqlStmtType(); 70 } 71 72 77 public FeatureMap getMixed() { 78 if (mixed == null) { 79 mixed = new BasicFeatureMap(this, OljPackage.SQL_STMT_TYPE__MIXED); 80 } 81 return mixed; 82 } 83 84 89 public FeatureMap getGroup() { 90 return (FeatureMap)((FeatureMap)getMixed()).list(OljPackage.eINSTANCE.getSqlStmtType_Group()); 91 } 92 93 98 public EList getInclude() { 99 return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getSqlStmtType_Include()); 100 } 101 102 107 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { 108 if (featureID >= 0) { 109 switch (eDerivedStructuralFeatureID(featureID, baseClass)) { 110 case OljPackage.SQL_STMT_TYPE__MIXED: 111 return ((InternalEList)getMixed()).basicRemove(otherEnd, msgs); 112 case OljPackage.SQL_STMT_TYPE__GROUP: 113 return ((InternalEList)getGroup()).basicRemove(otherEnd, msgs); 114 case OljPackage.SQL_STMT_TYPE__INCLUDE: 115 return ((InternalEList)getInclude()).basicRemove(otherEnd, msgs); 116 default: 117 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 118 } 119 } 120 return eBasicSetContainer(null, featureID, msgs); 121 } 122 123 128 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 129 switch (eDerivedStructuralFeatureID(eFeature)) { 130 case OljPackage.SQL_STMT_TYPE__MIXED: 131 return getMixed(); 132 case OljPackage.SQL_STMT_TYPE__GROUP: 133 return getGroup(); 134 case OljPackage.SQL_STMT_TYPE__INCLUDE: 135 return getInclude(); 136 } 137 return eDynamicGet(eFeature, resolve); 138 } 139 140 145 public void eSet(EStructuralFeature eFeature, Object newValue) { 146 switch (eDerivedStructuralFeatureID(eFeature)) { 147 case OljPackage.SQL_STMT_TYPE__MIXED: 148 getMixed().clear(); 149 getMixed().addAll((Collection )newValue); 150 return; 151 case OljPackage.SQL_STMT_TYPE__GROUP: 152 getGroup().clear(); 153 getGroup().addAll((Collection )newValue); 154 return; 155 case OljPackage.SQL_STMT_TYPE__INCLUDE: 156 getInclude().clear(); 157 getInclude().addAll((Collection )newValue); 158 return; 159 } 160 eDynamicSet(eFeature, newValue); 161 } 162 163 168 public void eUnset(EStructuralFeature eFeature) { 169 switch (eDerivedStructuralFeatureID(eFeature)) { 170 case OljPackage.SQL_STMT_TYPE__MIXED: 171 getMixed().clear(); 172 return; 173 case OljPackage.SQL_STMT_TYPE__GROUP: 174 getGroup().clear(); 175 return; 176 case OljPackage.SQL_STMT_TYPE__INCLUDE: 177 getInclude().clear(); 178 return; 179 } 180 eDynamicUnset(eFeature); 181 } 182 183 188 public boolean eIsSet(EStructuralFeature eFeature) { 189 switch (eDerivedStructuralFeatureID(eFeature)) { 190 case OljPackage.SQL_STMT_TYPE__MIXED: 191 return mixed != null && !mixed.isEmpty(); 192 case OljPackage.SQL_STMT_TYPE__GROUP: 193 return !getGroup().isEmpty(); 194 case OljPackage.SQL_STMT_TYPE__INCLUDE: 195 return !getInclude().isEmpty(); 196 } 197 return eDynamicIsSet(eFeature); 198 } 199 200 205 public String toString() { 206 if (eIsProxy()) return super.toString(); 207 208 StringBuffer result = new StringBuffer (super.toString()); 209 result.append(" (mixed: "); 210 result.append(mixed); 211 result.append(')'); 212 return result.toString(); 213 } 214 215 } | Popular Tags |