View Javadoc

1   /**
2    * <copyright>
3    * </copyright>
4    *
5    * $Id$
6    */
7   package BusinessDomainDsl.impl;
8   
9   import BusinessDomainDsl.AbstractBusinessClass;
10  import BusinessDomainDsl.Association;
11  import BusinessDomainDsl.BusinessClass;
12  import BusinessDomainDsl.BusinessDomainDslPackage;
13  import BusinessDomainDsl.BusinessDomainModel;
14  import BusinessDomainDsl.Multiplicity;
15  
16  import org.eclipse.emf.common.notify.Notification;
17  import org.eclipse.emf.common.notify.NotificationChain;
18  
19  import org.eclipse.emf.ecore.EClass;
20  import org.eclipse.emf.ecore.InternalEObject;
21  
22  import org.eclipse.emf.ecore.impl.ENotificationImpl;
23  
24  import org.eclipse.emf.ecore.util.EcoreUtil;
25  
26  /**
27   * <!-- begin-user-doc -->
28   * An implementation of the model object '<em><b>Association</b></em>'.
29   * <!-- end-user-doc -->
30   * <p>
31   * The following features are implemented:
32   * <ul>
33   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#getSource <em>Source</em>}</li>
34   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#getTarget <em>Target</em>}</li>
35   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#getSourceRoleName <em>Source Role Name</em>}</li>
36   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#getSourceMultiplicity <em>Source Multiplicity</em>}</li>
37   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#getTargetRoleName <em>Target Role Name</em>}</li>
38   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#getTargetMultiplicity <em>Target Multiplicity</em>}</li>
39   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#isComposite <em>Composite</em>}</li>
40   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#isBidirectional <em>Bidirectional</em>}</li>
41   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#isOrdered <em>Ordered</em>}</li>
42   *   <li>{@link BusinessDomainDsl.impl.AssociationImpl#getModel <em>Model</em>}</li>
43   * </ul>
44   * </p>
45   *
46   * @generated
47   */
48  public class AssociationImpl extends ModelElementImpl implements Association {
49  	/**
50       * The cached value of the '{@link #getSource() <em>Source</em>}' reference.
51       * <!-- begin-user-doc -->
52  	 * <!-- end-user-doc -->
53       * @see #getSource()
54       * @generated
55       * @ordered
56       */
57  	protected BusinessClass source;
58  
59  	/**
60       * The cached value of the '{@link #getTarget() <em>Target</em>}' reference.
61       * <!-- begin-user-doc -->
62  	 * <!-- end-user-doc -->
63       * @see #getTarget()
64       * @generated
65       * @ordered
66       */
67  	protected AbstractBusinessClass target;
68  
69  	/**
70       * The default value of the '{@link #getSourceRoleName() <em>Source Role Name</em>}' attribute.
71       * <!-- begin-user-doc -->
72  	 * <!-- end-user-doc -->
73       * @see #getSourceRoleName()
74       * @generated
75       * @ordered
76       */
77  	protected static final String SOURCE_ROLE_NAME_EDEFAULT = "sourceRoleName";
78  
79  	/**
80       * The cached value of the '{@link #getSourceRoleName() <em>Source Role Name</em>}' attribute.
81       * <!-- begin-user-doc -->
82  	 * <!-- end-user-doc -->
83       * @see #getSourceRoleName()
84       * @generated
85       * @ordered
86       */
87  	protected String sourceRoleName = SOURCE_ROLE_NAME_EDEFAULT;
88  
89  	/**
90       * The default value of the '{@link #getSourceMultiplicity() <em>Source Multiplicity</em>}' attribute.
91       * <!-- begin-user-doc -->
92  	 * <!-- end-user-doc -->
93       * @see #getSourceMultiplicity()
94       * @generated
95       * @ordered
96       */
97  	protected static final Multiplicity SOURCE_MULTIPLICITY_EDEFAULT = Multiplicity.ONE;
98  
99  	/**
100      * The cached value of the '{@link #getSourceMultiplicity() <em>Source Multiplicity</em>}' attribute.
101      * <!-- begin-user-doc -->
102 	 * <!-- end-user-doc -->
103      * @see #getSourceMultiplicity()
104      * @generated
105      * @ordered
106      */
107 	protected Multiplicity sourceMultiplicity = SOURCE_MULTIPLICITY_EDEFAULT;
108 
109 	/**
110      * The default value of the '{@link #getTargetRoleName() <em>Target Role Name</em>}' attribute.
111      * <!-- begin-user-doc -->
112 	 * <!-- end-user-doc -->
113      * @see #getTargetRoleName()
114      * @generated
115      * @ordered
116      */
117 	protected static final String TARGET_ROLE_NAME_EDEFAULT = "targetRoleName";
118 
119 	/**
120      * The cached value of the '{@link #getTargetRoleName() <em>Target Role Name</em>}' attribute.
121      * <!-- begin-user-doc -->
122 	 * <!-- end-user-doc -->
123      * @see #getTargetRoleName()
124      * @generated
125      * @ordered
126      */
127 	protected String targetRoleName = TARGET_ROLE_NAME_EDEFAULT;
128 
129 	/**
130      * The default value of the '{@link #getTargetMultiplicity() <em>Target Multiplicity</em>}' attribute.
131      * <!-- begin-user-doc -->
132 	 * <!-- end-user-doc -->
133      * @see #getTargetMultiplicity()
134      * @generated
135      * @ordered
136      */
137 	protected static final Multiplicity TARGET_MULTIPLICITY_EDEFAULT = Multiplicity.ZERO_MANY;
138 
139 	/**
140      * The cached value of the '{@link #getTargetMultiplicity() <em>Target Multiplicity</em>}' attribute.
141      * <!-- begin-user-doc -->
142 	 * <!-- end-user-doc -->
143      * @see #getTargetMultiplicity()
144      * @generated
145      * @ordered
146      */
147 	protected Multiplicity targetMultiplicity = TARGET_MULTIPLICITY_EDEFAULT;
148 
149 	/**
150      * The default value of the '{@link #isComposite() <em>Composite</em>}' attribute.
151      * <!-- begin-user-doc -->
152 	 * <!-- end-user-doc -->
153      * @see #isComposite()
154      * @generated
155      * @ordered
156      */
157 	protected static final boolean COMPOSITE_EDEFAULT = false;
158 
159 	/**
160      * The cached value of the '{@link #isComposite() <em>Composite</em>}' attribute.
161      * <!-- begin-user-doc -->
162 	 * <!-- end-user-doc -->
163      * @see #isComposite()
164      * @generated
165      * @ordered
166      */
167 	protected boolean composite = COMPOSITE_EDEFAULT;
168 
169 	/**
170      * The default value of the '{@link #isBidirectional() <em>Bidirectional</em>}' attribute.
171      * <!-- begin-user-doc -->
172 	 * <!-- end-user-doc -->
173      * @see #isBidirectional()
174      * @generated
175      * @ordered
176      */
177 	protected static final boolean BIDIRECTIONAL_EDEFAULT = false;
178 
179 	/**
180      * The cached value of the '{@link #isBidirectional() <em>Bidirectional</em>}' attribute.
181      * <!-- begin-user-doc -->
182 	 * <!-- end-user-doc -->
183      * @see #isBidirectional()
184      * @generated
185      * @ordered
186      */
187 	protected boolean bidirectional = BIDIRECTIONAL_EDEFAULT;
188 
189 	/**
190      * The default value of the '{@link #isOrdered() <em>Ordered</em>}' attribute.
191      * <!-- begin-user-doc -->
192 	 * <!-- end-user-doc -->
193      * @see #isOrdered()
194      * @generated
195      * @ordered
196      */
197 	protected static final boolean ORDERED_EDEFAULT = false;
198 
199 	/**
200      * The cached value of the '{@link #isOrdered() <em>Ordered</em>}' attribute.
201      * <!-- begin-user-doc -->
202 	 * <!-- end-user-doc -->
203      * @see #isOrdered()
204      * @generated
205      * @ordered
206      */
207 	protected boolean ordered = ORDERED_EDEFAULT;
208 
209 	/**
210      * <!-- begin-user-doc -->
211 	 * <!-- end-user-doc -->
212      * @generated
213      */
214 	protected AssociationImpl() {
215         super();
216     }
217 
218 	/**
219      * <!-- begin-user-doc -->
220 	 * <!-- end-user-doc -->
221      * @generated
222      */
223 	@Override
224 	protected EClass eStaticClass() {
225         return BusinessDomainDslPackage.Literals.ASSOCIATION;
226     }
227 
228 	/**
229      * <!-- begin-user-doc -->
230 	 * <!-- end-user-doc -->
231      * @generated
232      */
233 	public BusinessClass getSource() {
234         if (source != null && source.eIsProxy()) {
235             InternalEObject oldSource = (InternalEObject)source;
236             source = (BusinessClass)eResolveProxy(oldSource);
237             if (source != oldSource) {
238                 if (eNotificationRequired())
239                     eNotify(new ENotificationImpl(this, Notification.RESOLVE, BusinessDomainDslPackage.ASSOCIATION__SOURCE, oldSource, source));
240             }
241         }
242         return source;
243     }
244 
245 	/**
246      * <!-- begin-user-doc -->
247 	 * <!-- end-user-doc -->
248      * @generated
249      */
250 	public BusinessClass basicGetSource() {
251         return source;
252     }
253 
254 	/**
255      * <!-- begin-user-doc -->
256 	 * <!-- end-user-doc -->
257      * @generated
258      */
259 	public NotificationChain basicSetSource(BusinessClass newSource, NotificationChain msgs) {
260         BusinessClass oldSource = source;
261         source = newSource;
262         if (eNotificationRequired()) {
263             ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__SOURCE, oldSource, newSource);
264             if (msgs == null) msgs = notification; else msgs.add(notification);
265         }
266         return msgs;
267     }
268 
269 	/**
270      * <!-- begin-user-doc -->
271 	 * <!-- end-user-doc -->
272      * @generated
273      */
274 	public void setSource(BusinessClass newSource) {
275         if (newSource != source) {
276             NotificationChain msgs = null;
277             if (source != null)
278                 msgs = ((InternalEObject)source).eInverseRemove(this, BusinessDomainDslPackage.BUSINESS_CLASS__ASSOCIATIONS_TO, BusinessClass.class, msgs);
279             if (newSource != null)
280                 msgs = ((InternalEObject)newSource).eInverseAdd(this, BusinessDomainDslPackage.BUSINESS_CLASS__ASSOCIATIONS_TO, BusinessClass.class, msgs);
281             msgs = basicSetSource(newSource, msgs);
282             if (msgs != null) msgs.dispatch();
283         }
284         else if (eNotificationRequired())
285             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__SOURCE, newSource, newSource));
286     }
287 
288 	/**
289      * <!-- begin-user-doc -->
290 	 * <!-- end-user-doc -->
291      * @generated
292      */
293 	public AbstractBusinessClass getTarget() {
294         if (target != null && target.eIsProxy()) {
295             InternalEObject oldTarget = (InternalEObject)target;
296             target = (AbstractBusinessClass)eResolveProxy(oldTarget);
297             if (target != oldTarget) {
298                 if (eNotificationRequired())
299                     eNotify(new ENotificationImpl(this, Notification.RESOLVE, BusinessDomainDslPackage.ASSOCIATION__TARGET, oldTarget, target));
300             }
301         }
302         return target;
303     }
304 
305 	/**
306      * <!-- begin-user-doc -->
307 	 * <!-- end-user-doc -->
308      * @generated
309      */
310 	public AbstractBusinessClass basicGetTarget() {
311         return target;
312     }
313 
314 	/**
315      * <!-- begin-user-doc -->
316 	 * <!-- end-user-doc -->
317      * @generated
318      */
319 	public NotificationChain basicSetTarget(AbstractBusinessClass newTarget, NotificationChain msgs) {
320         AbstractBusinessClass oldTarget = target;
321         target = newTarget;
322         if (eNotificationRequired()) {
323             ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__TARGET, oldTarget, newTarget);
324             if (msgs == null) msgs = notification; else msgs.add(notification);
325         }
326         return msgs;
327     }
328 
329 	/**
330      * <!-- begin-user-doc -->
331 	 * <!-- end-user-doc -->
332      * @generated
333      */
334 	public void setTarget(AbstractBusinessClass newTarget) {
335         if (newTarget != target) {
336             NotificationChain msgs = null;
337             if (target != null)
338                 msgs = ((InternalEObject)target).eInverseRemove(this, BusinessDomainDslPackage.ABSTRACT_BUSINESS_CLASS__ASSOCIATIONS_FROM, AbstractBusinessClass.class, msgs);
339             if (newTarget != null)
340                 msgs = ((InternalEObject)newTarget).eInverseAdd(this, BusinessDomainDslPackage.ABSTRACT_BUSINESS_CLASS__ASSOCIATIONS_FROM, AbstractBusinessClass.class, msgs);
341             msgs = basicSetTarget(newTarget, msgs);
342             if (msgs != null) msgs.dispatch();
343         }
344         else if (eNotificationRequired())
345             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__TARGET, newTarget, newTarget));
346     }
347 
348 	/**
349      * <!-- begin-user-doc -->
350 	 * <!-- end-user-doc -->
351      * @generated
352      */
353 	public String getSourceRoleName() {
354         return sourceRoleName;
355     }
356 
357 	/**
358      * <!-- begin-user-doc -->
359 	 * <!-- end-user-doc -->
360      * @generated
361      */
362 	public void setSourceRoleName(String newSourceRoleName) {
363         String oldSourceRoleName = sourceRoleName;
364         sourceRoleName = newSourceRoleName;
365         if (eNotificationRequired())
366             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__SOURCE_ROLE_NAME, oldSourceRoleName, sourceRoleName));
367     }
368 
369 	/**
370      * <!-- begin-user-doc -->
371 	 * <!-- end-user-doc -->
372      * @generated
373      */
374 	public Multiplicity getSourceMultiplicity() {
375         return sourceMultiplicity;
376     }
377 
378 	/**
379      * <!-- begin-user-doc -->
380 	 * <!-- end-user-doc -->
381      * @generated
382      */
383 	public void setSourceMultiplicity(Multiplicity newSourceMultiplicity) {
384         Multiplicity oldSourceMultiplicity = sourceMultiplicity;
385         sourceMultiplicity = newSourceMultiplicity == null ? SOURCE_MULTIPLICITY_EDEFAULT : newSourceMultiplicity;
386         if (eNotificationRequired())
387             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__SOURCE_MULTIPLICITY, oldSourceMultiplicity, sourceMultiplicity));
388     }
389 
390 	/**
391      * <!-- begin-user-doc -->
392 	 * <!-- end-user-doc -->
393      * @generated
394      */
395 	public String getTargetRoleName() {
396         return targetRoleName;
397     }
398 
399 	/**
400      * <!-- begin-user-doc -->
401 	 * <!-- end-user-doc -->
402      * @generated
403      */
404 	public void setTargetRoleName(String newTargetRoleName) {
405         String oldTargetRoleName = targetRoleName;
406         targetRoleName = newTargetRoleName;
407         if (eNotificationRequired())
408             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__TARGET_ROLE_NAME, oldTargetRoleName, targetRoleName));
409     }
410 
411 	/**
412      * <!-- begin-user-doc -->
413 	 * <!-- end-user-doc -->
414      * @generated
415      */
416 	public Multiplicity getTargetMultiplicity() {
417         return targetMultiplicity;
418     }
419 
420 	/**
421      * <!-- begin-user-doc -->
422 	 * <!-- end-user-doc -->
423      * @generated
424      */
425 	public void setTargetMultiplicity(Multiplicity newTargetMultiplicity) {
426         Multiplicity oldTargetMultiplicity = targetMultiplicity;
427         targetMultiplicity = newTargetMultiplicity == null ? TARGET_MULTIPLICITY_EDEFAULT : newTargetMultiplicity;
428         if (eNotificationRequired())
429             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__TARGET_MULTIPLICITY, oldTargetMultiplicity, targetMultiplicity));
430     }
431 
432 	/**
433      * <!-- begin-user-doc -->
434 	 * <!-- end-user-doc -->
435      * @generated
436      */
437 	public boolean isComposite() {
438         return composite;
439     }
440 
441 	/**
442      * <!-- begin-user-doc -->
443 	 * <!-- end-user-doc -->
444      * @generated
445      */
446 	public void setComposite(boolean newComposite) {
447         boolean oldComposite = composite;
448         composite = newComposite;
449         if (eNotificationRequired())
450             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__COMPOSITE, oldComposite, composite));
451     }
452 
453 	/**
454      * <!-- begin-user-doc -->
455 	 * <!-- end-user-doc -->
456      * @generated
457      */
458 	public boolean isBidirectional() {
459         return bidirectional;
460     }
461 
462 	/**
463      * <!-- begin-user-doc -->
464 	 * <!-- end-user-doc -->
465      * @generated
466      */
467 	public void setBidirectional(boolean newBidirectional) {
468         boolean oldBidirectional = bidirectional;
469         bidirectional = newBidirectional;
470         if (eNotificationRequired())
471             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__BIDIRECTIONAL, oldBidirectional, bidirectional));
472     }
473 
474 	/**
475      * <!-- begin-user-doc -->
476 	 * <!-- end-user-doc -->
477      * @generated
478      */
479 	public boolean isOrdered() {
480         return ordered;
481     }
482 
483 	/**
484      * <!-- begin-user-doc -->
485 	 * <!-- end-user-doc -->
486      * @generated
487      */
488 	public void setOrdered(boolean newOrdered) {
489         boolean oldOrdered = ordered;
490         ordered = newOrdered;
491         if (eNotificationRequired())
492             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__ORDERED, oldOrdered, ordered));
493     }
494 
495 	/**
496      * <!-- begin-user-doc -->
497 	 * <!-- end-user-doc -->
498      * @generated
499      */
500 	public BusinessDomainModel getModel() {
501         if (eContainerFeatureID() != BusinessDomainDslPackage.ASSOCIATION__MODEL) return null;
502         return (BusinessDomainModel)eContainer();
503     }
504 
505 	/**
506      * <!-- begin-user-doc -->
507 	 * <!-- end-user-doc -->
508      * @generated
509      */
510 	public NotificationChain basicSetModel(BusinessDomainModel newModel, NotificationChain msgs) {
511         msgs = eBasicSetContainer((InternalEObject)newModel, BusinessDomainDslPackage.ASSOCIATION__MODEL, msgs);
512         return msgs;
513     }
514 
515 	/**
516      * <!-- begin-user-doc -->
517 	 * <!-- end-user-doc -->
518      * @generated
519      */
520 	public void setModel(BusinessDomainModel newModel) {
521         if (newModel != eInternalContainer() || (eContainerFeatureID() != BusinessDomainDslPackage.ASSOCIATION__MODEL && newModel != null)) {
522             if (EcoreUtil.isAncestor(this, newModel))
523                 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
524             NotificationChain msgs = null;
525             if (eInternalContainer() != null)
526                 msgs = eBasicRemoveFromContainer(msgs);
527             if (newModel != null)
528                 msgs = ((InternalEObject)newModel).eInverseAdd(this, BusinessDomainDslPackage.BUSINESS_DOMAIN_MODEL__ASSOCIATIONS, BusinessDomainModel.class, msgs);
529             msgs = basicSetModel(newModel, msgs);
530             if (msgs != null) msgs.dispatch();
531         }
532         else if (eNotificationRequired())
533             eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.ASSOCIATION__MODEL, newModel, newModel));
534     }
535 
536 	/**
537      * <!-- begin-user-doc -->
538 	 * <!-- end-user-doc -->
539      * @generated
540      */
541 	@Override
542 	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
543         switch (featureID) {
544             case BusinessDomainDslPackage.ASSOCIATION__SOURCE:
545                 if (source != null)
546                     msgs = ((InternalEObject)source).eInverseRemove(this, BusinessDomainDslPackage.BUSINESS_CLASS__ASSOCIATIONS_TO, BusinessClass.class, msgs);
547                 return basicSetSource((BusinessClass)otherEnd, msgs);
548             case BusinessDomainDslPackage.ASSOCIATION__TARGET:
549                 if (target != null)
550                     msgs = ((InternalEObject)target).eInverseRemove(this, BusinessDomainDslPackage.ABSTRACT_BUSINESS_CLASS__ASSOCIATIONS_FROM, AbstractBusinessClass.class, msgs);
551                 return basicSetTarget((AbstractBusinessClass)otherEnd, msgs);
552             case BusinessDomainDslPackage.ASSOCIATION__MODEL:
553                 if (eInternalContainer() != null)
554                     msgs = eBasicRemoveFromContainer(msgs);
555                 return basicSetModel((BusinessDomainModel)otherEnd, msgs);
556         }
557         return super.eInverseAdd(otherEnd, featureID, msgs);
558     }
559 
560 	/**
561      * <!-- begin-user-doc -->
562 	 * <!-- end-user-doc -->
563      * @generated
564      */
565 	@Override
566 	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
567         switch (featureID) {
568             case BusinessDomainDslPackage.ASSOCIATION__SOURCE:
569                 return basicSetSource(null, msgs);
570             case BusinessDomainDslPackage.ASSOCIATION__TARGET:
571                 return basicSetTarget(null, msgs);
572             case BusinessDomainDslPackage.ASSOCIATION__MODEL:
573                 return basicSetModel(null, msgs);
574         }
575         return super.eInverseRemove(otherEnd, featureID, msgs);
576     }
577 
578 	/**
579      * <!-- begin-user-doc -->
580 	 * <!-- end-user-doc -->
581      * @generated
582      */
583 	@Override
584 	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
585         switch (eContainerFeatureID()) {
586             case BusinessDomainDslPackage.ASSOCIATION__MODEL:
587                 return eInternalContainer().eInverseRemove(this, BusinessDomainDslPackage.BUSINESS_DOMAIN_MODEL__ASSOCIATIONS, BusinessDomainModel.class, msgs);
588         }
589         return super.eBasicRemoveFromContainerFeature(msgs);
590     }
591 
592 	/**
593      * <!-- begin-user-doc -->
594 	 * <!-- end-user-doc -->
595      * @generated
596      */
597 	@Override
598 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
599         switch (featureID) {
600             case BusinessDomainDslPackage.ASSOCIATION__SOURCE:
601                 if (resolve) return getSource();
602                 return basicGetSource();
603             case BusinessDomainDslPackage.ASSOCIATION__TARGET:
604                 if (resolve) return getTarget();
605                 return basicGetTarget();
606             case BusinessDomainDslPackage.ASSOCIATION__SOURCE_ROLE_NAME:
607                 return getSourceRoleName();
608             case BusinessDomainDslPackage.ASSOCIATION__SOURCE_MULTIPLICITY:
609                 return getSourceMultiplicity();
610             case BusinessDomainDslPackage.ASSOCIATION__TARGET_ROLE_NAME:
611                 return getTargetRoleName();
612             case BusinessDomainDslPackage.ASSOCIATION__TARGET_MULTIPLICITY:
613                 return getTargetMultiplicity();
614             case BusinessDomainDslPackage.ASSOCIATION__COMPOSITE:
615                 return isComposite();
616             case BusinessDomainDslPackage.ASSOCIATION__BIDIRECTIONAL:
617                 return isBidirectional();
618             case BusinessDomainDslPackage.ASSOCIATION__ORDERED:
619                 return isOrdered();
620             case BusinessDomainDslPackage.ASSOCIATION__MODEL:
621                 return getModel();
622         }
623         return super.eGet(featureID, resolve, coreType);
624     }
625 
626 	/**
627      * <!-- begin-user-doc -->
628 	 * <!-- end-user-doc -->
629      * @generated
630      */
631 	@Override
632 	public void eSet(int featureID, Object newValue) {
633         switch (featureID) {
634             case BusinessDomainDslPackage.ASSOCIATION__SOURCE:
635                 setSource((BusinessClass)newValue);
636                 return;
637             case BusinessDomainDslPackage.ASSOCIATION__TARGET:
638                 setTarget((AbstractBusinessClass)newValue);
639                 return;
640             case BusinessDomainDslPackage.ASSOCIATION__SOURCE_ROLE_NAME:
641                 setSourceRoleName((String)newValue);
642                 return;
643             case BusinessDomainDslPackage.ASSOCIATION__SOURCE_MULTIPLICITY:
644                 setSourceMultiplicity((Multiplicity)newValue);
645                 return;
646             case BusinessDomainDslPackage.ASSOCIATION__TARGET_ROLE_NAME:
647                 setTargetRoleName((String)newValue);
648                 return;
649             case BusinessDomainDslPackage.ASSOCIATION__TARGET_MULTIPLICITY:
650                 setTargetMultiplicity((Multiplicity)newValue);
651                 return;
652             case BusinessDomainDslPackage.ASSOCIATION__COMPOSITE:
653                 setComposite((Boolean)newValue);
654                 return;
655             case BusinessDomainDslPackage.ASSOCIATION__BIDIRECTIONAL:
656                 setBidirectional((Boolean)newValue);
657                 return;
658             case BusinessDomainDslPackage.ASSOCIATION__ORDERED:
659                 setOrdered((Boolean)newValue);
660                 return;
661             case BusinessDomainDslPackage.ASSOCIATION__MODEL:
662                 setModel((BusinessDomainModel)newValue);
663                 return;
664         }
665         super.eSet(featureID, newValue);
666     }
667 
668 	/**
669      * <!-- begin-user-doc -->
670 	 * <!-- end-user-doc -->
671      * @generated
672      */
673 	@Override
674 	public void eUnset(int featureID) {
675         switch (featureID) {
676             case BusinessDomainDslPackage.ASSOCIATION__SOURCE:
677                 setSource((BusinessClass)null);
678                 return;
679             case BusinessDomainDslPackage.ASSOCIATION__TARGET:
680                 setTarget((AbstractBusinessClass)null);
681                 return;
682             case BusinessDomainDslPackage.ASSOCIATION__SOURCE_ROLE_NAME:
683                 setSourceRoleName(SOURCE_ROLE_NAME_EDEFAULT);
684                 return;
685             case BusinessDomainDslPackage.ASSOCIATION__SOURCE_MULTIPLICITY:
686                 setSourceMultiplicity(SOURCE_MULTIPLICITY_EDEFAULT);
687                 return;
688             case BusinessDomainDslPackage.ASSOCIATION__TARGET_ROLE_NAME:
689                 setTargetRoleName(TARGET_ROLE_NAME_EDEFAULT);
690                 return;
691             case BusinessDomainDslPackage.ASSOCIATION__TARGET_MULTIPLICITY:
692                 setTargetMultiplicity(TARGET_MULTIPLICITY_EDEFAULT);
693                 return;
694             case BusinessDomainDslPackage.ASSOCIATION__COMPOSITE:
695                 setComposite(COMPOSITE_EDEFAULT);
696                 return;
697             case BusinessDomainDslPackage.ASSOCIATION__BIDIRECTIONAL:
698                 setBidirectional(BIDIRECTIONAL_EDEFAULT);
699                 return;
700             case BusinessDomainDslPackage.ASSOCIATION__ORDERED:
701                 setOrdered(ORDERED_EDEFAULT);
702                 return;
703             case BusinessDomainDslPackage.ASSOCIATION__MODEL:
704                 setModel((BusinessDomainModel)null);
705                 return;
706         }
707         super.eUnset(featureID);
708     }
709 
710 	/**
711      * <!-- begin-user-doc -->
712 	 * <!-- end-user-doc -->
713      * @generated
714      */
715 	@Override
716 	public boolean eIsSet(int featureID) {
717         switch (featureID) {
718             case BusinessDomainDslPackage.ASSOCIATION__SOURCE:
719                 return source != null;
720             case BusinessDomainDslPackage.ASSOCIATION__TARGET:
721                 return target != null;
722             case BusinessDomainDslPackage.ASSOCIATION__SOURCE_ROLE_NAME:
723                 return SOURCE_ROLE_NAME_EDEFAULT == null ? sourceRoleName != null : !SOURCE_ROLE_NAME_EDEFAULT.equals(sourceRoleName);
724             case BusinessDomainDslPackage.ASSOCIATION__SOURCE_MULTIPLICITY:
725                 return sourceMultiplicity != SOURCE_MULTIPLICITY_EDEFAULT;
726             case BusinessDomainDslPackage.ASSOCIATION__TARGET_ROLE_NAME:
727                 return TARGET_ROLE_NAME_EDEFAULT == null ? targetRoleName != null : !TARGET_ROLE_NAME_EDEFAULT.equals(targetRoleName);
728             case BusinessDomainDslPackage.ASSOCIATION__TARGET_MULTIPLICITY:
729                 return targetMultiplicity != TARGET_MULTIPLICITY_EDEFAULT;
730             case BusinessDomainDslPackage.ASSOCIATION__COMPOSITE:
731                 return composite != COMPOSITE_EDEFAULT;
732             case BusinessDomainDslPackage.ASSOCIATION__BIDIRECTIONAL:
733                 return bidirectional != BIDIRECTIONAL_EDEFAULT;
734             case BusinessDomainDslPackage.ASSOCIATION__ORDERED:
735                 return ordered != ORDERED_EDEFAULT;
736             case BusinessDomainDslPackage.ASSOCIATION__MODEL:
737                 return getModel() != null;
738         }
739         return super.eIsSet(featureID);
740     }
741 
742 	/**
743      * <!-- begin-user-doc -->
744 	 * <!-- end-user-doc -->
745      * @generated
746      */
747 	@Override
748 	public String toString() {
749         if (eIsProxy()) return super.toString();
750 
751         StringBuffer result = new StringBuffer(super.toString());
752         result.append(" (sourceRoleName: ");
753         result.append(sourceRoleName);
754         result.append(", sourceMultiplicity: ");
755         result.append(sourceMultiplicity);
756         result.append(", targetRoleName: ");
757         result.append(targetRoleName);
758         result.append(", targetMultiplicity: ");
759         result.append(targetMultiplicity);
760         result.append(", composite: ");
761         result.append(composite);
762         result.append(", bidirectional: ");
763         result.append(bidirectional);
764         result.append(", ordered: ");
765         result.append(ordered);
766         result.append(')');
767         return result.toString();
768     }
769 
770 } //AssociationImpl