justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 1 | /*************************************************************************************************** |
| 2 | * Copyright (c) 2005, 2006 IBM Corporation and others. |
| 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
| 7 | * |
| 8 | * Contributors: |
| 9 | * IBM Corporation - initial API and implementation |
| 10 | * Oracle Corporation - revision |
| 11 | **************************************************************************************************/ |
| 12 | package org.eclipse.jst.jsf.facesconfig.emf.impl; |
| 13 | |
| 14 | import java.util.Collection; |
| 15 | |
| 16 | import org.eclipse.emf.common.notify.Notification; |
| 17 | import org.eclipse.emf.common.notify.NotificationChain; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 18 | import org.eclipse.emf.common.util.EList; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 19 | import org.eclipse.emf.ecore.EClass; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 20 | import org.eclipse.emf.ecore.InternalEObject; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 21 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 22 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 23 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 24 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 25 | import org.eclipse.emf.ecore.util.InternalEList; |
| 26 | import org.eclipse.jst.jsf.facesconfig.emf.ApplicationFactoryType; |
| 27 | import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; |
| 28 | import org.eclipse.jst.jsf.facesconfig.emf.FacesContextFactoryType; |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 29 | import org.eclipse.jst.jsf.facesconfig.emf.FactoryExtensionType; |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 30 | import org.eclipse.jst.jsf.facesconfig.emf.FactoryType; |
| 31 | import org.eclipse.jst.jsf.facesconfig.emf.LifecycleFactoryType; |
| 32 | import org.eclipse.jst.jsf.facesconfig.emf.RenderKitFactoryType; |
| 33 | |
| 34 | |
| 35 | /** |
| 36 | * <!-- begin-user-doc --> |
| 37 | * An implementation of the model object '<em><b>Factory Type</b></em>'. |
| 38 | * <!-- end-user-doc --> |
| 39 | * <p> |
| 40 | * The following features are implemented: |
| 41 | * <ul> |
| 42 | * <li>{@link org.eclipse.jst.jsf.facesconfig.emf.impl.FactoryTypeImpl#getApplicationFactory <em>Application Factory</em>}</li> |
| 43 | * <li>{@link org.eclipse.jst.jsf.facesconfig.emf.impl.FactoryTypeImpl#getFacesContextFactory <em>Faces Context Factory</em>}</li> |
| 44 | * <li>{@link org.eclipse.jst.jsf.facesconfig.emf.impl.FactoryTypeImpl#getLifecycleFactory <em>Lifecycle Factory</em>}</li> |
| 45 | * <li>{@link org.eclipse.jst.jsf.facesconfig.emf.impl.FactoryTypeImpl#getRenderKitFactory <em>Render Kit Factory</em>}</li> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 46 | * <li>{@link org.eclipse.jst.jsf.facesconfig.emf.impl.FactoryTypeImpl#getFactoryExtension <em>Factory Extension</em>}</li> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 47 | * <li>{@link org.eclipse.jst.jsf.facesconfig.emf.impl.FactoryTypeImpl#getId <em>Id</em>}</li> |
| 48 | * </ul> |
| 49 | * </p> |
| 50 | * |
| 51 | * @generated |
| 52 | */ |
| 53 | public class FactoryTypeImpl extends EObjectImpl implements FactoryType { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 54 | /** |
| 55 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 56 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 57 | * @generated |
| 58 | */ |
gkessler | cfc5308 | 2008-11-18 22:25:04 +0000 | [diff] [blame] | 59 | public static final String copyright = "Copyright (c) 2005, 2006 IBM Corporation and others"; //$NON-NLS-1$ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 60 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 61 | /** |
| 62 | * The cached value of the '{@link #getApplicationFactory() <em>Application Factory</em>}' containment reference list. |
| 63 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 64 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 65 | * @see #getApplicationFactory() |
| 66 | * @generated |
| 67 | * @ordered |
| 68 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 69 | protected EList applicationFactory = null; |
| 70 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 71 | /** |
| 72 | * The cached value of the '{@link #getFacesContextFactory() <em>Faces Context Factory</em>}' containment reference list. |
| 73 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 74 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 75 | * @see #getFacesContextFactory() |
| 76 | * @generated |
| 77 | * @ordered |
| 78 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 79 | protected EList facesContextFactory = null; |
| 80 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 81 | /** |
| 82 | * The cached value of the '{@link #getLifecycleFactory() <em>Lifecycle Factory</em>}' containment reference list. |
| 83 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 84 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 85 | * @see #getLifecycleFactory() |
| 86 | * @generated |
| 87 | * @ordered |
| 88 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 89 | protected EList lifecycleFactory = null; |
| 90 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 91 | /** |
| 92 | * The cached value of the '{@link #getRenderKitFactory() <em>Render Kit Factory</em>}' containment reference list. |
| 93 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 94 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 95 | * @see #getRenderKitFactory() |
| 96 | * @generated |
| 97 | * @ordered |
| 98 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 99 | protected EList renderKitFactory = null; |
| 100 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 101 | /** |
| 102 | * The cached value of the '{@link #getFactoryExtension() <em>Factory Extension</em>}' reference list. |
| 103 | * <!-- begin-user-doc --> |
| 104 | * <!-- end-user-doc --> |
| 105 | * @see #getFactoryExtension() |
| 106 | * @generated |
| 107 | * @ordered |
| 108 | */ |
| 109 | protected EList factoryExtension = null; |
| 110 | |
| 111 | /** |
| 112 | * The default value of the '{@link #getId() <em>Id</em>}' attribute. |
| 113 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 114 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 115 | * @see #getId() |
| 116 | * @generated |
| 117 | * @ordered |
| 118 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 119 | protected static final String ID_EDEFAULT = null; |
| 120 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 121 | /** |
| 122 | * The cached value of the '{@link #getId() <em>Id</em>}' attribute. |
| 123 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 124 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 125 | * @see #getId() |
| 126 | * @generated |
| 127 | * @ordered |
| 128 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 129 | protected String id = ID_EDEFAULT; |
| 130 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 131 | /** |
| 132 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 133 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 134 | * @generated |
| 135 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 136 | protected FactoryTypeImpl() { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 137 | super(); |
| 138 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 139 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 140 | /** |
| 141 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 142 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 143 | * @generated |
| 144 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 145 | protected EClass eStaticClass() { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 146 | return FacesConfigPackage.Literals.FACTORY_TYPE; |
| 147 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 148 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 149 | /** |
| 150 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 151 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 152 | * @generated |
| 153 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 154 | public EList getApplicationFactory() { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 155 | if (applicationFactory == null) { |
| 156 | applicationFactory = new EObjectContainmentEList(ApplicationFactoryType.class, this, FacesConfigPackage.FACTORY_TYPE__APPLICATION_FACTORY); |
| 157 | } |
| 158 | return applicationFactory; |
| 159 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 160 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 161 | /** |
| 162 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 163 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 164 | * @generated |
| 165 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 166 | public EList getFacesContextFactory() { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 167 | if (facesContextFactory == null) { |
| 168 | facesContextFactory = new EObjectContainmentEList(FacesContextFactoryType.class, this, FacesConfigPackage.FACTORY_TYPE__FACES_CONTEXT_FACTORY); |
| 169 | } |
| 170 | return facesContextFactory; |
| 171 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 172 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 173 | /** |
| 174 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 175 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 176 | * @generated |
| 177 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 178 | public EList getLifecycleFactory() { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 179 | if (lifecycleFactory == null) { |
| 180 | lifecycleFactory = new EObjectContainmentEList(LifecycleFactoryType.class, this, FacesConfigPackage.FACTORY_TYPE__LIFECYCLE_FACTORY); |
| 181 | } |
| 182 | return lifecycleFactory; |
| 183 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 184 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 185 | /** |
| 186 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 187 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 188 | * @generated |
| 189 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 190 | public EList getRenderKitFactory() { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 191 | if (renderKitFactory == null) { |
| 192 | renderKitFactory = new EObjectContainmentEList(RenderKitFactoryType.class, this, FacesConfigPackage.FACTORY_TYPE__RENDER_KIT_FACTORY); |
| 193 | } |
| 194 | return renderKitFactory; |
| 195 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 196 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 197 | /** |
| 198 | * <!-- begin-user-doc --> |
| 199 | * <!-- end-user-doc --> |
| 200 | * @generated |
| 201 | */ |
| 202 | public EList getFactoryExtension() { |
| 203 | if (factoryExtension == null) { |
| 204 | factoryExtension = new EObjectResolvingEList(FactoryExtensionType.class, this, FacesConfigPackage.FACTORY_TYPE__FACTORY_EXTENSION); |
| 205 | } |
| 206 | return factoryExtension; |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 211 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 212 | * @generated |
| 213 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 214 | public String getId() { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 215 | return id; |
| 216 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 217 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 218 | /** |
| 219 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 220 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 221 | * @generated |
| 222 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 223 | public void setId(String newId) { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 224 | String oldId = id; |
| 225 | id = newId; |
| 226 | if (eNotificationRequired()) |
| 227 | eNotify(new ENotificationImpl(this, Notification.SET, FacesConfigPackage.FACTORY_TYPE__ID, oldId, id)); |
| 228 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 229 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 230 | /** |
| 231 | * <!-- begin-user-doc --> |
| 232 | * <!-- end-user-doc --> |
| 233 | * @generated |
| 234 | */ |
| 235 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 236 | switch (featureID) { |
| 237 | case FacesConfigPackage.FACTORY_TYPE__APPLICATION_FACTORY: |
| 238 | return ((InternalEList)getApplicationFactory()).basicRemove(otherEnd, msgs); |
| 239 | case FacesConfigPackage.FACTORY_TYPE__FACES_CONTEXT_FACTORY: |
| 240 | return ((InternalEList)getFacesContextFactory()).basicRemove(otherEnd, msgs); |
| 241 | case FacesConfigPackage.FACTORY_TYPE__LIFECYCLE_FACTORY: |
| 242 | return ((InternalEList)getLifecycleFactory()).basicRemove(otherEnd, msgs); |
| 243 | case FacesConfigPackage.FACTORY_TYPE__RENDER_KIT_FACTORY: |
| 244 | return ((InternalEList)getRenderKitFactory()).basicRemove(otherEnd, msgs); |
| 245 | } |
| 246 | return super.eInverseRemove(otherEnd, featureID, msgs); |
| 247 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 248 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 249 | /** |
| 250 | * <!-- begin-user-doc --> |
| 251 | * <!-- end-user-doc --> |
| 252 | * @generated |
| 253 | */ |
| 254 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 255 | switch (featureID) { |
| 256 | case FacesConfigPackage.FACTORY_TYPE__APPLICATION_FACTORY: |
| 257 | return getApplicationFactory(); |
| 258 | case FacesConfigPackage.FACTORY_TYPE__FACES_CONTEXT_FACTORY: |
| 259 | return getFacesContextFactory(); |
| 260 | case FacesConfigPackage.FACTORY_TYPE__LIFECYCLE_FACTORY: |
| 261 | return getLifecycleFactory(); |
| 262 | case FacesConfigPackage.FACTORY_TYPE__RENDER_KIT_FACTORY: |
| 263 | return getRenderKitFactory(); |
| 264 | case FacesConfigPackage.FACTORY_TYPE__FACTORY_EXTENSION: |
| 265 | return getFactoryExtension(); |
| 266 | case FacesConfigPackage.FACTORY_TYPE__ID: |
| 267 | return getId(); |
| 268 | } |
| 269 | return super.eGet(featureID, resolve, coreType); |
| 270 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 271 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 272 | /** |
| 273 | * <!-- begin-user-doc --> |
| 274 | * <!-- end-user-doc --> |
| 275 | * @generated |
| 276 | */ |
| 277 | public void eSet(int featureID, Object newValue) { |
| 278 | switch (featureID) { |
| 279 | case FacesConfigPackage.FACTORY_TYPE__APPLICATION_FACTORY: |
| 280 | getApplicationFactory().clear(); |
| 281 | getApplicationFactory().addAll((Collection)newValue); |
| 282 | return; |
| 283 | case FacesConfigPackage.FACTORY_TYPE__FACES_CONTEXT_FACTORY: |
| 284 | getFacesContextFactory().clear(); |
| 285 | getFacesContextFactory().addAll((Collection)newValue); |
| 286 | return; |
| 287 | case FacesConfigPackage.FACTORY_TYPE__LIFECYCLE_FACTORY: |
| 288 | getLifecycleFactory().clear(); |
| 289 | getLifecycleFactory().addAll((Collection)newValue); |
| 290 | return; |
| 291 | case FacesConfigPackage.FACTORY_TYPE__RENDER_KIT_FACTORY: |
| 292 | getRenderKitFactory().clear(); |
| 293 | getRenderKitFactory().addAll((Collection)newValue); |
| 294 | return; |
| 295 | case FacesConfigPackage.FACTORY_TYPE__FACTORY_EXTENSION: |
| 296 | getFactoryExtension().clear(); |
| 297 | getFactoryExtension().addAll((Collection)newValue); |
| 298 | return; |
| 299 | case FacesConfigPackage.FACTORY_TYPE__ID: |
| 300 | setId((String)newValue); |
| 301 | return; |
| 302 | } |
| 303 | super.eSet(featureID, newValue); |
| 304 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 305 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 306 | /** |
| 307 | * <!-- begin-user-doc --> |
| 308 | * <!-- end-user-doc --> |
| 309 | * @generated |
| 310 | */ |
| 311 | public void eUnset(int featureID) { |
| 312 | switch (featureID) { |
| 313 | case FacesConfigPackage.FACTORY_TYPE__APPLICATION_FACTORY: |
| 314 | getApplicationFactory().clear(); |
| 315 | return; |
| 316 | case FacesConfigPackage.FACTORY_TYPE__FACES_CONTEXT_FACTORY: |
| 317 | getFacesContextFactory().clear(); |
| 318 | return; |
| 319 | case FacesConfigPackage.FACTORY_TYPE__LIFECYCLE_FACTORY: |
| 320 | getLifecycleFactory().clear(); |
| 321 | return; |
| 322 | case FacesConfigPackage.FACTORY_TYPE__RENDER_KIT_FACTORY: |
| 323 | getRenderKitFactory().clear(); |
| 324 | return; |
| 325 | case FacesConfigPackage.FACTORY_TYPE__FACTORY_EXTENSION: |
| 326 | getFactoryExtension().clear(); |
| 327 | return; |
| 328 | case FacesConfigPackage.FACTORY_TYPE__ID: |
| 329 | setId(ID_EDEFAULT); |
| 330 | return; |
| 331 | } |
| 332 | super.eUnset(featureID); |
| 333 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 334 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 335 | /** |
| 336 | * <!-- begin-user-doc --> |
| 337 | * <!-- end-user-doc --> |
| 338 | * @generated |
| 339 | */ |
| 340 | public boolean eIsSet(int featureID) { |
| 341 | switch (featureID) { |
| 342 | case FacesConfigPackage.FACTORY_TYPE__APPLICATION_FACTORY: |
| 343 | return applicationFactory != null && !applicationFactory.isEmpty(); |
| 344 | case FacesConfigPackage.FACTORY_TYPE__FACES_CONTEXT_FACTORY: |
| 345 | return facesContextFactory != null && !facesContextFactory.isEmpty(); |
| 346 | case FacesConfigPackage.FACTORY_TYPE__LIFECYCLE_FACTORY: |
| 347 | return lifecycleFactory != null && !lifecycleFactory.isEmpty(); |
| 348 | case FacesConfigPackage.FACTORY_TYPE__RENDER_KIT_FACTORY: |
| 349 | return renderKitFactory != null && !renderKitFactory.isEmpty(); |
| 350 | case FacesConfigPackage.FACTORY_TYPE__FACTORY_EXTENSION: |
| 351 | return factoryExtension != null && !factoryExtension.isEmpty(); |
| 352 | case FacesConfigPackage.FACTORY_TYPE__ID: |
| 353 | return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); |
| 354 | } |
| 355 | return super.eIsSet(featureID); |
| 356 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 357 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 358 | /** |
| 359 | * <!-- begin-user-doc --> |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 360 | * <!-- end-user-doc --> |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 361 | * @generated |
| 362 | */ |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 363 | public String toString() { |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 364 | if (eIsProxy()) return super.toString(); |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 365 | |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 366 | StringBuffer result = new StringBuffer(super.toString()); |
gkessler | cfc5308 | 2008-11-18 22:25:04 +0000 | [diff] [blame] | 367 | result.append(" (id: "); //$NON-NLS-1$ |
cbateman | 39c1542 | 2006-12-21 02:36:52 +0000 | [diff] [blame] | 368 | result.append(id); |
| 369 | result.append(')'); |
| 370 | return result.toString(); |
| 371 | } |
justinchen | 7f57f4a | 2006-04-27 23:42:48 +0000 | [diff] [blame] | 372 | |
| 373 | } //FactoryTypeImpl |