001 /**
002 * <copyright>
003 * </copyright>
004 *
005 * $Id$
006 */
007 package com.hammurapi.eventbus.snapshot.impl;
008
009 import com.hammurapi.eventbus.snapshot.Event;
010 import com.hammurapi.eventbus.snapshot.JoinEntry;
011 import com.hammurapi.eventbus.snapshot.SnapshotPackage;
012
013 import java.util.Collection;
014
015 import org.eclipse.emf.common.notify.NotificationChain;
016 import org.eclipse.emf.common.util.EList;
017
018 import org.eclipse.emf.ecore.EClass;
019
020 import org.eclipse.emf.ecore.InternalEObject;
021 import org.eclipse.emf.ecore.impl.EObjectImpl;
022
023 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
024 import org.eclipse.emf.ecore.util.InternalEList;
025 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
026
027 /**
028 * <!-- begin-user-doc -->
029 * An implementation of the model object '<em><b>Join Entry</b></em>'.
030 * <!-- end-user-doc -->
031 * <p>
032 * The following features are implemented:
033 * <ul>
034 * <li>{@link com.hammurapi.eventbus.snapshot.impl.JoinEntryImpl#getEvents <em>Events</em>}</li>
035 * </ul>
036 * </p>
037 *
038 * @generated
039 */
040 public class JoinEntryImpl extends EObjectImpl implements JoinEntry {
041 /**
042 * The cached value of the '{@link #getEvents() <em>Events</em>}' reference list.
043 * <!-- begin-user-doc -->
044 * <!-- end-user-doc -->
045 * @see #getEvents()
046 * @generated
047 * @ordered
048 */
049 protected EList<Event> events;
050
051 /**
052 * <!-- begin-user-doc -->
053 * <!-- end-user-doc -->
054 * @generated
055 */
056 protected JoinEntryImpl() {
057 super();
058 }
059
060 /**
061 * <!-- begin-user-doc -->
062 * <!-- end-user-doc -->
063 * @generated
064 */
065 @Override
066 protected EClass eStaticClass() {
067 return SnapshotPackage.Literals.JOIN_ENTRY;
068 }
069
070 /**
071 * <!-- begin-user-doc -->
072 * <!-- end-user-doc -->
073 * @generated
074 */
075 public EList<Event> getEvents() {
076 if (events == null) {
077 events = new EObjectResolvingEList<Event>(Event.class, this, SnapshotPackage.JOIN_ENTRY__EVENTS);
078 }
079 return events;
080 }
081
082 /**
083 * <!-- begin-user-doc -->
084 * <!-- end-user-doc -->
085 * @generated
086 */
087 @Override
088 public Object eGet(int featureID, boolean resolve, boolean coreType) {
089 switch (featureID) {
090 case SnapshotPackage.JOIN_ENTRY__EVENTS:
091 return getEvents();
092 }
093 return super.eGet(featureID, resolve, coreType);
094 }
095
096 /**
097 * <!-- begin-user-doc -->
098 * <!-- end-user-doc -->
099 * @generated
100 */
101 @SuppressWarnings("unchecked")
102 @Override
103 public void eSet(int featureID, Object newValue) {
104 switch (featureID) {
105 case SnapshotPackage.JOIN_ENTRY__EVENTS:
106 getEvents().clear();
107 getEvents().addAll((Collection<? extends Event>)newValue);
108 return;
109 }
110 super.eSet(featureID, newValue);
111 }
112
113 /**
114 * <!-- begin-user-doc -->
115 * <!-- end-user-doc -->
116 * @generated
117 */
118 @Override
119 public void eUnset(int featureID) {
120 switch (featureID) {
121 case SnapshotPackage.JOIN_ENTRY__EVENTS:
122 getEvents().clear();
123 return;
124 }
125 super.eUnset(featureID);
126 }
127
128 /**
129 * <!-- begin-user-doc -->
130 * <!-- end-user-doc -->
131 * @generated
132 */
133 @Override
134 public boolean eIsSet(int featureID) {
135 switch (featureID) {
136 case SnapshotPackage.JOIN_ENTRY__EVENTS:
137 return events != null && !events.isEmpty();
138 }
139 return super.eIsSet(featureID);
140 }
141
142 } //JoinEntryImpl