From cac4875681856a76718ebe3a3ddffcebcafb0791 Mon Sep 17 00:00:00 2001
From: Kyrill Zotkin <143617+kyrillzotkin@users.noreply.github.com>
Date: Sun, 6 Oct 2024 19:58:02 +0700
Subject: [PATCH] Add sought for
Signed-off-by: Kyrill Zotkin <143617+kyrillzotkin@users.noreply.github.com>
---
.../StageQualifierToWorkersMapEntryImpl.java | 279 ++++++++++++++++++
1 file changed, 279 insertions(+)
create mode 100644 bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToWorkersMapEntryImpl.java
diff --git a/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToWorkersMapEntryImpl.java b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToWorkersMapEntryImpl.java
new file mode 100644
index 00000000..56f4d954
--- /dev/null
+++ b/bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/impl/StageQualifierToWorkersMapEntryImpl.java
@@ -0,0 +1,279 @@
+/**
+ * Copyright 2023 Kyrill Zotkin
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.enterprisedomain.classmaker.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEMap;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectEList;
+import org.enterprisedomain.classmaker.ClassMakerPackage;
+import org.enterprisedomain.classmaker.StageQualifier;
+import org.enterprisedomain.classmaker.jobs.Worker;
+
+/**
+ * An implementation of the model object 'Stage
+ * Qualifier To Workers Map Entry'.
+ *
+ * The following features are implemented:
+ *
+ *
+ * - {@link org.enterprisedomain.classmaker.impl.StageQualifierToWorkersMapEntryImpl#getTypedKey Key}
+ * - {@link org.enterprisedomain.classmaker.impl.StageQualifierToWorkersMapEntryImpl#getTypedValue Value}
+ *
+ *
+ * @generated
+ */
+public class StageQualifierToWorkersMapEntryImpl extends EObjectImpl
+ implements BasicEMap.Entry> {
+ /**
+ * The cached value of the '{@link #getTypedKey() Key}' reference.
+ *
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected StageQualifier key;
+
+ /**
+ * The cached value of the '{@link #getTypedValue() Value}' reference list.
+ *
+ * @see #getTypedValue()
+ * @generated
+ * @ordered
+ */
+ protected EList value;
+
+ /**
+ *
+ * @generated
+ */
+ protected StageQualifierToWorkersMapEntryImpl() {
+ super();
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ClassMakerPackage.Literals.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY;
+ }
+
+ /**
+ *
+ * @generated
+ */
+ public StageQualifier getTypedKey() {
+ if (key != null && key.eIsProxy()) {
+ InternalEObject oldKey = (InternalEObject) key;
+ key = (StageQualifier) eResolveProxy(oldKey);
+ if (key != oldKey) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY, oldKey, key));
+ }
+ }
+ return key;
+ }
+
+ /**
+ *
+ * @generated
+ */
+ public StageQualifier basicGetTypedKey() {
+ return key;
+ }
+
+ /**
+ *
+ * @generated
+ */
+ public void setTypedKey(StageQualifier newKey) {
+ StageQualifier oldKey = key;
+ key = newKey;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY, oldKey, key));
+ }
+
+ /**
+ *
+ * @generated
+ */
+ public EList getTypedValue() {
+ if (value == null) {
+ value = new EObjectEList(Worker.class, this,
+ ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE);
+ }
+ return value;
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY:
+ if (resolve)
+ return getTypedKey();
+ return basicGetTypedKey();
+ case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE:
+ return getTypedValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY:
+ setTypedKey((StageQualifier) newValue);
+ return;
+ case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE:
+ getTypedValue().clear();
+ getTypedValue().addAll((Collection extends Worker>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY:
+ setTypedKey((StageQualifier) null);
+ return;
+ case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE:
+ getTypedValue().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__KEY:
+ return key != null;
+ case ClassMakerPackage.STAGE_QUALIFIER_TO_WORKERS_MAP_ENTRY__VALUE:
+ return value != null && !value.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ * @generated
+ */
+ protected int hash = -1;
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public int getHash() {
+ if (hash == -1) {
+ Object theKey = getKey();
+ hash = (theKey == null ? 0 : theKey.hashCode());
+ }
+ return hash;
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public void setHash(int hash) {
+ this.hash = hash;
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public StageQualifier getKey() {
+ return getTypedKey();
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public void setKey(StageQualifier key) {
+ setTypedKey(key);
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public EList getValue() {
+ return getTypedValue();
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @Override
+ public EList setValue(EList value) {
+ EList oldValue = getValue();
+ getTypedValue().clear();
+ getTypedValue().addAll(value);
+ return oldValue;
+ }
+
+ /**
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EMap> getEMap() {
+ EObject container = eContainer();
+ return container == null ? null : (EMap>) container.eGet(eContainmentFeature());
+ }
+
+} // StageQualifierToWorkersMapEntryImpl