/* license-start * * Copyright (C) 2008 - 2013 Crispico, <http://www.crispico.com/>. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details, at <http://www.gnu.org/licenses/>. * * Contributors: * Crispico - Initial API and implementation * * license-end */ /** * <copyright> * </copyright> * * $Id$ */ package org.flowerplatform.web.entity.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.flowerplatform.web.entity.EntityPackage; import org.flowerplatform.web.entity.PermissionEntity; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Permission Entity</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.flowerplatform.web.entity.impl.PermissionEntityImpl#getType <em>Type</em>}</li> * <li>{@link org.flowerplatform.web.entity.impl.PermissionEntityImpl#getActions <em>Actions</em>}</li> * <li>{@link org.flowerplatform.web.entity.impl.PermissionEntityImpl#getAssignedTo <em>Assigned To</em>}</li> * </ul> * </p> * * @generated */ public class PermissionEntityImpl extends NamedEntityImpl implements PermissionEntity { /** * The default value of the '{@link #getType() <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected static final String TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getType() <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected String type = TYPE_EDEFAULT; /** * The default value of the '{@link #getActions() <em>Actions</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getActions() * @generated * @ordered */ protected static final String ACTIONS_EDEFAULT = null; /** * The cached value of the '{@link #getActions() <em>Actions</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getActions() * @generated * @ordered */ protected String actions = ACTIONS_EDEFAULT; /** * The default value of the '{@link #getAssignedTo() <em>Assigned To</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAssignedTo() * @generated * @ordered */ protected static final String ASSIGNED_TO_EDEFAULT = null; /** * The cached value of the '{@link #getAssignedTo() <em>Assigned To</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAssignedTo() * @generated * @ordered */ protected String assignedTo = ASSIGNED_TO_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected PermissionEntityImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return EntityPackage.Literals.PERMISSION_ENTITY; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getType() { return type; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setType(String newType) { String oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EntityPackage.PERMISSION_ENTITY__TYPE, oldType, type)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getActions() { return actions; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setActions(String newActions) { String oldActions = actions; actions = newActions; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EntityPackage.PERMISSION_ENTITY__ACTIONS, oldActions, actions)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getAssignedTo() { return assignedTo; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setAssignedTo(String newAssignedTo) { String oldAssignedTo = assignedTo; assignedTo = newAssignedTo; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EntityPackage.PERMISSION_ENTITY__ASSIGNED_TO, oldAssignedTo, assignedTo)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case EntityPackage.PERMISSION_ENTITY__TYPE: return getType(); case EntityPackage.PERMISSION_ENTITY__ACTIONS: return getActions(); case EntityPackage.PERMISSION_ENTITY__ASSIGNED_TO: return getAssignedTo(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case EntityPackage.PERMISSION_ENTITY__TYPE: setType((String)newValue); return; case EntityPackage.PERMISSION_ENTITY__ACTIONS: setActions((String)newValue); return; case EntityPackage.PERMISSION_ENTITY__ASSIGNED_TO: setAssignedTo((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case EntityPackage.PERMISSION_ENTITY__TYPE: setType(TYPE_EDEFAULT); return; case EntityPackage.PERMISSION_ENTITY__ACTIONS: setActions(ACTIONS_EDEFAULT); return; case EntityPackage.PERMISSION_ENTITY__ASSIGNED_TO: setAssignedTo(ASSIGNED_TO_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case EntityPackage.PERMISSION_ENTITY__TYPE: return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); case EntityPackage.PERMISSION_ENTITY__ACTIONS: return ACTIONS_EDEFAULT == null ? actions != null : !ACTIONS_EDEFAULT.equals(actions); case EntityPackage.PERMISSION_ENTITY__ASSIGNED_TO: return ASSIGNED_TO_EDEFAULT == null ? assignedTo != null : !ASSIGNED_TO_EDEFAULT.equals(assignedTo); } 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(" (type: "); result.append(type); result.append(", actions: "); result.append(actions); result.append(", assignedTo: "); result.append(assignedTo); result.append(')'); return result.toString(); } } //PermissionEntityImpl