1 7 package Olj.impl; 8 9 import Olj.CounterColumnsType; 10 import Olj.OljPackage; 11 12 import java.util.Collection ; 13 14 import org.eclipse.emf.common.notify.Notification; 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.ENotificationImpl; 24 import org.eclipse.emf.ecore.impl.EObjectImpl; 25 26 import org.eclipse.emf.ecore.util.BasicFeatureMap; 27 import org.eclipse.emf.ecore.util.FeatureMap; 28 import org.eclipse.emf.ecore.util.InternalEList; 29 30 48 public class CounterColumnsTypeImpl extends EObjectImpl implements CounterColumnsType { 49 57 protected FeatureMap group = null; 58 59 67 protected static final String COUNTER_NAME_COLUMN_EDEFAULT = null; 68 69 77 protected String counterNameColumn = COUNTER_NAME_COLUMN_EDEFAULT; 78 79 87 protected static final String COUNTER_TABLE_NAME_EDEFAULT = null; 88 89 97 protected String counterTableName = COUNTER_TABLE_NAME_EDEFAULT; 98 99 107 protected static final String COUNTER_VALUE_COLUMN_EDEFAULT = null; 108 109 117 protected String counterValueColumn = COUNTER_VALUE_COLUMN_EDEFAULT; 118 119 124 protected CounterColumnsTypeImpl() { 125 super(); 126 } 127 128 133 protected EClass eStaticClass() { 134 return OljPackage.eINSTANCE.getCounterColumnsType(); 135 } 136 137 142 public FeatureMap getGroup() { 143 if (group == null) { 144 group = new BasicFeatureMap(this, OljPackage.COUNTER_COLUMNS_TYPE__GROUP); 145 } 146 return group; 147 } 148 149 154 public EList getCounterColumn() { 155 return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getCounterColumnsType_CounterColumn()); 156 } 157 158 163 public EList getSubCounterColumn() { 164 return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getCounterColumnsType_SubCounterColumn()); 165 } 166 167 172 public String getCounterNameColumn() { 173 return counterNameColumn; 174 } 175 176 181 public void setCounterNameColumn(String newCounterNameColumn) { 182 String oldCounterNameColumn = counterNameColumn; 183 counterNameColumn = newCounterNameColumn; 184 if (eNotificationRequired()) 185 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_NAME_COLUMN, oldCounterNameColumn, counterNameColumn)); 186 } 187 188 193 public String getCounterTableName() { 194 return counterTableName; 195 } 196 197 202 public void setCounterTableName(String newCounterTableName) { 203 String oldCounterTableName = counterTableName; 204 counterTableName = newCounterTableName; 205 if (eNotificationRequired()) 206 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_TABLE_NAME, oldCounterTableName, counterTableName)); 207 } 208 209 214 public String getCounterValueColumn() { 215 return counterValueColumn; 216 } 217 218 223 public void setCounterValueColumn(String newCounterValueColumn) { 224 String oldCounterValueColumn = counterValueColumn; 225 counterValueColumn = newCounterValueColumn; 226 if (eNotificationRequired()) 227 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_VALUE_COLUMN, oldCounterValueColumn, counterValueColumn)); 228 } 229 230 235 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { 236 if (featureID >= 0) { 237 switch (eDerivedStructuralFeatureID(featureID, baseClass)) { 238 case OljPackage.COUNTER_COLUMNS_TYPE__GROUP: 239 return ((InternalEList)getGroup()).basicRemove(otherEnd, msgs); 240 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_COLUMN: 241 return ((InternalEList)getCounterColumn()).basicRemove(otherEnd, msgs); 242 case OljPackage.COUNTER_COLUMNS_TYPE__SUB_COUNTER_COLUMN: 243 return ((InternalEList)getSubCounterColumn()).basicRemove(otherEnd, msgs); 244 default: 245 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 246 } 247 } 248 return eBasicSetContainer(null, featureID, msgs); 249 } 250 251 256 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 257 switch (eDerivedStructuralFeatureID(eFeature)) { 258 case OljPackage.COUNTER_COLUMNS_TYPE__GROUP: 259 return getGroup(); 260 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_COLUMN: 261 return getCounterColumn(); 262 case OljPackage.COUNTER_COLUMNS_TYPE__SUB_COUNTER_COLUMN: 263 return getSubCounterColumn(); 264 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_NAME_COLUMN: 265 return getCounterNameColumn(); 266 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_TABLE_NAME: 267 return getCounterTableName(); 268 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_VALUE_COLUMN: 269 return getCounterValueColumn(); 270 } 271 return eDynamicGet(eFeature, resolve); 272 } 273 274 279 public void eSet(EStructuralFeature eFeature, Object newValue) { 280 switch (eDerivedStructuralFeatureID(eFeature)) { 281 case OljPackage.COUNTER_COLUMNS_TYPE__GROUP: 282 getGroup().clear(); 283 getGroup().addAll((Collection )newValue); 284 return; 285 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_COLUMN: 286 getCounterColumn().clear(); 287 getCounterColumn().addAll((Collection )newValue); 288 return; 289 case OljPackage.COUNTER_COLUMNS_TYPE__SUB_COUNTER_COLUMN: 290 getSubCounterColumn().clear(); 291 getSubCounterColumn().addAll((Collection )newValue); 292 return; 293 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_NAME_COLUMN: 294 setCounterNameColumn((String )newValue); 295 return; 296 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_TABLE_NAME: 297 setCounterTableName((String )newValue); 298 return; 299 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_VALUE_COLUMN: 300 setCounterValueColumn((String )newValue); 301 return; 302 } 303 eDynamicSet(eFeature, newValue); 304 } 305 306 311 public void eUnset(EStructuralFeature eFeature) { 312 switch (eDerivedStructuralFeatureID(eFeature)) { 313 case OljPackage.COUNTER_COLUMNS_TYPE__GROUP: 314 getGroup().clear(); 315 return; 316 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_COLUMN: 317 getCounterColumn().clear(); 318 return; 319 case OljPackage.COUNTER_COLUMNS_TYPE__SUB_COUNTER_COLUMN: 320 getSubCounterColumn().clear(); 321 return; 322 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_NAME_COLUMN: 323 setCounterNameColumn(COUNTER_NAME_COLUMN_EDEFAULT); 324 return; 325 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_TABLE_NAME: 326 setCounterTableName(COUNTER_TABLE_NAME_EDEFAULT); 327 return; 328 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_VALUE_COLUMN: 329 setCounterValueColumn(COUNTER_VALUE_COLUMN_EDEFAULT); 330 return; 331 } 332 eDynamicUnset(eFeature); 333 } 334 335 340 public boolean eIsSet(EStructuralFeature eFeature) { 341 switch (eDerivedStructuralFeatureID(eFeature)) { 342 case OljPackage.COUNTER_COLUMNS_TYPE__GROUP: 343 return group != null && !group.isEmpty(); 344 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_COLUMN: 345 return !getCounterColumn().isEmpty(); 346 case OljPackage.COUNTER_COLUMNS_TYPE__SUB_COUNTER_COLUMN: 347 return !getSubCounterColumn().isEmpty(); 348 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_NAME_COLUMN: 349 return COUNTER_NAME_COLUMN_EDEFAULT == null ? counterNameColumn != null : !COUNTER_NAME_COLUMN_EDEFAULT.equals(counterNameColumn); 350 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_TABLE_NAME: 351 return COUNTER_TABLE_NAME_EDEFAULT == null ? counterTableName != null : !COUNTER_TABLE_NAME_EDEFAULT.equals(counterTableName); 352 case OljPackage.COUNTER_COLUMNS_TYPE__COUNTER_VALUE_COLUMN: 353 return COUNTER_VALUE_COLUMN_EDEFAULT == null ? counterValueColumn != null : !COUNTER_VALUE_COLUMN_EDEFAULT.equals(counterValueColumn); 354 } 355 return eDynamicIsSet(eFeature); 356 } 357 358 363 public String toString() { 364 if (eIsProxy()) return super.toString(); 365 366 StringBuffer result = new StringBuffer (super.toString()); 367 result.append(" (group: "); 368 result.append(group); 369 result.append(", counterNameColumn: "); 370 result.append(counterNameColumn); 371 result.append(", counterTableName: "); 372 result.append(counterTableName); 373 result.append(", counterValueColumn: "); 374 result.append(counterValueColumn); 375 result.append(')'); 376 return result.toString(); 377 } 378 379 } | Popular Tags |