3 package org.opendaylight.nemo.tool.eclipse.plugin.editor.impl;
5 import java.util.Collection;
7 import org.eclipse.emf.common.util.EList;
9 import org.eclipse.emf.ecore.EClass;
11 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
13 import org.opendaylight.nemo.tool.eclipse.plugin.editor.Connection;
14 import org.opendaylight.nemo.tool.eclipse.plugin.editor.ConnectionUpdate;
15 import org.opendaylight.nemo.tool.eclipse.plugin.editor.EditorPackage;
16 import org.opendaylight.nemo.tool.eclipse.plugin.editor.Node;
19 * <!-- begin-user-doc -->
20 * An implementation of the model object '<em><b>Connection Update</b></em>'.
21 * <!-- end-user-doc -->
23 * The following features are implemented:
26 * <li>{@link org.opendaylight.nemo.tool.eclipse.plugin.editor.impl.ConnectionUpdateImpl#getConnectionname <em>Connectionname</em>}</li>
27 * <li>{@link org.opendaylight.nemo.tool.eclipse.plugin.editor.impl.ConnectionUpdateImpl#getEndnode <em>Endnode</em>}</li>
32 public class ConnectionUpdateImpl extends SentenceImpl implements ConnectionUpdate
35 * The cached value of the '{@link #getConnectionname() <em>Connectionname</em>}' reference list.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @see #getConnectionname()
42 protected EList<Connection> connectionname;
45 * The cached value of the '{@link #getEndnode() <em>Endnode</em>}' reference list.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
52 protected EList<Node> endnode;
55 * <!-- begin-user-doc -->
56 * <!-- end-user-doc -->
59 protected ConnectionUpdateImpl()
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
70 protected EClass eStaticClass()
72 return EditorPackage.Literals.CONNECTION_UPDATE;
76 * <!-- begin-user-doc -->
77 * <!-- end-user-doc -->
80 public EList<Connection> getConnectionname()
82 if (connectionname == null)
84 connectionname = new EObjectResolvingEList<Connection>(Connection.class, this, EditorPackage.CONNECTION_UPDATE__CONNECTIONNAME);
86 return connectionname;
90 * <!-- begin-user-doc -->
91 * <!-- end-user-doc -->
94 public EList<Node> getEndnode()
98 endnode = new EObjectResolvingEList<Node>(Node.class, this, EditorPackage.CONNECTION_UPDATE__ENDNODE);
104 * <!-- begin-user-doc -->
105 * <!-- end-user-doc -->
109 public Object eGet(int featureID, boolean resolve, boolean coreType)
113 case EditorPackage.CONNECTION_UPDATE__CONNECTIONNAME:
114 return getConnectionname();
115 case EditorPackage.CONNECTION_UPDATE__ENDNODE:
118 return super.eGet(featureID, resolve, coreType);
122 * <!-- begin-user-doc -->
123 * <!-- end-user-doc -->
126 @SuppressWarnings("unchecked")
128 public void eSet(int featureID, Object newValue)
132 case EditorPackage.CONNECTION_UPDATE__CONNECTIONNAME:
133 getConnectionname().clear();
134 getConnectionname().addAll((Collection<? extends Connection>)newValue);
136 case EditorPackage.CONNECTION_UPDATE__ENDNODE:
137 getEndnode().clear();
138 getEndnode().addAll((Collection<? extends Node>)newValue);
141 super.eSet(featureID, newValue);
145 * <!-- begin-user-doc -->
146 * <!-- end-user-doc -->
150 public void eUnset(int featureID)
154 case EditorPackage.CONNECTION_UPDATE__CONNECTIONNAME:
155 getConnectionname().clear();
157 case EditorPackage.CONNECTION_UPDATE__ENDNODE:
158 getEndnode().clear();
161 super.eUnset(featureID);
165 * <!-- begin-user-doc -->
166 * <!-- end-user-doc -->
170 public boolean eIsSet(int featureID)
174 case EditorPackage.CONNECTION_UPDATE__CONNECTIONNAME:
175 return connectionname != null && !connectionname.isEmpty();
176 case EditorPackage.CONNECTION_UPDATE__ENDNODE:
177 return endnode != null && !endnode.isEmpty();
179 return super.eIsSet(featureID);
182 } //ConnectionUpdateImpl