org.openxma.dsl.ddl.ddlDsl.impl.SqlTimeStampImpl Maven / Gradle / Ivy
The newest version!
/**
*
*
*
*/
package org.openxma.dsl.ddl.ddlDsl.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.openxma.dsl.ddl.ddlDsl.DdlDslPackage;
import org.openxma.dsl.ddl.ddlDsl.SqlTimeStamp;
/**
*
* An implementation of the model object 'Sql Time Stamp'.
*
*
* The following features are implemented:
*
* - {@link org.openxma.dsl.ddl.ddlDsl.impl.SqlTimeStampImpl#getPrecision Precision}
*
*
*
* @generated
*/
public class SqlTimeStampImpl extends SqlDateTimeImpl implements SqlTimeStamp
{
/**
* The default value of the '{@link #getPrecision() Precision}' attribute.
*
*
* @see #getPrecision()
* @generated
* @ordered
*/
protected static final int PRECISION_EDEFAULT = 0;
/**
* The cached value of the '{@link #getPrecision() Precision}' attribute.
*
*
* @see #getPrecision()
* @generated
* @ordered
*/
protected int precision = PRECISION_EDEFAULT;
/**
*
*
* @generated
*/
protected SqlTimeStampImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return DdlDslPackage.Literals.SQL_TIME_STAMP;
}
/**
*
*
* @generated
*/
public int getPrecision()
{
return precision;
}
/**
*
*
* @generated
*/
public void setPrecision(int newPrecision)
{
int oldPrecision = precision;
precision = newPrecision;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DdlDslPackage.SQL_TIME_STAMP__PRECISION, oldPrecision, precision));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID) {
case DdlDslPackage.SQL_TIME_STAMP__PRECISION:
return getPrecision();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID) {
case DdlDslPackage.SQL_TIME_STAMP__PRECISION:
setPrecision((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID) {
case DdlDslPackage.SQL_TIME_STAMP__PRECISION:
setPrecision(PRECISION_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID) {
case DdlDslPackage.SQL_TIME_STAMP__PRECISION:
return precision != PRECISION_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (precision: ");
result.append(precision);
result.append(')');
return result.toString();
}
} //SqlTimeStampImpl