blob: 0d96ed24905d106cf5a0a8c4499f6afc8ea85d09 [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
*
* Based on ideas from Xtext, Xtend, Xcore
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - Initial implementation
*
*/
package org.eclipse.osbp.xtext.datamartdsl.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.datamartdsl.DatamartDSLPackage;
import org.eclipse.osbp.xtext.datamartdsl.PropertyFillerTextSentences;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Property Filler Text Sentences</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.osbp.xtext.datamartdsl.impl.PropertyFillerTextSentencesImpl#getCount <em>Count</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class PropertyFillerTextSentencesImpl extends PropertyFillerTextTypeImpl implements PropertyFillerTextSentences {
/**
* The default value of the '{@link #getCount() <em>Count</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCount()
* @generated
* @ordered
*/
protected static final int COUNT_EDEFAULT = 0;
/**
* The cached value of the '{@link #getCount() <em>Count</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCount()
* @generated
* @ordered
*/
protected int count = COUNT_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PropertyFillerTextSentencesImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return DatamartDSLPackage.Literals.PROPERTY_FILLER_TEXT_SENTENCES;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getCount() {
return count;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCount(int newCount) {
int oldCount = count;
count = newCount;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DatamartDSLPackage.PROPERTY_FILLER_TEXT_SENTENCES__COUNT, oldCount, count));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DatamartDSLPackage.PROPERTY_FILLER_TEXT_SENTENCES__COUNT:
return getCount();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DatamartDSLPackage.PROPERTY_FILLER_TEXT_SENTENCES__COUNT:
setCount((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DatamartDSLPackage.PROPERTY_FILLER_TEXT_SENTENCES__COUNT:
setCount(COUNT_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DatamartDSLPackage.PROPERTY_FILLER_TEXT_SENTENCES__COUNT:
return count != COUNT_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(" (count: ");
result.append(count);
result.append(')');
return result.toString();
}
} //PropertyFillerTextSentencesImpl