Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java')
-rw-r--r--tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java185
1 files changed, 185 insertions, 0 deletions
diff --git a/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java
new file mode 100644
index 000000000..567328f08
--- /dev/null
+++ b/tutorial/org.eclipse.emf.examples.library/src/org/eclipse/emf/examples/extlibrary/impl/BorrowerImpl.java
@@ -0,0 +1,185 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.emf.examples.extlibrary.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.emf.examples.extlibrary.Borrower;
+import org.eclipse.emf.examples.extlibrary.EXTLibraryPackage;
+import org.eclipse.emf.examples.extlibrary.Lendable;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Borrower</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.examples.extlibrary.impl.BorrowerImpl#getBorrowed <em>Borrowed</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BorrowerImpl extends PersonImpl implements Borrower
+{
+ /**
+ * The cached value of the '{@link #getBorrowed() <em>Borrowed</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBorrowed()
+ * @generated
+ * @ordered
+ */
+ protected EList<Lendable> borrowed;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BorrowerImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return EXTLibraryPackage.Literals.BORROWER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Lendable> getBorrowed()
+ {
+ if (borrowed == null) {
+ borrowed = new EObjectWithInverseResolvingEList.ManyInverse<Lendable>(Lendable.class, this, EXTLibraryPackage.BORROWER__BORROWED, EXTLibraryPackage.LENDABLE__BORROWERS);
+ }
+ return borrowed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBorrowed()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ return ((InternalEList<?>)getBorrowed()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ return getBorrowed();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ getBorrowed().clear();
+ getBorrowed().addAll((Collection<? extends Lendable>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ getBorrowed().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID) {
+ case EXTLibraryPackage.BORROWER__BORROWED:
+ return borrowed != null && !borrowed.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //BorrowerImpl

Back to the top