EMMA Coverage Report (generated Thu Jan 20 11:39:44 EST 2011)
[all classes][com.hammurapi.eventbus.snapshot.impl]

COVERAGE SUMMARY FOR SOURCE FILE [HandlerImpl.java]

nameclass, %method, %block, %line, %
HandlerImpl.java100% (1/1)62%  (15/24)26%  (152/581)34%  (45.7/136)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class HandlerImpl100% (1/1)62%  (15/24)26%  (152/581)34%  (45.7/136)
eBasicRemoveFromContainerFeature (NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eInverseRemove (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/18)0%   (0/4)
eSet (int, Object): void 0%   (0/1)0%   (0/32)0%   (0/13)
eUnset (int): void 0%   (0/1)0%   (0/26)0%   (0/13)
getJoinNode (): JoinNode 0%   (0/1)0%   (0/38)0%   (0/7)
getSnapshot (): Snapshot 0%   (0/1)0%   (0/10)0%   (0/2)
setJoinNode (JoinNode): void 0%   (0/1)0%   (0/52)0%   (0/11)
setSnapshot (Snapshot): void 0%   (0/1)0%   (0/69)0%   (0/13)
toString (): String 0%   (0/1)0%   (0/46)0%   (0/10)
basicSetJoinNode (JoinNode, NotificationChain): NotificationChain 100% (1/1)38%  (11/29)67%  (4/6)
eIsSet (int): boolean 100% (1/1)45%  (33/74)47%  (3.3/7)
setDetails (String): void 100% (1/1)48%  (10/21)80%  (4/5)
setId (String): void 100% (1/1)48%  (10/21)80%  (4/5)
setName (String): void 100% (1/1)48%  (10/21)80%  (4/5)
eInverseAdd (InternalEObject, int, NotificationChain): NotificationChain 100% (1/1)51%  (20/39)62%  (5/8)
eGet (int, boolean, boolean): Object 100% (1/1)57%  (16/28)68%  (5.4/8)
<static initializer> 100% (1/1)100% (7/7)100% (4/4)
HandlerImpl (): void 100% (1/1)100% (12/12)100% (5/5)
basicGetJoinNode (): JoinNode 100% (1/1)100% (3/3)100% (1/1)
basicSetSnapshot (Snapshot, NotificationChain): NotificationChain 100% (1/1)100% (9/9)100% (2/2)
eStaticClass (): EClass 100% (1/1)100% (2/2)100% (1/1)
getDetails (): String 100% (1/1)100% (3/3)100% (1/1)
getId (): String 100% (1/1)100% (3/3)100% (1/1)
getName (): String 100% (1/1)100% (3/3)100% (1/1)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package com.hammurapi.eventbus.snapshot.impl;
8 
9import com.hammurapi.eventbus.snapshot.Handler;
10import com.hammurapi.eventbus.snapshot.JoinNode;
11import com.hammurapi.eventbus.snapshot.Snapshot;
12import com.hammurapi.eventbus.snapshot.SnapshotPackage;
13 
14import org.eclipse.emf.common.notify.Notification;
15 
16import org.eclipse.emf.common.notify.NotificationChain;
17import org.eclipse.emf.ecore.EClass;
18 
19import org.eclipse.emf.ecore.InternalEObject;
20import org.eclipse.emf.ecore.impl.ENotificationImpl;
21import org.eclipse.emf.ecore.impl.EObjectImpl;
22import org.eclipse.emf.ecore.util.EcoreUtil;
23 
24/**
25 * <!-- begin-user-doc -->
26 * An implementation of the model object '<em><b>Handler</b></em>'.
27 * <!-- end-user-doc -->
28 * <p>
29 * The following features are implemented:
30 * <ul>
31 *   <li>{@link com.hammurapi.eventbus.snapshot.impl.HandlerImpl#getId <em>Id</em>}</li>
32 *   <li>{@link com.hammurapi.eventbus.snapshot.impl.HandlerImpl#getName <em>Name</em>}</li>
33 *   <li>{@link com.hammurapi.eventbus.snapshot.impl.HandlerImpl#getDetails <em>Details</em>}</li>
34 *   <li>{@link com.hammurapi.eventbus.snapshot.impl.HandlerImpl#getSnapshot <em>Snapshot</em>}</li>
35 *   <li>{@link com.hammurapi.eventbus.snapshot.impl.HandlerImpl#getJoinNode <em>Join Node</em>}</li>
36 * </ul>
37 * </p>
38 *
39 * @generated
40 */
41public class HandlerImpl extends EObjectImpl implements Handler {
42        /**
43         * The default value of the '{@link #getId() <em>Id</em>}' attribute.
44         * <!-- begin-user-doc -->
45         * <!-- end-user-doc -->
46         * @see #getId()
47         * @generated
48         * @ordered
49         */
50        protected static final String ID_EDEFAULT = null;
51 
52        /**
53         * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
54         * <!-- begin-user-doc -->
55         * <!-- end-user-doc -->
56         * @see #getId()
57         * @generated
58         * @ordered
59         */
60        protected String id = ID_EDEFAULT;
61 
62        /**
63         * The default value of the '{@link #getName() <em>Name</em>}' attribute.
64         * <!-- begin-user-doc -->
65         * <!-- end-user-doc -->
66         * @see #getName()
67         * @generated
68         * @ordered
69         */
70        protected static final String NAME_EDEFAULT = null;
71 
72        /**
73         * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
74         * <!-- begin-user-doc -->
75         * <!-- end-user-doc -->
76         * @see #getName()
77         * @generated
78         * @ordered
79         */
80        protected String name = NAME_EDEFAULT;
81 
82        /**
83         * The default value of the '{@link #getDetails() <em>Details</em>}' attribute.
84         * <!-- begin-user-doc -->
85         * <!-- end-user-doc -->
86         * @see #getDetails()
87         * @generated
88         * @ordered
89         */
90        protected static final String DETAILS_EDEFAULT = null;
91 
92        /**
93         * The cached value of the '{@link #getDetails() <em>Details</em>}' attribute.
94         * <!-- begin-user-doc -->
95         * <!-- end-user-doc -->
96         * @see #getDetails()
97         * @generated
98         * @ordered
99         */
100        protected String details = DETAILS_EDEFAULT;
101 
102        /**
103         * The cached value of the '{@link #getJoinNode() <em>Join Node</em>}' reference.
104         * <!-- begin-user-doc -->
105         * <!-- end-user-doc -->
106         * @see #getJoinNode()
107         * @generated
108         * @ordered
109         */
110        protected JoinNode joinNode;
111 
112        /**
113         * <!-- begin-user-doc -->
114         * <!-- end-user-doc -->
115         * @generated
116         */
117        protected HandlerImpl() {
118                super();
119        }
120 
121        /**
122         * <!-- begin-user-doc -->
123         * <!-- end-user-doc -->
124         * @generated
125         */
126        @Override
127        protected EClass eStaticClass() {
128                return SnapshotPackage.Literals.HANDLER;
129        }
130 
131        /**
132         * <!-- begin-user-doc -->
133         * <!-- end-user-doc -->
134         * @generated
135         */
136        public String getId() {
137                return id;
138        }
139 
140        /**
141         * <!-- begin-user-doc -->
142         * <!-- end-user-doc -->
143         * @generated
144         */
145        public void setId(String newId) {
146                String oldId = id;
147                id = newId;
148                if (eNotificationRequired())
149                        eNotify(new ENotificationImpl(this, Notification.SET, SnapshotPackage.HANDLER__ID, oldId, id));
150        }
151 
152        /**
153         * <!-- begin-user-doc -->
154         * <!-- end-user-doc -->
155         * @generated
156         */
157        public String getName() {
158                return name;
159        }
160 
161        /**
162         * <!-- begin-user-doc -->
163         * <!-- end-user-doc -->
164         * @generated
165         */
166        public void setName(String newName) {
167                String oldName = name;
168                name = newName;
169                if (eNotificationRequired())
170                        eNotify(new ENotificationImpl(this, Notification.SET, SnapshotPackage.HANDLER__NAME, oldName, name));
171        }
172 
173        /**
174         * <!-- begin-user-doc -->
175         * <!-- end-user-doc -->
176         * @generated
177         */
178        public String getDetails() {
179                return details;
180        }
181 
182        /**
183         * <!-- begin-user-doc -->
184         * <!-- end-user-doc -->
185         * @generated
186         */
187        public void setDetails(String newDetails) {
188                String oldDetails = details;
189                details = newDetails;
190                if (eNotificationRequired())
191                        eNotify(new ENotificationImpl(this, Notification.SET, SnapshotPackage.HANDLER__DETAILS, oldDetails, details));
192        }
193 
194        /**
195         * <!-- begin-user-doc -->
196         * <!-- end-user-doc -->
197         * @generated
198         */
199        public Snapshot getSnapshot() {
200                if (eContainerFeatureID() != SnapshotPackage.HANDLER__SNAPSHOT) return null;
201                return (Snapshot)eContainer();
202        }
203 
204        /**
205         * <!-- begin-user-doc -->
206         * <!-- end-user-doc -->
207         * @generated
208         */
209        public NotificationChain basicSetSnapshot(Snapshot newSnapshot, NotificationChain msgs) {
210                msgs = eBasicSetContainer((InternalEObject)newSnapshot, SnapshotPackage.HANDLER__SNAPSHOT, msgs);
211                return msgs;
212        }
213 
214        /**
215         * <!-- begin-user-doc -->
216         * <!-- end-user-doc -->
217         * @generated
218         */
219        public void setSnapshot(Snapshot newSnapshot) {
220                if (newSnapshot != eInternalContainer() || (eContainerFeatureID() != SnapshotPackage.HANDLER__SNAPSHOT && newSnapshot != null)) {
221                        if (EcoreUtil.isAncestor(this, newSnapshot))
222                                throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
223                        NotificationChain msgs = null;
224                        if (eInternalContainer() != null)
225                                msgs = eBasicRemoveFromContainer(msgs);
226                        if (newSnapshot != null)
227                                msgs = ((InternalEObject)newSnapshot).eInverseAdd(this, SnapshotPackage.SNAPSHOT__ELEMENTS, Snapshot.class, msgs);
228                        msgs = basicSetSnapshot(newSnapshot, msgs);
229                        if (msgs != null) msgs.dispatch();
230                }
231                else if (eNotificationRequired())
232                        eNotify(new ENotificationImpl(this, Notification.SET, SnapshotPackage.HANDLER__SNAPSHOT, newSnapshot, newSnapshot));
233        }
234 
235        /**
236         * <!-- begin-user-doc -->
237         * <!-- end-user-doc -->
238         * @generated
239         */
240        public JoinNode getJoinNode() {
241                if (joinNode != null && joinNode.eIsProxy()) {
242                        InternalEObject oldJoinNode = (InternalEObject)joinNode;
243                        joinNode = (JoinNode)eResolveProxy(oldJoinNode);
244                        if (joinNode != oldJoinNode) {
245                                if (eNotificationRequired())
246                                        eNotify(new ENotificationImpl(this, Notification.RESOLVE, SnapshotPackage.HANDLER__JOIN_NODE, oldJoinNode, joinNode));
247                        }
248                }
249                return joinNode;
250        }
251 
252        /**
253         * <!-- begin-user-doc -->
254         * <!-- end-user-doc -->
255         * @generated
256         */
257        public JoinNode basicGetJoinNode() {
258                return joinNode;
259        }
260 
261        /**
262         * <!-- begin-user-doc -->
263         * <!-- end-user-doc -->
264         * @generated
265         */
266        public NotificationChain basicSetJoinNode(JoinNode newJoinNode, NotificationChain msgs) {
267                JoinNode oldJoinNode = joinNode;
268                joinNode = newJoinNode;
269                if (eNotificationRequired()) {
270                        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SnapshotPackage.HANDLER__JOIN_NODE, oldJoinNode, newJoinNode);
271                        if (msgs == null) msgs = notification; else msgs.add(notification);
272                }
273                return msgs;
274        }
275 
276        /**
277         * <!-- begin-user-doc -->
278         * <!-- end-user-doc -->
279         * @generated
280         */
281        public void setJoinNode(JoinNode newJoinNode) {
282                if (newJoinNode != joinNode) {
283                        NotificationChain msgs = null;
284                        if (joinNode != null)
285                                msgs = ((InternalEObject)joinNode).eInverseRemove(this, SnapshotPackage.JOIN_NODE__HANDLER, JoinNode.class, msgs);
286                        if (newJoinNode != null)
287                                msgs = ((InternalEObject)newJoinNode).eInverseAdd(this, SnapshotPackage.JOIN_NODE__HANDLER, JoinNode.class, msgs);
288                        msgs = basicSetJoinNode(newJoinNode, msgs);
289                        if (msgs != null) msgs.dispatch();
290                }
291                else if (eNotificationRequired())
292                        eNotify(new ENotificationImpl(this, Notification.SET, SnapshotPackage.HANDLER__JOIN_NODE, newJoinNode, newJoinNode));
293        }
294 
295        /**
296         * <!-- begin-user-doc -->
297         * <!-- end-user-doc -->
298         * @generated
299         */
300        @Override
301        public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
302                switch (featureID) {
303                        case SnapshotPackage.HANDLER__SNAPSHOT:
304                                if (eInternalContainer() != null)
305                                        msgs = eBasicRemoveFromContainer(msgs);
306                                return basicSetSnapshot((Snapshot)otherEnd, msgs);
307                        case SnapshotPackage.HANDLER__JOIN_NODE:
308                                if (joinNode != null)
309                                        msgs = ((InternalEObject)joinNode).eInverseRemove(this, SnapshotPackage.JOIN_NODE__HANDLER, JoinNode.class, msgs);
310                                return basicSetJoinNode((JoinNode)otherEnd, msgs);
311                }
312                return super.eInverseAdd(otherEnd, featureID, msgs);
313        }
314 
315        /**
316         * <!-- begin-user-doc -->
317         * <!-- end-user-doc -->
318         * @generated
319         */
320        @Override
321        public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
322                switch (featureID) {
323                        case SnapshotPackage.HANDLER__SNAPSHOT:
324                                return basicSetSnapshot(null, msgs);
325                        case SnapshotPackage.HANDLER__JOIN_NODE:
326                                return basicSetJoinNode(null, msgs);
327                }
328                return super.eInverseRemove(otherEnd, featureID, msgs);
329        }
330 
331        /**
332         * <!-- begin-user-doc -->
333         * <!-- end-user-doc -->
334         * @generated
335         */
336        @Override
337        public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
338                switch (eContainerFeatureID()) {
339                        case SnapshotPackage.HANDLER__SNAPSHOT:
340                                return eInternalContainer().eInverseRemove(this, SnapshotPackage.SNAPSHOT__ELEMENTS, Snapshot.class, msgs);
341                }
342                return super.eBasicRemoveFromContainerFeature(msgs);
343        }
344 
345        /**
346         * <!-- begin-user-doc -->
347         * <!-- end-user-doc -->
348         * @generated
349         */
350        @Override
351        public Object eGet(int featureID, boolean resolve, boolean coreType) {
352                switch (featureID) {
353                        case SnapshotPackage.HANDLER__ID:
354                                return getId();
355                        case SnapshotPackage.HANDLER__NAME:
356                                return getName();
357                        case SnapshotPackage.HANDLER__DETAILS:
358                                return getDetails();
359                        case SnapshotPackage.HANDLER__SNAPSHOT:
360                                return getSnapshot();
361                        case SnapshotPackage.HANDLER__JOIN_NODE:
362                                if (resolve) return getJoinNode();
363                                return basicGetJoinNode();
364                }
365                return super.eGet(featureID, resolve, coreType);
366        }
367 
368        /**
369         * <!-- begin-user-doc -->
370         * <!-- end-user-doc -->
371         * @generated
372         */
373        @Override
374        public void eSet(int featureID, Object newValue) {
375                switch (featureID) {
376                        case SnapshotPackage.HANDLER__ID:
377                                setId((String)newValue);
378                                return;
379                        case SnapshotPackage.HANDLER__NAME:
380                                setName((String)newValue);
381                                return;
382                        case SnapshotPackage.HANDLER__DETAILS:
383                                setDetails((String)newValue);
384                                return;
385                        case SnapshotPackage.HANDLER__SNAPSHOT:
386                                setSnapshot((Snapshot)newValue);
387                                return;
388                        case SnapshotPackage.HANDLER__JOIN_NODE:
389                                setJoinNode((JoinNode)newValue);
390                                return;
391                }
392                super.eSet(featureID, newValue);
393        }
394 
395        /**
396         * <!-- begin-user-doc -->
397         * <!-- end-user-doc -->
398         * @generated
399         */
400        @Override
401        public void eUnset(int featureID) {
402                switch (featureID) {
403                        case SnapshotPackage.HANDLER__ID:
404                                setId(ID_EDEFAULT);
405                                return;
406                        case SnapshotPackage.HANDLER__NAME:
407                                setName(NAME_EDEFAULT);
408                                return;
409                        case SnapshotPackage.HANDLER__DETAILS:
410                                setDetails(DETAILS_EDEFAULT);
411                                return;
412                        case SnapshotPackage.HANDLER__SNAPSHOT:
413                                setSnapshot((Snapshot)null);
414                                return;
415                        case SnapshotPackage.HANDLER__JOIN_NODE:
416                                setJoinNode((JoinNode)null);
417                                return;
418                }
419                super.eUnset(featureID);
420        }
421 
422        /**
423         * <!-- begin-user-doc -->
424         * <!-- end-user-doc -->
425         * @generated
426         */
427        @Override
428        public boolean eIsSet(int featureID) {
429                switch (featureID) {
430                        case SnapshotPackage.HANDLER__ID:
431                                return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
432                        case SnapshotPackage.HANDLER__NAME:
433                                return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
434                        case SnapshotPackage.HANDLER__DETAILS:
435                                return DETAILS_EDEFAULT == null ? details != null : !DETAILS_EDEFAULT.equals(details);
436                        case SnapshotPackage.HANDLER__SNAPSHOT:
437                                return getSnapshot() != null;
438                        case SnapshotPackage.HANDLER__JOIN_NODE:
439                                return joinNode != null;
440                }
441                return super.eIsSet(featureID);
442        }
443 
444        /**
445         * <!-- begin-user-doc -->
446         * <!-- end-user-doc -->
447         * @generated
448         */
449        @Override
450        public String toString() {
451                if (eIsProxy()) return super.toString();
452 
453                StringBuffer result = new StringBuffer(super.toString());
454                result.append(" (id: ");
455                result.append(id);
456                result.append(", name: ");
457                result.append(name);
458                result.append(", details: ");
459                result.append(details);
460                result.append(')');
461                return result.toString();
462        }
463 
464} //HandlerImpl

[all classes][com.hammurapi.eventbus.snapshot.impl]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov