/**
 * generated by Xtext 2.10.0
 */
package org.xtext.example.plsql.dDL.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.xtext.example.plsql.dDL.DDLPackage;
import org.xtext.example.plsql.dDL.Tabname;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Tabname</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * </p>
 * <ul>
 *   <li>{@link org.xtext.example.plsql.dDL.impl.TabnameImpl#getId <em>Id</em>}</li>
 *   <li>{@link org.xtext.example.plsql.dDL.impl.TabnameImpl#getBasename <em>Basename</em>}</li>
 * </ul>
 *
 * @generated
 */
public class TabnameImpl extends MinimalEObjectImpl.Container implements Tabname
{
  /**
   * 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 = null;

  /**
   * 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 #getBasename() <em>Basename</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getBasename()
   * @generated
   * @ordered
   */
  protected static final String BASENAME_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getBasename() <em>Basename</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getBasename()
   * @generated
   * @ordered
   */
  protected String basename = BASENAME_EDEFAULT;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected TabnameImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return DDLPackage.Literals.TABNAME;
  }

  /**
   * <!-- 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, DDLPackage.TABNAME__ID, oldId, id));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getBasename()
  {
    return basename;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setBasename(String newBasename)
  {
    String oldBasename = basename;
    basename = newBasename;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, DDLPackage.TABNAME__BASENAME, oldBasename, basename));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case DDLPackage.TABNAME__ID:
        return getId();
      case DDLPackage.TABNAME__BASENAME:
        return getBasename();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case DDLPackage.TABNAME__ID:
        setId((String)newValue);
        return;
      case DDLPackage.TABNAME__BASENAME:
        setBasename((String)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case DDLPackage.TABNAME__ID:
        setId(ID_EDEFAULT);
        return;
      case DDLPackage.TABNAME__BASENAME:
        setBasename(BASENAME_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case DDLPackage.TABNAME__ID:
        return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
      case DDLPackage.TABNAME__BASENAME:
        return BASENAME_EDEFAULT == null ? basename != null : !BASENAME_EDEFAULT.equals(basename);
    }
    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(", basename: ");
    result.append(basename);
    result.append(')');
    return result.toString();
  }

} //TabnameImpl
