blob: 1176ff811d6bf3157112682fd9b33e629111b141 [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.RoleDtoAttribute;
import org.eclipse.osbp.xtext.authorizationdsl.RolePropertyEnum;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Role Dto Attribute</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.osbp.xtext.authorizationdsl.impl.RoleDtoAttributeImpl#getDtoAttriUnauthorized <em>Dto Attri Unauthorized</em>}</li>
* </ul>
*
* @generated
*/
public class RoleDtoAttributeImpl extends RoleDtoFeatureImpl implements RoleDtoAttribute {
/**
* The default value of the '{@link #getDtoAttriUnauthorized() <em>Dto Attri Unauthorized</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDtoAttriUnauthorized()
* @generated
* @ordered
*/
protected static final RolePropertyEnum DTO_ATTRI_UNAUTHORIZED_EDEFAULT = RolePropertyEnum.INVISIBLE;
/**
* The cached value of the '{@link #getDtoAttriUnauthorized() <em>Dto Attri Unauthorized</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDtoAttriUnauthorized()
* @generated
* @ordered
*/
protected RolePropertyEnum dtoAttriUnauthorized = DTO_ATTRI_UNAUTHORIZED_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected RoleDtoAttributeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return AuthorizationDSLPackage.Literals.ROLE_DTO_ATTRIBUTE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RolePropertyEnum getDtoAttriUnauthorized() {
return dtoAttriUnauthorized;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDtoAttriUnauthorized(RolePropertyEnum newDtoAttriUnauthorized) {
RolePropertyEnum oldDtoAttriUnauthorized = dtoAttriUnauthorized;
dtoAttriUnauthorized = newDtoAttriUnauthorized == null ? DTO_ATTRI_UNAUTHORIZED_EDEFAULT : newDtoAttriUnauthorized;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AuthorizationDSLPackage.ROLE_DTO_ATTRIBUTE__DTO_ATTRI_UNAUTHORIZED, oldDtoAttriUnauthorized, dtoAttriUnauthorized));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AuthorizationDSLPackage.ROLE_DTO_ATTRIBUTE__DTO_ATTRI_UNAUTHORIZED:
return getDtoAttriUnauthorized();
}
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_DTO_ATTRIBUTE__DTO_ATTRI_UNAUTHORIZED:
setDtoAttriUnauthorized((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_DTO_ATTRIBUTE__DTO_ATTRI_UNAUTHORIZED:
setDtoAttriUnauthorized(DTO_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_DTO_ATTRIBUTE__DTO_ATTRI_UNAUTHORIZED:
return dtoAttriUnauthorized != DTO_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(" (dtoAttriUnauthorized: ");
result.append(dtoAttriUnauthorized);
result.append(')');
return result.toString();
}
} //RoleDtoAttributeImpl