/**
* <copyright>
* </copyright>
*
* $Id: CustomizerImpl.java,v 1.5 2011/10/25 13:25:24 mtaal Exp $
*/
package org.eclipse.emf.texo.orm.annotations.model.orm.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.texo.orm.annotations.model.orm.Customizer;
import org.eclipse.emf.texo.orm.annotations.model.orm.OrmPackage;
import org.eclipse.emf.texo.orm.annotator.BaseOrmAnnotationImpl;
/**
* <!-- begin-user-doc --> An implementation of the model object '<em><b>Customizer</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.emf.texo.orm.annotations.model.orm.impl.CustomizerImpl#getClass_ <em>Class</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class CustomizerImpl extends BaseOrmAnnotationImpl implements Customizer {
/**
* The default value of the '{@link #getClass_() <em>Class</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @see #getClass_()
* @generated
* @ordered
*/
protected static final String CLASS_EDEFAULT = null;
/**
* The cached value of the '{@link #getClass_() <em>Class</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @see #getClass_()
* @generated
* @ordered
*/
protected String class_ = CLASS_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
protected CustomizerImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return OrmPackage.eINSTANCE.getCustomizer();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public String getClass_() {
return class_;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public void setClass(String newClass) {
String oldClass = class_;
class_ = newClass;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CUSTOMIZER__CLASS, oldClass, class_));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case OrmPackage.CUSTOMIZER__CLASS:
return getClass_();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case OrmPackage.CUSTOMIZER__CLASS:
setClass((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case OrmPackage.CUSTOMIZER__CLASS:
setClass(CLASS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case OrmPackage.CUSTOMIZER__CLASS:
return CLASS_EDEFAULT == null ? class_ != null : !CLASS_EDEFAULT.equals(class_);
}
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(" (class: "); //$NON-NLS-1$
result.append(class_);
result.append(')');
return result.toString();
}
@Override
public String getJavaAnnotation(String identifier) {
return "@org.eclipse.persistence.annotations.Customizer(value=" + getClass_() + ".class)";
}
} // CustomizerImpl