diff options
Diffstat (limited to 'hibernate/org.eclipse.emf.teneo.hibernate.examples/src/org/eclipse/emf/teneo/hibernate/examples/extlibrary/impl/VideoCassetteImpl.java')
-rwxr-xr-x | hibernate/org.eclipse.emf.teneo.hibernate.examples/src/org/eclipse/emf/teneo/hibernate/examples/extlibrary/impl/VideoCassetteImpl.java | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.examples/src/org/eclipse/emf/teneo/hibernate/examples/extlibrary/impl/VideoCassetteImpl.java b/hibernate/org.eclipse.emf.teneo.hibernate.examples/src/org/eclipse/emf/teneo/hibernate/examples/extlibrary/impl/VideoCassetteImpl.java new file mode 100755 index 000000000..5e7496300 --- /dev/null +++ b/hibernate/org.eclipse.emf.teneo.hibernate.examples/src/org/eclipse/emf/teneo/hibernate/examples/extlibrary/impl/VideoCassetteImpl.java @@ -0,0 +1,136 @@ +/** + * <copyright> + * </copyright> + * + * $Id: VideoCassetteImpl.java,v 1.2 2010/03/02 06:08:37 mtaal Exp $ + */ +package org.eclipse.emf.teneo.hibernate.examples.extlibrary.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +import org.eclipse.emf.teneo.hibernate.examples.extlibrary.ExtlibraryPackage; +import org.eclipse.emf.teneo.hibernate.examples.extlibrary.Person; +import org.eclipse.emf.teneo.hibernate.examples.extlibrary.VideoCassette; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Video Cassette</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.teneo.hibernate.examples.extlibrary.impl.VideoCassetteImpl#getCast <em>Cast</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class VideoCassetteImpl extends AudioVisualItemImpl implements VideoCassette { + /** + * The cached value of the '{@link #getCast() <em>Cast</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCast() + * @generated + * @ordered + */ + protected EList<Person> cast; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected VideoCassetteImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ExtlibraryPackage.Literals.VIDEO_CASSETTE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Person> getCast() { + if (cast == null) { + cast = new EObjectResolvingEList<Person>(Person.class, this, ExtlibraryPackage.VIDEO_CASSETTE__CAST); + } + return cast; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ExtlibraryPackage.VIDEO_CASSETTE__CAST: + return getCast(); + } + 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 ExtlibraryPackage.VIDEO_CASSETTE__CAST: + getCast().clear(); + getCast().addAll((Collection<? extends Person>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ExtlibraryPackage.VIDEO_CASSETTE__CAST: + getCast().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ExtlibraryPackage.VIDEO_CASSETTE__CAST: + return cast != null && !cast.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //VideoCassetteImpl |