/**
*
*
*
* $Id$
*/
package org.apache.tuscany.das.rdb.config.impl;
import org.apache.tuscany.das.rdb.config.Parameter;
import org.apache.tuscany.sdo.impl.DataObjectImpl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Parameter'.
*
*
* The following features are implemented:
*
* - {@link org.apache.tuscany.das.rdb.config.impl.ParameterImpl#getColumnType Column Type}
* - {@link org.apache.tuscany.das.rdb.config.impl.ParameterImpl#getCommand Command}
* - {@link org.apache.tuscany.das.rdb.config.impl.ParameterImpl#getName Name}
*
*
*
* @generated
*/
public class ParameterImpl extends DataObjectImpl implements Parameter
{
/**
* The default value of the '{@link #getColumnType() Column Type}' attribute.
*
*
* @see #getColumnType()
* @generated
* @ordered
*/
protected static final String COLUMN_TYPE_EDEFAULT = null;
/**
* The cached value of the '{@link #getColumnType() Column Type}' attribute.
*
*
* @see #getColumnType()
* @generated
* @ordered
*/
protected String columnType = COLUMN_TYPE_EDEFAULT;
/**
* The default value of the '{@link #getCommand() Command}' attribute.
*
*
* @see #getCommand()
* @generated
* @ordered
*/
protected static final String COMMAND_EDEFAULT = null;
/**
* The cached value of the '{@link #getCommand() Command}' attribute.
*
*
* @see #getCommand()
* @generated
* @ordered
*/
protected String command = COMMAND_EDEFAULT;
/**
* The default value of the '{@link #getName() Name}' attribute.
*
*
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() Name}' attribute.
*
*
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
*
*
* @generated
*/
protected ParameterImpl()
{
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass()
{
return ConfigPackageImpl.Literals.PARAMETER;
}
/**
*
*
* @generated
*/
public String getColumnType()
{
return columnType;
}
/**
*
*
* @generated
*/
public void setColumnType(String newColumnType)
{
String oldColumnType = columnType;
columnType = newColumnType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackageImpl.PARAMETER__COLUMN_TYPE, oldColumnType, columnType));
}
/**
*
*
* @generated
*/
public String getCommand()
{
return command;
}
/**
*
*
* @generated
*/
public void setCommand(String newCommand)
{
String oldCommand = command;
command = newCommand;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackageImpl.PARAMETER__COMMAND, oldCommand, command));
}
/**
*
*
* @generated
*/
public String getName()
{
return name;
}
/**
*
*
* @generated
*/
public void setName(String newName)
{
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ConfigPackageImpl.PARAMETER__NAME, oldName, name));
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ConfigPackageImpl.PARAMETER__COLUMN_TYPE:
return getColumnType();
case ConfigPackageImpl.PARAMETER__COMMAND:
return getCommand();
case ConfigPackageImpl.PARAMETER__NAME:
return getName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ConfigPackageImpl.PARAMETER__COLUMN_TYPE:
setColumnType((String)newValue);
return;
case ConfigPackageImpl.PARAMETER__COMMAND:
setCommand((String)newValue);
return;
case ConfigPackageImpl.PARAMETER__NAME:
setName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID)
{
switch (featureID)
{
case ConfigPackageImpl.PARAMETER__COLUMN_TYPE:
setColumnType(COLUMN_TYPE_EDEFAULT);
return;
case ConfigPackageImpl.PARAMETER__COMMAND:
setCommand(COMMAND_EDEFAULT);
return;
case ConfigPackageImpl.PARAMETER__NAME:
setName(NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ConfigPackageImpl.PARAMETER__COLUMN_TYPE:
return COLUMN_TYPE_EDEFAULT == null ? columnType != null : !COLUMN_TYPE_EDEFAULT.equals(columnType);
case ConfigPackageImpl.PARAMETER__COMMAND:
return COMMAND_EDEFAULT == null ? command != null : !COMMAND_EDEFAULT.equals(command);
case ConfigPackageImpl.PARAMETER__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (columnType: ");
result.append(columnType);
result.append(", command: ");
result.append(command);
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //ParameterImpl