blob: 524c078975f9a2bd84c50c3f19ea8fbc2abe0304 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*******************************************************************************
* Copyright (c) 2001, 2005 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.ejb.internal.util;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
public class EJBAttributeMaintenanceFactoryImpl extends EjbAdapterFactory {
public static final String ADAPTER_KEY = "EJBAttributeMaintenance"; //$NON-NLS-1$
public EJBAttributeMaintenanceFactoryImpl() {
super();
}
/* (non-Javadoc)
* @see org.eclipse.jst.j2ee.internal.ejb.util.EjbAdapterFactory#createAdapter(org.eclipse.emf.common.notify.Notifier)
*/
@Override
public Adapter createAdapter(Notifier target) {
Adapter targetAdapter = (Adapter) modelSwitch.doSwitch((EObject)target);
return ExtendedEcoreUtil.createAdapterForLoading(targetAdapter, (EObject) target);
}
@Override
public Adapter createEJBRelationAdapter() {
return new EJBRelationAttributeMaintenanceAdapter();
}
@Override
public Adapter createRelationshipsAdapter() {
return new RelationshipsAttributeMaintenanceAdapter();
}
@Override
public boolean isFactoryForType(Object type) {
return ADAPTER_KEY == type;
}
}
|