/**
* <copyright> Copyright (c) 2008-2009 Jonas Helming, Maximilian Koegel. 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 </copyright>
*
*
*
*/
package org.eclipse.emf.emfstore.server.model.operation.impl;
import java.util.Map;
import java.util.HashMap;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.emfstore.server.model.operation.OperationPackage;
import org.eclipse.emf.emfstore.server.model.operation.SetOrgUnitPropertyOperation;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Set Org Unit Property Operation</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.emf.emfstore.server.model.operation.impl.SetOrgUnitPropertyOperationImpl#getProperties <em>Properties</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class SetOrgUnitPropertyOperationImpl extends OrgUnitOperationImpl<Void> implements SetOrgUnitPropertyOperation {
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected Map<String, String> properties;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SetOrgUnitPropertyOperationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return OperationPackage.Literals.SET_ORG_UNIT_PROPERTY_OPERATION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Map<String, String> getProperties() {
return properties;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setProperties(Map<String, String> newProperties) {
Map<String, String> oldProperties = properties;
properties = newProperties;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, OperationPackage.SET_ORG_UNIT_PROPERTY_OPERATION__PROPERTIES, oldProperties, properties));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case OperationPackage.SET_ORG_UNIT_PROPERTY_OPERATION__PROPERTIES:
return getProperties();
}
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 OperationPackage.SET_ORG_UNIT_PROPERTY_OPERATION__PROPERTIES:
setProperties((Map<String, String>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case OperationPackage.SET_ORG_UNIT_PROPERTY_OPERATION__PROPERTIES:
setProperties((Map<String, String>)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case OperationPackage.SET_ORG_UNIT_PROPERTY_OPERATION__PROPERTIES:
return properties != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (properties: ");
result.append(properties);
result.append(')');
return result.toString();
}
} //SetOrgUnitPropertyOperationImpl