/** | |
* Copyright (c) 2011-2012 Mia-Software. | |
* | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v2.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v20.html | |
* | |
* Contributors: | |
* Gregoire Dupe (Mia-Software) - Design | |
* Nicolas Guyomar (Mia-Software) - Implementation | |
* Emmanuelle Rouillé (Mia-Software) - Bug 352618 - To be able to use non derived facet structural features and save them values. | |
* Nicolas Bros (Mia-Software) - Bug 361823 - [Restructuring] eFacet2 meta-model | |
* Gregoire Dupe (Mia-Software) - Bug 366055 - NavigationQuery | |
* Gregoire Dupe (Mia-Software) - Bug 369673 - [Facet] IsOneOfQuery | |
* Olivier Remaud (Soft-Maint) - Bug 369824 - Add a simple way to return string literal constants from a customization query | |
* Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework | |
* Gregoire Dupe (Mia-software) - Bug 364325 - [Restructuring] The user must be able to navigate into a model using the Facet. | |
* Nicolas Bros (Mia-Software) - Bug 372626 - [Facet] Aggregates | |
* Nicolas Bros (Mia-Software) - Bug 376941 - [EFacet] Facet operation arguments in Facet model | |
* | |
*/ | |
package org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.query.impl; | |
import org.eclipse.emf.common.notify.Notification; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.impl.ENotificationImpl; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.extensible.impl.QueryImpl; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.query.FloatLiteralQuery; | |
import org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.query.QueryPackage; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Float Literal Query</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.modisco.facet.efacet.metamodel.v0_2_0.efacet.query.impl.FloatLiteralQueryImpl#getValue <em>Value</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class FloatLiteralQueryImpl extends QueryImpl implements FloatLiteralQuery { | |
/** | |
* The default value of the '{@link #getValue() <em>Value</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getValue() | |
* @generated | |
* @ordered | |
*/ | |
protected static final float VALUE_EDEFAULT = 0.0F; | |
/** | |
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getValue() | |
* @generated | |
* @ordered | |
*/ | |
protected float value = VALUE_EDEFAULT; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected FloatLiteralQueryImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return QueryPackage.Literals.FLOAT_LITERAL_QUERY; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public float getValue() { | |
return value; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setValue(float newValue) { | |
float oldValue = value; | |
value = newValue; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, QueryPackage.FLOAT_LITERAL_QUERY__VALUE, oldValue, value)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case QueryPackage.FLOAT_LITERAL_QUERY__VALUE: | |
return getValue(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case QueryPackage.FLOAT_LITERAL_QUERY__VALUE: | |
setValue((Float)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case QueryPackage.FLOAT_LITERAL_QUERY__VALUE: | |
setValue(VALUE_EDEFAULT); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case QueryPackage.FLOAT_LITERAL_QUERY__VALUE: | |
return value != VALUE_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(" (value: "); //$NON-NLS-1$ | |
result.append(value); | |
result.append(')'); | |
return result.toString(); | |
} | |
} //FloatLiteralQueryImpl |