/**
* <copyright>
* </copyright>
*
* $Id: BatchSizeImpl.java,v 1.1 2009/03/15 15:08:01 mtaal Exp $
*/
package org.eclipse.emf.teneo.hibernate.hbannotation.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.teneo.hibernate.hbannotation.BatchSize;
import org.eclipse.emf.teneo.hibernate.hbannotation.HbannotationPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Batch Size</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.emf.teneo.hibernate.hbannotation.impl.BatchSizeImpl#getSize <em>Size</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class BatchSizeImpl extends HbAnnotationImpl implements BatchSize {
/**
* The default value of the '{@link #getSize() <em>Size</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSize()
* @generated
* @ordered
*/
protected static final int SIZE_EDEFAULT = 0;
/**
* The cached value of the '{@link #getSize() <em>Size</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSize()
* @generated
* @ordered
*/
protected int size = SIZE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BatchSizeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return HbannotationPackage.Literals.BATCH_SIZE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getSize() {
return size;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSize(int newSize) {
int oldSize = size;
size = newSize;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, HbannotationPackage.BATCH_SIZE__SIZE, oldSize, size));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case HbannotationPackage.BATCH_SIZE__SIZE:
return new Integer(getSize());
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case HbannotationPackage.BATCH_SIZE__SIZE:
setSize(((Integer)newValue).intValue());
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case HbannotationPackage.BATCH_SIZE__SIZE:
setSize(SIZE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case HbannotationPackage.BATCH_SIZE__SIZE:
return size != SIZE_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(" (size: ");
result.append(size);
result.append(')');
return result.toString();
}
} //BatchSizeImpl