/** * <copyright> * </copyright> * * $Id: NotFoundImpl.java,v 1.1 2008/08/04 05:14:59 mtaal Exp $ */ package org.eclipse.emf.teneo.hibernate.hbannotation.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.teneo.hibernate.hbannotation.HbannotationPackage; import org.eclipse.emf.teneo.hibernate.hbannotation.NotFound; import org.eclipse.emf.teneo.hibernate.hbannotation.NotFoundAction; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Not Found</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.emf.teneo.hibernate.hbannotation.impl.NotFoundImpl#getAction <em>Action</em>}</li> * </ul> * </p> * * @generated */ public class NotFoundImpl extends HbAnnotationImpl implements NotFound { /** * The default value of the '{@link #getAction() <em>Action</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAction() * @generated * @ordered */ protected static final NotFoundAction ACTION_EDEFAULT = NotFoundAction.EXCEPTION; /** * The cached value of the '{@link #getAction() <em>Action</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAction() * @generated * @ordered */ protected NotFoundAction action = ACTION_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected NotFoundImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return HbannotationPackage.Literals.NOT_FOUND; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotFoundAction getAction() { return action; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAction(NotFoundAction newAction) { NotFoundAction oldAction = action; action = newAction == null ? ACTION_EDEFAULT : newAction; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, HbannotationPackage.NOT_FOUND__ACTION, oldAction, action)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case HbannotationPackage.NOT_FOUND__ACTION: return getAction(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case HbannotationPackage.NOT_FOUND__ACTION: setAction((NotFoundAction)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case HbannotationPackage.NOT_FOUND__ACTION: setAction(ACTION_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case HbannotationPackage.NOT_FOUND__ACTION: return action != ACTION_EDEFAULT; } 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(" (action: "); result.append(action); result.append(')'); return result.toString(); } } //NotFoundImpl