All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sculptormetamodel.impl.ValueObjectImpl Maven / Gradle / Ivy

/**
 */
package sculptormetamodel.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import sculptormetamodel.SculptormetamodelPackage;
import sculptormetamodel.ValueObject;

/**
 * 
 * An implementation of the model object 'Value Object'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link sculptormetamodel.impl.ValueObjectImpl#isImmutable Immutable}
  • *
  • {@link sculptormetamodel.impl.ValueObjectImpl#isPersistent Persistent}
  • *
*

* * @generated */ public class ValueObjectImpl extends DomainObjectImpl implements ValueObject { /** * The default value of the '{@link #isImmutable() Immutable}' attribute. * * * @see #isImmutable() * @generated * @ordered */ protected static final boolean IMMUTABLE_EDEFAULT = true; /** * The cached value of the '{@link #isImmutable() Immutable}' attribute. * * * @see #isImmutable() * @generated * @ordered */ protected boolean immutable = IMMUTABLE_EDEFAULT; /** * The default value of the '{@link #isPersistent() Persistent}' attribute. * * * @see #isPersistent() * @generated * @ordered */ protected static final boolean PERSISTENT_EDEFAULT = true; /** * The cached value of the '{@link #isPersistent() Persistent}' attribute. * * * @see #isPersistent() * @generated * @ordered */ protected boolean persistent = PERSISTENT_EDEFAULT; /** * * * @generated */ protected ValueObjectImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SculptormetamodelPackage.Literals.VALUE_OBJECT; } /** * * * @generated */ public boolean isImmutable() { return immutable; } /** * * * @generated */ public void setImmutable(boolean newImmutable) { boolean oldImmutable = immutable; immutable = newImmutable; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SculptormetamodelPackage.VALUE_OBJECT__IMMUTABLE, oldImmutable, immutable)); } /** * * * @generated */ public boolean isPersistent() { return persistent; } /** * * * @generated */ public void setPersistent(boolean newPersistent) { boolean oldPersistent = persistent; persistent = newPersistent; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SculptormetamodelPackage.VALUE_OBJECT__PERSISTENT, oldPersistent, persistent)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SculptormetamodelPackage.VALUE_OBJECT__IMMUTABLE: return isImmutable(); case SculptormetamodelPackage.VALUE_OBJECT__PERSISTENT: return isPersistent(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SculptormetamodelPackage.VALUE_OBJECT__IMMUTABLE: setImmutable((Boolean)newValue); return; case SculptormetamodelPackage.VALUE_OBJECT__PERSISTENT: setPersistent((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SculptormetamodelPackage.VALUE_OBJECT__IMMUTABLE: setImmutable(IMMUTABLE_EDEFAULT); return; case SculptormetamodelPackage.VALUE_OBJECT__PERSISTENT: setPersistent(PERSISTENT_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SculptormetamodelPackage.VALUE_OBJECT__IMMUTABLE: return immutable != IMMUTABLE_EDEFAULT; case SculptormetamodelPackage.VALUE_OBJECT__PERSISTENT: return persistent != PERSISTENT_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (immutable: "); result.append(immutable); result.append(", persistent: "); result.append(persistent); result.append(')'); return result.toString(); } } //ValueObjectImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy