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

de.opitzconsulting.orcasDsl.impl.RangePartitionImpl Maven / Gradle / Ivy

Go to download

orcas model modified by syntax extensions (contains the original model). If custom-syntax-extensions are provided, there will be a custom artifact.

The newest version!
/**
 */
package de.opitzconsulting.orcasDsl.impl;

import de.opitzconsulting.orcasDsl.OrcasDslPackage;
import de.opitzconsulting.orcasDsl.RangePartition;
import de.opitzconsulting.orcasDsl.RangePartitionValue;

import java.util.Collection;

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

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

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

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * 
 * An implementation of the model object 'Range Partition'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link de.opitzconsulting.orcasDsl.impl.RangePartitionImpl#getName Name}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.RangePartitionImpl#getValue Value}
  • *
  • {@link de.opitzconsulting.orcasDsl.impl.RangePartitionImpl#getTablespace Tablespace}
  • *
* * @generated */ public class RangePartitionImpl extends MinimalEObjectImpl.Container implements RangePartition { /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ public static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ public String name = NAME_EDEFAULT; /** * The cached value of the '{@link #getValue() Value}' containment reference list. * * * @see #getValue() * @generated * @ordered */ public EList value; /** * The default value of the '{@link #getTablespace() Tablespace}' attribute. * * * @see #getTablespace() * @generated * @ordered */ public static final String TABLESPACE_EDEFAULT = null; /** * The cached value of the '{@link #getTablespace() Tablespace}' attribute. * * * @see #getTablespace() * @generated * @ordered */ public String tablespace = TABLESPACE_EDEFAULT; /** * * * @generated */ public RangePartitionImpl() { super(); } /** * * * @generated */ @Override public EClass eStaticClass() { return OrcasDslPackage.Literals.RANGE_PARTITION; } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.RANGE_PARTITION__NAME, oldName, name)); } /** * * * @generated */ public EList getValue() { if (value == null) { value = new EObjectContainmentEList(RangePartitionValue.class, this, OrcasDslPackage.RANGE_PARTITION__VALUE); } return value; } /** * * * @generated */ public String getTablespace() { return tablespace; } /** * * * @generated */ public void setTablespace(String newTablespace) { String oldTablespace = tablespace; tablespace = newTablespace; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, OrcasDslPackage.RANGE_PARTITION__TABLESPACE, oldTablespace, tablespace)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case OrcasDslPackage.RANGE_PARTITION__VALUE: return ((InternalEList)getValue()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case OrcasDslPackage.RANGE_PARTITION__NAME: return getName(); case OrcasDslPackage.RANGE_PARTITION__VALUE: return getValue(); case OrcasDslPackage.RANGE_PARTITION__TABLESPACE: return getTablespace(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case OrcasDslPackage.RANGE_PARTITION__NAME: setName((String)newValue); return; case OrcasDslPackage.RANGE_PARTITION__VALUE: getValue().clear(); getValue().addAll((Collection)newValue); return; case OrcasDslPackage.RANGE_PARTITION__TABLESPACE: setTablespace((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case OrcasDslPackage.RANGE_PARTITION__NAME: setName(NAME_EDEFAULT); return; case OrcasDslPackage.RANGE_PARTITION__VALUE: getValue().clear(); return; case OrcasDslPackage.RANGE_PARTITION__TABLESPACE: setTablespace(TABLESPACE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case OrcasDslPackage.RANGE_PARTITION__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case OrcasDslPackage.RANGE_PARTITION__VALUE: return value != null && !value.isEmpty(); case OrcasDslPackage.RANGE_PARTITION__TABLESPACE: return TABLESPACE_EDEFAULT == null ? tablespace != null : !TABLESPACE_EDEFAULT.equals(tablespace); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (name: "); result.append(name); result.append(", tablespace: "); result.append(tablespace); result.append(')'); return result.toString(); } } //RangePartitionImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy