| /******************************************************************************* |
| * Copyright (c) 2001, 2006 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.impl; |
| |
| |
| import java.util.Collection; |
| |
| 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.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl; |
| import org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.LooseApplication; |
| import org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.LooseConfiguration; |
| import org.eclipse.jst.j2ee.commonarchivecore.looseconfig.internal.LooseconfigPackage; |
| |
| /** |
| * @generated |
| */ |
| public class LooseConfigurationImpl extends J2EEEObjectImpl implements LooseConfiguration { |
| /** |
| * @generated This field/method will be replaced during code generation. |
| */ |
| /** |
| * @generated This field/method will be replaced during code generation. |
| */ |
| protected EList applications = null; |
| |
| /** |
| * @generated This field/method will be replaced during code generation. |
| */ |
| protected LooseConfigurationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return LooseconfigPackage.Literals.LOOSE_CONFIGURATION; |
| } |
| |
| /** |
| * @generated This field/method will be replaced during code generation |
| */ |
| public EList getApplications() { |
| if (applications == null) { |
| applications = new EObjectContainmentEList(LooseApplication.class, this, LooseconfigPackage.LOOSE_CONFIGURATION__APPLICATIONS); |
| } |
| return applications; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_CONFIGURATION__APPLICATIONS: |
| return ((InternalEList)getApplications()).basicRemove(otherEnd, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_CONFIGURATION__APPLICATIONS: |
| return getApplications(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_CONFIGURATION__APPLICATIONS: |
| getApplications().clear(); |
| getApplications().addAll((Collection)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_CONFIGURATION__APPLICATIONS: |
| getApplications().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case LooseconfigPackage.LOOSE_CONFIGURATION__APPLICATIONS: |
| return applications != null && !applications.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //LooseConfigurationImpl |
| |
| |
| |