/*- * ============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.core.impl.NamedEntityImpl; import org.openecomp.ncomp.docker.DockerActor; import org.openecomp.ncomp.docker.DockerEvents; 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; /** * * An implementation of the model object 'Events'. * *

* The following features are implemented: *

* * * @generated */ public class DockerEventsImpl extends NamedEntityImpl implements DockerEvents { /** * The default value of the '{@link #getStatus() Status}' attribute. * * * @see #getStatus() * @generated * @ordered */ protected static final String STATUS_EDEFAULT = null; /** * The cached value of the '{@link #getStatus() Status}' attribute. * * * @see #getStatus() * @generated * @ordered */ protected String status = STATUS_EDEFAULT; /** * 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 default value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected static final String TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getType() Type}' attribute. * * * @see #getType() * @generated * @ordered */ protected String type = TYPE_EDEFAULT; /** * The default value of the '{@link #getAction() Action}' attribute. * * * @see #getAction() * @generated * @ordered */ protected static final String ACTION_EDEFAULT = null; /** * The cached value of the '{@link #getAction() Action}' attribute. * * * @see #getAction() * @generated * @ordered */ protected String action = ACTION_EDEFAULT; /** * The cached value of the '{@link #getActor() Actor}' containment reference. * * * @see #getActor() * @generated * @ordered */ protected DockerActor actor; /** * The default value of the '{@link #getTime() Time}' attribute. * * * @see #getTime() * @generated * @ordered */ protected static final int TIME_EDEFAULT = 0; /** * The cached value of the '{@link #getTime() Time}' attribute. * * * @see #getTime() * @generated * @ordered */ protected int time = TIME_EDEFAULT; /** * The default value of the '{@link #getTimenano() Timenano}' attribute. * * * @see #getTimenano() * @generated * @ordered */ protected static final long TIMENANO_EDEFAULT = 0L; /** * The cached value of the '{@link #getTimenano() Timenano}' attribute. * * * @see #getTimenano() * @generated * @ordered */ protected long timenano = TIMENANO_EDEFAULT; /** * * * @generated */ protected DockerEventsImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DockerPackage.Literals.DOCKER_EVENTS; } /** * * * @generated */ public String getStatus() { return status; } /** * * * @generated */ public void setStatus(String newStatus) { String oldStatus = status; status = newStatus; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_EVENTS__STATUS, oldStatus, status)); } /** * * * @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_EVENTS__ID, oldId, id)); } /** * * * @generated */ public String getType() { return type; } /** * * * @generated */ public void setType(String newType) { String oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_EVENTS__TYPE, oldType, type)); } /** * * * @generated */ public String getAction() { return action; } /** * * * @generated */ public void setAction(String newAction) { String oldAction = action; action = newAction; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_EVENTS__ACTION, oldAction, action)); } /** * * * @generated */ public DockerActor getActor() { return actor; } /** * * * @generated */ public NotificationChain basicSetActor(DockerActor newActor, NotificationChain msgs) { DockerActor oldActor = actor; actor = newActor; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_EVENTS__ACTOR, oldActor, newActor); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setActor(DockerActor newActor) { if (newActor != actor) { NotificationChain msgs = null; if (actor != null) msgs = ((InternalEObject)actor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DockerPackage.DOCKER_EVENTS__ACTOR, null, msgs); if (newActor != null) msgs = ((InternalEObject)newActor).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DockerPackage.DOCKER_EVENTS__ACTOR, null, msgs); msgs = basicSetActor(newActor, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_EVENTS__ACTOR, newActor, newActor)); } /** * * * @generated */ public int getTime() { return time; } /** * * * @generated */ public void setTime(int newTime) { int oldTime = time; time = newTime; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_EVENTS__TIME, oldTime, time)); } /** * * * @generated */ public long getTimenano() { return timenano; } /** * * * @generated */ public void setTimenano(long newTimenano) { long oldTimenano = timenano; timenano = newTimenano; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.DOCKER_EVENTS__TIMENANO, oldTimenano, timenano)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DockerPackage.DOCKER_EVENTS__ACTOR: return basicSetActor(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DockerPackage.DOCKER_EVENTS__STATUS: return getStatus(); case DockerPackage.DOCKER_EVENTS__ID: return getId(); case DockerPackage.DOCKER_EVENTS__TYPE: return getType(); case DockerPackage.DOCKER_EVENTS__ACTION: return getAction(); case DockerPackage.DOCKER_EVENTS__ACTOR: return getActor(); case DockerPackage.DOCKER_EVENTS__TIME: return getTime(); case DockerPackage.DOCKER_EVENTS__TIMENANO: return getTimenano(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DockerPackage.DOCKER_EVENTS__STATUS: setStatus((String)newValue); return; case DockerPackage.DOCKER_EVENTS__ID: setId((String)newValue); return; case DockerPackage.DOCKER_EVENTS__TYPE: setType((String)newValue); return; case DockerPackage.DOCKER_EVENTS__ACTION: setAction((String)newValue); return; case DockerPackage.DOCKER_EVENTS__ACTOR: setActor((DockerActor)newValue); return; case DockerPackage.DOCKER_EVENTS__TIME: setTime((Integer)newValue); return; case DockerPackage.DOCKER_EVENTS__TIMENANO: setTimenano((Long)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DockerPackage.DOCKER_EVENTS__STATUS: setStatus(STATUS_EDEFAULT); return; case DockerPackage.DOCKER_EVENTS__ID: setId(ID_EDEFAULT); return; case DockerPackage.DOCKER_EVENTS__TYPE: setType(TYPE_EDEFAULT); return; case DockerPackage.DOCKER_EVENTS__ACTION: setAction(ACTION_EDEFAULT); return; case DockerPackage.DOCKER_EVENTS__ACTOR: setActor((DockerActor)null); return; case DockerPackage.DOCKER_EVENTS__TIME: setTime(TIME_EDEFAULT); return; case DockerPackage.DOCKER_EVENTS__TIMENANO: setTimenano(TIMENANO_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DockerPackage.DOCKER_EVENTS__STATUS: return STATUS_EDEFAULT == null ? status != null : !STATUS_EDEFAULT.equals(status); case DockerPackage.DOCKER_EVENTS__ID: return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); case DockerPackage.DOCKER_EVENTS__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); case DockerPackage.DOCKER_EVENTS__ACTION: return ACTION_EDEFAULT == null ? action != null : !ACTION_EDEFAULT.equals(action); case DockerPackage.DOCKER_EVENTS__ACTOR: return actor != null; case DockerPackage.DOCKER_EVENTS__TIME: return time != TIME_EDEFAULT; case DockerPackage.DOCKER_EVENTS__TIMENANO: return timenano != TIMENANO_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (status: "); result.append(status); result.append(", id: "); result.append(id); result.append(", type: "); result.append(type); result.append(", action: "); result.append(action); result.append(", time: "); result.append(time); result.append(", timenano: "); result.append(timenano); result.append(')'); return result.toString(); } } //DockerEventsImpl