/**
*/
package hu.bme.mit.incquery.cep.casestudy.transaction.impl;
import hu.bme.mit.incquery.cep.casestudy.transaction.TransactionComponentA;
import hu.bme.mit.incquery.cep.casestudy.transaction.TransactionPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Component A</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link hu.bme.mit.incquery.cep.casestudy.transaction.impl.TransactionComponentAImpl#getCustomerId <em>Customer Id</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class TransactionComponentAImpl extends ComponentImpl implements TransactionComponentA {
/**
* The default value of the '{@link #getCustomerId() <em>Customer Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCustomerId()
* @generated
* @ordered
*/
protected static final String CUSTOMER_ID_EDEFAULT = null;
/**
* The cached value of the '{@link #getCustomerId() <em>Customer Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCustomerId()
* @generated
* @ordered
*/
protected String customerId = CUSTOMER_ID_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected TransactionComponentAImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return TransactionPackage.Literals.TRANSACTION_COMPONENT_A;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getCustomerId() {
return customerId;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCustomerId(String newCustomerId) {
String oldCustomerId = customerId;
customerId = newCustomerId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TransactionPackage.TRANSACTION_COMPONENT_A__CUSTOMER_ID, oldCustomerId, customerId));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case TransactionPackage.TRANSACTION_COMPONENT_A__CUSTOMER_ID:
return getCustomerId();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case TransactionPackage.TRANSACTION_COMPONENT_A__CUSTOMER_ID:
setCustomerId((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case TransactionPackage.TRANSACTION_COMPONENT_A__CUSTOMER_ID:
setCustomerId(CUSTOMER_ID_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case TransactionPackage.TRANSACTION_COMPONENT_A__CUSTOMER_ID:
return CUSTOMER_ID_EDEFAULT == null ? customerId != null : !CUSTOMER_ID_EDEFAULT.equals(customerId);
}
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(" (customerId: ");
result.append(customerId);
result.append(')');
return result.toString();
}
} //TransactionComponentAImpl