blob: 7b83a71977493c1e6c5bff7c61a8c21832e24640 [file] [log] [blame]
/**
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
* generated from AuthoritarionDSL.xcore
*
*
*/
package org.eclipse.osbp.xtext.authorizationdsl.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.osbp.xtext.authorizationdsl.AuthorizationDSLPackage;
import org.eclipse.osbp.xtext.authorizationdsl.RoleEntityAttribute;
import org.eclipse.osbp.xtext.authorizationdsl.RolePropertyEnum;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Role Entity Attribute</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.osbp.xtext.authorizationdsl.impl.RoleEntityAttributeImpl#getEntityAttriUnauthorized <em>Entity Attri Unauthorized</em>}</li>
* </ul>
*
* @generated
*/
public class RoleEntityAttributeImpl extends RoleEntityFeatureImpl implements RoleEntityAttribute {
/**
* The default value of the '{@link #getEntityAttriUnauthorized() <em>Entity Attri Unauthorized</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEntityAttriUnauthorized()
* @generated
* @ordered
*/
protected static final RolePropertyEnum ENTITY_ATTRI_UNAUTHORIZED_EDEFAULT = RolePropertyEnum.INVISIBLE;
/**
* The cached value of the '{@link #getEntityAttriUnauthorized() <em>Entity Attri Unauthorized</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEntityAttriUnauthorized()
* @generated
* @ordered
*/
protected RolePropertyEnum entityAttriUnauthorized = ENTITY_ATTRI_UNAUTHORIZED_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected RoleEntityAttributeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return AuthorizationDSLPackage.Literals.ROLE_ENTITY_ATTRIBUTE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RolePropertyEnum getEntityAttriUnauthorized() {
return entityAttriUnauthorized;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setEntityAttriUnauthorized(RolePropertyEnum newEntityAttriUnauthorized) {
RolePropertyEnum oldEntityAttriUnauthorized = entityAttriUnauthorized;
entityAttriUnauthorized = newEntityAttriUnauthorized == null ? ENTITY_ATTRI_UNAUTHORIZED_EDEFAULT : newEntityAttriUnauthorized;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AuthorizationDSLPackage.ROLE_ENTITY_ATTRIBUTE__ENTITY_ATTRI_UNAUTHORIZED, oldEntityAttriUnauthorized, entityAttriUnauthorized));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AuthorizationDSLPackage.ROLE_ENTITY_ATTRIBUTE__ENTITY_ATTRI_UNAUTHORIZED:
return getEntityAttriUnauthorized();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AuthorizationDSLPackage.ROLE_ENTITY_ATTRIBUTE__ENTITY_ATTRI_UNAUTHORIZED:
setEntityAttriUnauthorized((RolePropertyEnum)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AuthorizationDSLPackage.ROLE_ENTITY_ATTRIBUTE__ENTITY_ATTRI_UNAUTHORIZED:
setEntityAttriUnauthorized(ENTITY_ATTRI_UNAUTHORIZED_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AuthorizationDSLPackage.ROLE_ENTITY_ATTRIBUTE__ENTITY_ATTRI_UNAUTHORIZED:
return entityAttriUnauthorized != ENTITY_ATTRI_UNAUTHORIZED_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(" (entityAttriUnauthorized: ");
result.append(entityAttriUnauthorized);
result.append(')');
return result.toString();
}
} //RoleEntityAttributeImpl