diff options
Diffstat (limited to 'examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/issues/bz225296_2/ops/impl/DWHInstanceImpl.java')
-rw-r--r-- | examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/issues/bz225296_2/ops/impl/DWHInstanceImpl.java | 426 |
1 files changed, 426 insertions, 0 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/issues/bz225296_2/ops/impl/DWHInstanceImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/issues/bz225296_2/ops/impl/DWHInstanceImpl.java new file mode 100644 index 000000000..14eb41b19 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/issues/bz225296_2/ops/impl/DWHInstanceImpl.java @@ -0,0 +1,426 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DWHInstanceImpl.java,v 1.1 2008/04/06 13:45:43 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl; + +import java.util.Collection; +import java.util.Date; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +import org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.DWHInstance; +import org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.OpsPackage; +import org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.VServer; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>DWH Instance</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl#getId <em>Id</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl#getEtl <em>Etl</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl#getModified <em>Modified</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl#getRevision <em>Revision</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.issues.bz225296_2.ops.impl.DWHInstanceImpl#getDescription <em>Description</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class DWHInstanceImpl extends EObjectImpl implements DWHInstance { + /** + * The default value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected static final long ID_EDEFAULT = 0L; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected long id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getEtl() <em>Etl</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEtl() + * @generated + * @ordered + */ + protected EList<VServer> etl; + + /** + * The default value of the '{@link #getModified() <em>Modified</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getModified() + * @generated + * @ordered + */ + protected static final Date MODIFIED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getModified() <em>Modified</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getModified() + * @generated + * @ordered + */ + protected Date modified = MODIFIED_EDEFAULT; + + /** + * The default value of the '{@link #getRevision() <em>Revision</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRevision() + * @generated + * @ordered + */ + protected static final int REVISION_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getRevision() <em>Revision</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRevision() + * @generated + * @ordered + */ + protected int revision = REVISION_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DWHInstanceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return OpsPackage.Literals.DWH_INSTANCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public long getId() { + return id; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(long newId) { + long oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsPackage.DWH_INSTANCE__ID, oldId, id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsPackage.DWH_INSTANCE__NAME, oldName, name)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<VServer> getEtl() { + if (etl == null) { + etl = new EObjectResolvingEList<VServer>(VServer.class, this, OpsPackage.DWH_INSTANCE__ETL); + } + return etl; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Date getModified() { + return modified; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setModified(Date newModified) { + Date oldModified = modified; + modified = newModified; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsPackage.DWH_INSTANCE__MODIFIED, oldModified, modified)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getRevision() { + return revision; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setRevision(int newRevision) { + int oldRevision = revision; + revision = newRevision; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsPackage.DWH_INSTANCE__REVISION, oldRevision, revision)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() { + return description; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, OpsPackage.DWH_INSTANCE__DESCRIPTION, oldDescription, description)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case OpsPackage.DWH_INSTANCE__ID: + return new Long(getId()); + case OpsPackage.DWH_INSTANCE__NAME: + return getName(); + case OpsPackage.DWH_INSTANCE__ETL: + return getEtl(); + case OpsPackage.DWH_INSTANCE__MODIFIED: + return getModified(); + case OpsPackage.DWH_INSTANCE__REVISION: + return new Integer(getRevision()); + case OpsPackage.DWH_INSTANCE__DESCRIPTION: + return getDescription(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case OpsPackage.DWH_INSTANCE__ID: + setId(((Long)newValue).longValue()); + return; + case OpsPackage.DWH_INSTANCE__NAME: + setName((String)newValue); + return; + case OpsPackage.DWH_INSTANCE__ETL: + getEtl().clear(); + getEtl().addAll((Collection<? extends VServer>)newValue); + return; + case OpsPackage.DWH_INSTANCE__MODIFIED: + setModified((Date)newValue); + return; + case OpsPackage.DWH_INSTANCE__REVISION: + setRevision(((Integer)newValue).intValue()); + return; + case OpsPackage.DWH_INSTANCE__DESCRIPTION: + setDescription((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case OpsPackage.DWH_INSTANCE__ID: + setId(ID_EDEFAULT); + return; + case OpsPackage.DWH_INSTANCE__NAME: + setName(NAME_EDEFAULT); + return; + case OpsPackage.DWH_INSTANCE__ETL: + getEtl().clear(); + return; + case OpsPackage.DWH_INSTANCE__MODIFIED: + setModified(MODIFIED_EDEFAULT); + return; + case OpsPackage.DWH_INSTANCE__REVISION: + setRevision(REVISION_EDEFAULT); + return; + case OpsPackage.DWH_INSTANCE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case OpsPackage.DWH_INSTANCE__ID: + return id != ID_EDEFAULT; + case OpsPackage.DWH_INSTANCE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case OpsPackage.DWH_INSTANCE__ETL: + return etl != null && !etl.isEmpty(); + case OpsPackage.DWH_INSTANCE__MODIFIED: + return MODIFIED_EDEFAULT == null ? modified != null : !MODIFIED_EDEFAULT.equals(modified); + case OpsPackage.DWH_INSTANCE__REVISION: + return revision != REVISION_EDEFAULT; + case OpsPackage.DWH_INSTANCE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + } + 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(" (id: "); + result.append(id); + result.append(", name: "); + result.append(name); + result.append(", modified: "); + result.append(modified); + result.append(", revision: "); + result.append(revision); + result.append(", description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} //DWHInstanceImpl |