diff options
Diffstat (limited to 'eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/Identifiable.java')
-rwxr-xr-x | eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/Identifiable.java | 246 |
1 files changed, 246 insertions, 0 deletions
diff --git a/eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/Identifiable.java b/eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/Identifiable.java new file mode 100755 index 000000000..fb0a700e3 --- /dev/null +++ b/eclipselink/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/Identifiable.java @@ -0,0 +1,246 @@ +/** + * <copyright> + * </copyright> + * + * $Id: Identifiable.java,v 1.1 2010/04/22 17:57:48 mtaal Exp $ + */ +package org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Identifiable</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.Identifiable#getId <em>Id</em>}</li> + * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.Identifiable#getVersion <em>Version</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage#getIdentifiable() + * @model kind="class" + * @generated + */ +public class Identifiable extends EObjectImpl implements EObject { + /** + * 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 #getVersion() <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVersion() + * @generated + * @ordered + */ + protected static final long VERSION_EDEFAULT = 0L; + + /** + * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVersion() + * @generated + * @ordered + */ + protected long version = VERSION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected Identifiable() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return SuppressinterfacesPackage.Literals.IDENTIFIABLE; + } + + /** + * Returns the value of the '<em><b>Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Id</em>' attribute. + * @see #setId(long) + * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage#getIdentifiable_Id() + * @model annotation="teneo.jpa value='@Id\n@GeneratedValue'" + * @generated + */ + public long getId() { + return id; + } + + /** + * Sets the value of the '{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.Identifiable#getId <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Id</em>' attribute. + * @see #getId() + * @generated + */ + public void setId(long newId) { + long oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SuppressinterfacesPackage.IDENTIFIABLE__ID, oldId, id)); + } + + /** + * Returns the value of the '<em><b>Version</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Version</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Version</em>' attribute. + * @see #setVersion(long) + * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage#getIdentifiable_Version() + * @model annotation="teneo.jpa value='@Version'" + * @generated + */ + public long getVersion() { + return version; + } + + /** + * Sets the value of the '{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.Identifiable#getVersion <em>Version</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Version</em>' attribute. + * @see #getVersion() + * @generated + */ + public void setVersion(long newVersion) { + long oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SuppressinterfacesPackage.IDENTIFIABLE__VERSION, oldVersion, version)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SuppressinterfacesPackage.IDENTIFIABLE__ID: + return getId(); + case SuppressinterfacesPackage.IDENTIFIABLE__VERSION: + return getVersion(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SuppressinterfacesPackage.IDENTIFIABLE__ID: + setId((Long)newValue); + return; + case SuppressinterfacesPackage.IDENTIFIABLE__VERSION: + setVersion((Long)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SuppressinterfacesPackage.IDENTIFIABLE__ID: + setId(ID_EDEFAULT); + return; + case SuppressinterfacesPackage.IDENTIFIABLE__VERSION: + setVersion(VERSION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SuppressinterfacesPackage.IDENTIFIABLE__ID: + return id != ID_EDEFAULT; + case SuppressinterfacesPackage.IDENTIFIABLE__VERSION: + return version != VERSION_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(" (id: "); + result.append(id); + result.append(", version: "); + result.append(version); + result.append(')'); + return result.toString(); + } + +} // Identifiable |