/*- * ============LICENSE_START========================================== * OPENECOMP - DCAE * =================================================================== * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * 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. * ============LICENSE_END============================================ */ /** */ package org.openecomp.ncomp.docker.impl; import org.openecomp.ncomp.docker.DockerActor; import org.openecomp.ncomp.docker.DockerActorAttributes; import org.openecomp.ncomp.docker.DockerPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; /** * * An implementation of the model object 'Actor'. * *

* The following features are implemented: *

*

* * @generated */ public class DockerActorImpl extends MinimalEObjectImpl.Container implements DockerActor { /** * The default value of the '{@link #getId() Id}' attribute. * * * @see #getId() * @generated * @ordered */ protected static final String ID_EDEFAULT = null; /** * The cached value of the '{@link #getId() Id}' attribute. * * * @see #getId() * @generated * @ordered */ protected String id = ID_EDEFAULT; /** * The cached value of the '{@link #getAttributes() Attributes}' containment reference. * * * @see #getAttributes() * @generated * @ordered */ protected DockerActorAttributes attributes; /** * * * @generated */ protected DockerActorImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DockerPackage.Literals.DOCKER_ACTOR; } /** * * * @generated */ public String getId() { return id; } /** * * * @generated */ public void setId(String newId) { String oldId = id; id = newId; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_ACTOR__ID, oldId, id)); } /** * * * @generated */ public DockerActorAttributes getAttributes() { return attributes; } /** * * * @generated */ public NotificationChain basicSetAttributes(DockerActorAttributes newAttributes, NotificationChain msgs) { DockerActorAttributes oldAttributes = attributes; attributes = newAttributes; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_ACTOR__ATTRIBUTES, oldAttributes, newAttributes); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setAttributes(DockerActorAttributes newAttributes) { if (newAttributes != attributes) { NotificationChain msgs = null; if (attributes != null) msgs = ((InternalEObject)attributes).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DockerPackage.DOCKER_ACTOR__ATTRIBUTES, null, msgs); if (newAttributes != null) msgs = ((InternalEObject)newAttributes).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DockerPackage.DOCKER_ACTOR__ATTRIBUTES, null, msgs); msgs = basicSetAttributes(newAttributes, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_ACTOR__ATTRIBUTES, newAttributes, newAttributes)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DockerPackage.DOCKER_ACTOR__ATTRIBUTES: return basicSetAttributes(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DockerPackage.DOCKER_ACTOR__ID: return getId(); case DockerPackage.DOCKER_ACTOR__ATTRIBUTES: return getAttributes(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DockerPackage.DOCKER_ACTOR__ID: setId((String)newValue); return; case DockerPackage.DOCKER_ACTOR__ATTRIBUTES: setAttributes((DockerActorAttributes)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DockerPackage.DOCKER_ACTOR__ID: setId(ID_EDEFAULT); return; case DockerPackage.DOCKER_ACTOR__ATTRIBUTES: setAttributes((DockerActorAttributes)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DockerPackage.DOCKER_ACTOR__ID: return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); case DockerPackage.DOCKER_ACTOR__ATTRIBUTES: return attributes != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (id: "); result.append(id); result.append(')'); return result.toString(); } } //DockerActorImpl