| /** |
| * Copyright (c) 2011, 2016 - Lunifera GmbH (Gross Enzersdorf), Loetz GmbH&Co.KG (Heidelberg) |
| * 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 |
| * |
| * Based on ideas from Xtext, Xtend, Xcore |
| * |
| * Contributors: |
| * Florian Pirchner - Initial implementation |
| * |
| */ |
| package org.eclipse.osbp.dsl.semantic.entity.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.dsl.semantic.common.types.impl.LLazyResolverImpl; |
| |
| import org.eclipse.osbp.dsl.semantic.entity.LEntityColumnPersistenceInfo; |
| import org.eclipse.osbp.dsl.semantic.entity.OSBPEntityPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>LEntity Column Persistence Info</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.osbp.dsl.semantic.entity.impl.LEntityColumnPersistenceInfoImpl#getColumnName <em>Column Name</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class LEntityColumnPersistenceInfoImpl extends LLazyResolverImpl implements LEntityColumnPersistenceInfo { |
| /** |
| * The default value of the '{@link #getColumnName() <em>Column Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColumnName() |
| * @generated |
| * @ordered |
| */ |
| protected static final String COLUMN_NAME_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getColumnName() <em>Column Name</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getColumnName() |
| * @generated |
| * @ordered |
| */ |
| protected String columnName = COLUMN_NAME_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected LEntityColumnPersistenceInfoImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return OSBPEntityPackage.Literals.LENTITY_COLUMN_PERSISTENCE_INFO; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getColumnName() { |
| return columnName; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setColumnName(String newColumnName) { |
| String oldColumnName = columnName; |
| columnName = newColumnName; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, OSBPEntityPackage.LENTITY_COLUMN_PERSISTENCE_INFO__COLUMN_NAME, oldColumnName, columnName)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case OSBPEntityPackage.LENTITY_COLUMN_PERSISTENCE_INFO__COLUMN_NAME: |
| return getColumnName(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case OSBPEntityPackage.LENTITY_COLUMN_PERSISTENCE_INFO__COLUMN_NAME: |
| setColumnName((String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case OSBPEntityPackage.LENTITY_COLUMN_PERSISTENCE_INFO__COLUMN_NAME: |
| setColumnName(COLUMN_NAME_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case OSBPEntityPackage.LENTITY_COLUMN_PERSISTENCE_INFO__COLUMN_NAME: |
| return COLUMN_NAME_EDEFAULT == null ? columnName != null : !COLUMN_NAME_EDEFAULT.equals(columnName); |
| } |
| 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(" (columnName: "); |
| result.append(columnName); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //LEntityColumnPersistenceInfoImpl |