/**
* <copyright>
* </copyright>
*
* $Id$
*/
package com.hundsun.ares.studio.biz.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import com.hundsun.ares.studio.biz.BizPackage;
import com.hundsun.ares.studio.biz.Multiplicity;
import com.hundsun.ares.studio.biz.ParamType;
import com.hundsun.ares.studio.biz.Parameter;
import com.hundsun.ares.studio.core.model.impl.ExtensibleModelImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Parameter</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getId <em>Id</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getName <em>Name</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getParamType <em>Param Type</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getType <em>Type</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getRealType <em>Real Type</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getDescription <em>Description</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getMultiplicity <em>Multiplicity</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getDefaultValue <em>Default Value</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getFlags <em>Flags</em>}</li>
* <li>{@link com.hundsun.ares.studio.biz.impl.ParameterImpl#getComments <em>Comments</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class ParameterImpl extends ExtensibleModelImpl implements Parameter {
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected static final String ID_EDEFAULT = "";
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected String id = ID_EDEFAULT;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = "";
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The default value of the '{@link #getParamType() <em>Param Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getParamType()
* @generated
* @ordered
*/
protected static final ParamType PARAM_TYPE_EDEFAULT = ParamType.STD_FIELD;
/**
* The cached value of the '{@link #getParamType() <em>Param Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getParamType()
* @generated
* @ordered
*/
protected ParamType paramType = PARAM_TYPE_EDEFAULT;
/**
* The default value of the '{@link #getType() <em>Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
* @generated
* @ordered
*/
protected static final String TYPE_EDEFAULT = "";
/**
* The cached value of the '{@link #getType() <em>Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
* @generated
* @ordered
*/
protected String type = TYPE_EDEFAULT;
/**
* The default value of the '{@link #getRealType() <em>Real Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRealType()
* @generated
* @ordered
*/
protected static final String REAL_TYPE_EDEFAULT = null;
/**
* The cached value of the '{@link #getRealType() <em>Real Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getRealType()
* @generated
* @ordered
*/
protected String realType = REAL_TYPE_EDEFAULT;
/**
* The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected static final String DESCRIPTION_EDEFAULT = "";
/**
* The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected String description = DESCRIPTION_EDEFAULT;
/**
* The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMultiplicity()
* @generated
* @ordered
*/
protected static final Multiplicity MULTIPLICITY_EDEFAULT = Multiplicity.ONE_ONE;
/**
* The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMultiplicity()
* @generated
* @ordered
*/
protected Multiplicity multiplicity = MULTIPLICITY_EDEFAULT;
/**
* The default value of the '{@link #getDefaultValue() <em>Default Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDefaultValue()
* @generated
* @ordered
*/
protected static final String DEFAULT_VALUE_EDEFAULT = null;
/**
* The cached value of the '{@link #getDefaultValue() <em>Default Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDefaultValue()
* @generated
* @ordered
*/
protected String defaultValue = DEFAULT_VALUE_EDEFAULT;
/**
* The default value of the '{@link #getFlags() <em>Flags</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getFlags()
* @generated
* @ordered
*/
protected static final String FLAGS_EDEFAULT = "";
/**
* The cached value of the '{@link #getFlags() <em>Flags</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getFlags()
* @generated
* @ordered
*/
protected String flags = FLAGS_EDEFAULT;
/**
* The default value of the '{@link #getComments() <em>Comments</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getComments()
* @generated
* @ordered
*/
protected static final String COMMENTS_EDEFAULT = "";
/**
* The cached value of the '{@link #getComments() <em>Comments</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getComments()
* @generated
* @ordered
*/
protected String comments = COMMENTS_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ParameterImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BizPackage.Literals.PARAMETER;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getId() {
return id;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setId(String newId) {
String oldId = id;
id = newId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__ID, oldId, id));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ParamType getParamType() {
return paramType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setParamType(ParamType newParamType) {
ParamType oldParamType = paramType;
paramType = newParamType == null ? PARAM_TYPE_EDEFAULT : newParamType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__PARAM_TYPE, oldParamType, paramType));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getType() {
return type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setType(String newType) {
String oldType = type;
type = newType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__TYPE, oldType, type));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getRealType() {
return realType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setRealType(String newRealType) {
String oldRealType = realType;
realType = newRealType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__REAL_TYPE, oldRealType, realType));
}
/**
* <!-- begin-user-doc -->
* ע�⣡���� �����ʱ����Ҫ������ݴ�һЩ��Ϣ������**����**�����������ʵ�֡�
* <!-- end-user-doc -->
* @generated NOT
*/
public String getDescription() {
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDescription(String newDescription) {
String oldDescription = description;
description = newDescription;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__DESCRIPTION, oldDescription, description));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Multiplicity getMultiplicity() {
return multiplicity;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMultiplicity(Multiplicity newMultiplicity) {
Multiplicity oldMultiplicity = multiplicity;
multiplicity = newMultiplicity == null ? MULTIPLICITY_EDEFAULT : newMultiplicity;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__MULTIPLICITY, oldMultiplicity, multiplicity));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getDefaultValue() {
return defaultValue;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDefaultValue(String newDefaultValue) {
String oldDefaultValue = defaultValue;
defaultValue = newDefaultValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__DEFAULT_VALUE, oldDefaultValue, defaultValue));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getFlags() {
return flags;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setFlags(String newFlags) {
String oldFlags = flags;
flags = newFlags;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__FLAGS, oldFlags, flags));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getComments() {
return comments;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setComments(String newComments) {
String oldComments = comments;
comments = newComments;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BizPackage.PARAMETER__COMMENTS, oldComments, comments));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BizPackage.PARAMETER__ID:
return getId();
case BizPackage.PARAMETER__NAME:
return getName();
case BizPackage.PARAMETER__PARAM_TYPE:
return getParamType();
case BizPackage.PARAMETER__TYPE:
return getType();
case BizPackage.PARAMETER__REAL_TYPE:
return getRealType();
case BizPackage.PARAMETER__DESCRIPTION:
return getDescription();
case BizPackage.PARAMETER__MULTIPLICITY:
return getMultiplicity();
case BizPackage.PARAMETER__DEFAULT_VALUE:
return getDefaultValue();
case BizPackage.PARAMETER__FLAGS:
return getFlags();
case BizPackage.PARAMETER__COMMENTS:
return getComments();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BizPackage.PARAMETER__ID:
setId((String)newValue);
return;
case BizPackage.PARAMETER__NAME:
setName((String)newValue);
return;
case BizPackage.PARAMETER__PARAM_TYPE:
setParamType((ParamType)newValue);
return;
case BizPackage.PARAMETER__TYPE:
setType((String)newValue);
return;
case BizPackage.PARAMETER__REAL_TYPE:
setRealType((String)newValue);
return;
case BizPackage.PARAMETER__DESCRIPTION:
setDescription((String)newValue);
return;
case BizPackage.PARAMETER__MULTIPLICITY:
setMultiplicity((Multiplicity)newValue);
return;
case BizPackage.PARAMETER__DEFAULT_VALUE:
setDefaultValue((String)newValue);
return;
case BizPackage.PARAMETER__FLAGS:
setFlags((String)newValue);
return;
case BizPackage.PARAMETER__COMMENTS:
setComments((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BizPackage.PARAMETER__ID:
setId(ID_EDEFAULT);
return;
case BizPackage.PARAMETER__NAME:
setName(NAME_EDEFAULT);
return;
case BizPackage.PARAMETER__PARAM_TYPE:
setParamType(PARAM_TYPE_EDEFAULT);
return;
case BizPackage.PARAMETER__TYPE:
setType(TYPE_EDEFAULT);
return;
case BizPackage.PARAMETER__REAL_TYPE:
setRealType(REAL_TYPE_EDEFAULT);
return;
case BizPackage.PARAMETER__DESCRIPTION:
setDescription(DESCRIPTION_EDEFAULT);
return;
case BizPackage.PARAMETER__MULTIPLICITY:
setMultiplicity(MULTIPLICITY_EDEFAULT);
return;
case BizPackage.PARAMETER__DEFAULT_VALUE:
setDefaultValue(DEFAULT_VALUE_EDEFAULT);
return;
case BizPackage.PARAMETER__FLAGS:
setFlags(FLAGS_EDEFAULT);
return;
case BizPackage.PARAMETER__COMMENTS:
setComments(COMMENTS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BizPackage.PARAMETER__ID:
return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
case BizPackage.PARAMETER__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case BizPackage.PARAMETER__PARAM_TYPE:
return paramType != PARAM_TYPE_EDEFAULT;
case BizPackage.PARAMETER__TYPE:
return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
case BizPackage.PARAMETER__REAL_TYPE:
return REAL_TYPE_EDEFAULT == null ? realType != null : !REAL_TYPE_EDEFAULT.equals(realType);
case BizPackage.PARAMETER__DESCRIPTION:
return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
case BizPackage.PARAMETER__MULTIPLICITY:
return multiplicity != MULTIPLICITY_EDEFAULT;
case BizPackage.PARAMETER__DEFAULT_VALUE:
return DEFAULT_VALUE_EDEFAULT == null ? defaultValue != null : !DEFAULT_VALUE_EDEFAULT.equals(defaultValue);
case BizPackage.PARAMETER__FLAGS:
return FLAGS_EDEFAULT == null ? flags != null : !FLAGS_EDEFAULT.equals(flags);
case BizPackage.PARAMETER__COMMENTS:
return COMMENTS_EDEFAULT == null ? comments != null : !COMMENTS_EDEFAULT.equals(comments);
}
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(" (id: ");
result.append(id);
result.append(", name: ");
result.append(name);
result.append(", paramType: ");
result.append(paramType);
result.append(", type: ");
result.append(type);
result.append(", realType: ");
result.append(realType);
result.append(", description: ");
result.append(description);
result.append(", multiplicity: ");
result.append(multiplicity);
result.append(", defaultValue: ");
result.append(defaultValue);
result.append(", flags: ");
result.append(flags);
result.append(", comments: ");
result.append(comments);
result.append(')');
return result.toString();
}
} //ParameterImpl