Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal')
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AbstractRelationshipRoleAttributeFilter.java99
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AbstractRequiredRelationshipRoleFilter.java115
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ActivationConfigImpl.java185
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ActivationConfigPropertyImpl.java217
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AssemblyDescriptorImpl.java484
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/CMPAttributeImpl.java399
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/CMRFieldImpl.java267
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ContainerManagedEntityFilter.java101
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ContainerManagedEntityImpl.java821
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJB20FlattenedRoleShapeStrategy.java170
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBJarImpl.java733
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBJarResourceFactory.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBMethodCategoryImpl.java41
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBRelationImpl.java448
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBRelationshipRoleImpl.java1012
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java223
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EjbFactoryImpl.java705
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EjbPackageImpl.java1789
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EnterpriseBeanImpl.java1292
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EntityImpl.java317
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ExcludeListImpl.java244
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/KeyRelationshipRoleAttributeFilter.java93
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/KeyRelationshipRoleFilter.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalKeyAttributeFilter.java102
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalModelledPersistentAttributeFilter.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalOppositeRelationshipRoleFilter.java57
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalPersistentAttributeFilter.java103
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalRelationshipRoleAttributeFilter.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalRelationshipRoleKeyAttributeFilter.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MessageDrivenDestinationImpl.java360
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MessageDrivenImpl.java679
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodElementImpl.java1041
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodPermissionImpl.java465
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodTransactionImpl.java432
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ModelledKeyAttributeFilter.java105
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ModelledPersistentAttributeFilter.java105
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/NonKeyRequiredRoleFilter.java61
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/QueryImpl.java513
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/QueryMethodImpl.java307
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RelationshipRoleAttributeFilter.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RelationshipsImpl.java313
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RequiredLocalRelationshipRoleFilter.java91
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RequiredRelationshipRoleFilter.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RoleShapeStrategy.java171
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RoleSourceImpl.java330
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SessionImpl.java344
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SupertypeCMPAttributeFilter.java117
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPFieldDescriptor.java66
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPHelper.java263
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPKeySynchronizationAdapter.java399
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CommonRelationshipAttributeMaintenanceAdapter.java173
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/ConvertedEJBAdapter.java68
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EJBAttributeMaintenanceFactoryImpl.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EJBRelationAttributeMaintenanceAdapter.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EjbAdapterFactory.java670
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EjbSwitch.java836
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/MDBActivationConfigModelUtil.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/MethodElementHelper.java61
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/RelationshipsAttributeMaintenanceAdapter.java57
59 files changed, 0 insertions, 18682 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AbstractRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AbstractRelationshipRoleAttributeFilter.java
deleted file mode 100644
index a05f6ee09..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AbstractRelationshipRoleAttributeFilter.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-
-/**
- * Insert the type's description here.
- * Creation date: (11/28/2000 7:06:49 PM)
- * @author: Administrator
- */
-public abstract class AbstractRelationshipRoleAttributeFilter extends ContainerManagedEntityFilter {
-/**
- * AbstractRelationshipRoleAttributeFilter constructor comment.
- */
-public AbstractRelationshipRoleAttributeFilter() {
- super();
-}
-/**
- * filter method comment.
- */
-public List filter(ContainerManagedEntity cmp) {
- List attributes = new ArrayList();
- Iterator it = getSourceRoles(cmp).iterator();
- CommonRelationshipRole role;
- while (it.hasNext()) {
- role = (CommonRelationshipRole) it.next();
- attributes.addAll(role.getAttributes());
- }
- return attributes;
-}
-/**
- * Return the proper list of roles from cmpExt.
- */
-protected abstract java.util.List getSourceRoles(ContainerManagedEntity cmpExt) ;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AbstractRequiredRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AbstractRequiredRelationshipRoleFilter.java
deleted file mode 100644
index 765ec1ef6..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AbstractRequiredRelationshipRoleFilter.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-/**
- * Insert the type's description here.
- * Creation date: (10/15/2001 11:37:19 AM)
- * @author: Administrator
- */
-public abstract class AbstractRequiredRelationshipRoleFilter extends ContainerManagedEntityFilter {
-/**
- * AbstractRequiredRelationshipRoleFilter constructor comment.
- */
-public AbstractRequiredRelationshipRoleFilter() {
- super();
-}
-/**
- * filter method comment.
- */
-public List filter(ContainerManagedEntity cmp) {
- List roles = new ArrayList();
- List allRoles = getRolesToFilter(cmp);
- CommonRelationshipRole role;
- for (int i = 0; i < allRoles.size(); i++) {
- role = (CommonRelationshipRole) allRoles.get(i);
- if (shouldAddFilteredResult(role))
- roles.add(role);
- }
- return roles;
-}
-protected abstract java.util.List getRolesToFilter(ContainerManagedEntity cmp) ;
-/**
- * Return true if the multiplicity for @aRole is required.
- */
-protected boolean shouldAddFilteredResult(CommonRelationshipRole aRole) {
- boolean required = aRole.isRequired();
- if (required) {
- CommonRelationshipRole opposite = aRole.getOppositeAsCommonRole();
- if (opposite != null) {
- if (opposite.isRequired() && !aRole.isKey()) {
- if (opposite.isKey() || aRole.isMany())
- return false;
- if (!opposite.isMany())
- //both are single and not key
- return aRole.isForward();
- }
- }
- }
- return required;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ActivationConfigImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ActivationConfigImpl.java
deleted file mode 100644
index ff858f5d2..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ActivationConfigImpl.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * 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.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.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.ActivationConfig;
-import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Activation Config</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.j2ee.ejb.internal.impl.ActivationConfigImpl#getConfigProperties <em>Config Properties</em>}</li>
- * <li>{@link org.eclipse.jst.j2ee.ejb.internal.impl.ActivationConfigImpl#getDescriptions <em>Descriptions</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ActivationConfigImpl extends J2EEEObjectImpl implements ActivationConfig {
- /**
- * The cached value of the '{@link #getConfigProperties() <em>Config Properties</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getConfigProperties()
- * @generated
- * @ordered
- */
- protected EList configProperties = null;
-
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ActivationConfigImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.ACTIVATION_CONFIG;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getConfigProperties() {
- if (configProperties == null) {
- configProperties = new EObjectContainmentEList(ActivationConfigProperty.class, this, EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES);
- }
- return configProperties;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES:
- return ((InternalEList)getConfigProperties()).basicRemove(otherEnd, msgs);
- case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES:
- return getConfigProperties();
- case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES:
- getConfigProperties().clear();
- getConfigProperties().addAll((Collection)newValue);
- return;
- case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES:
- getConfigProperties().clear();
- return;
- case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG__CONFIG_PROPERTIES:
- return configProperties != null && !configProperties.isEmpty();
- case EjbPackage.ACTIVATION_CONFIG__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} //ActivationConfigImpl
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ActivationConfigPropertyImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ActivationConfigPropertyImpl.java
deleted file mode 100644
index 8c22e5486..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ActivationConfigPropertyImpl.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Activation Config Property</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.jst.j2ee.ejb.internal.impl.ActivationConfigPropertyImpl#getValue <em>Value</em>}</li>
- * <li>{@link org.eclipse.jst.j2ee.ejb.internal.impl.ActivationConfigPropertyImpl#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ActivationConfigPropertyImpl extends J2EEEObjectImpl implements ActivationConfigProperty {
- /**
- * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected static final String VALUE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValue()
- * @generated
- * @ordered
- */
- protected String value = VALUE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ActivationConfigPropertyImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.ACTIVATION_CONFIG_PROPERTY;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getValue() {
- return value;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setValue(String newValue) {
- String oldValue = value;
- value = newValue;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE, oldValue, value));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE:
- return getValue();
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE:
- setValue((String)newValue);
- return;
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE:
- setValue(VALUE_EDEFAULT);
- return;
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY__VALUE:
- return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (value: ");
- result.append(value);
- result.append(", name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //ActivationConfigPropertyImpl
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AssemblyDescriptorImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AssemblyDescriptorImpl.java
deleted file mode 100644
index 243e5397a..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/AssemblyDescriptorImpl.java
+++ /dev/null
@@ -1,484 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jst.j2ee.common.MessageDestination;
-import org.eclipse.jst.j2ee.common.SecurityRole;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-
-
-/**
- * The assembly-descriptor element contains application-assembly information. The application-assembly information consists of the following parts: the definition of security roles, the definition of method permissions, and the definition of transaction attributes for enterprise beans with container-managed transaction demarcation. All the parts are optional in the sense that they are omitted if the lists represented by them are empty. Providing an assembly-descriptor in the deployment descriptor is optional for the ejb-jar file producer.
- * @generated
- */
-public class AssemblyDescriptorImpl extends J2EEEObjectImpl implements AssemblyDescriptor {
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList methodPermissions = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList methodTransactions = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList securityRoles = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected ExcludeList excludeList = null;
- /**
- * The cached value of the '{@link #getMessageDestinations() <em>Message Destinations</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMessageDestinations()
- * @generated
- * @ordered
- */
- protected EList messageDestinations = null;
-
- public AssemblyDescriptorImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.ASSEMBLY_DESCRIPTOR;
- }
-
-/**
- * Return the first method permission that contains all the roles in securityRoles and
- * is the same size
- */
-
-public MethodPermission getMethodPermission(List securityRolesList) {
- List permissions = getMethodPermissions();
- MethodPermission temp = null;
- for (int i = 0; i < permissions.size(); i++) {
- temp = (MethodPermission) permissions.get(i);
- if (temp.getRoles().containsAll(securityRolesList) && temp.getRoles().size() == securityRolesList.size())
- return temp;
- }
- return null;
-}
-public List getMethodPermissionMethodElements(EnterpriseBean anEJB) {
- List allMethodElements = new ArrayList();
- List permissions = getMethodPermissions();
- MethodPermission permission;
- for (int i = 0; i < permissions.size(); i++){
- permission = (MethodPermission) permissions.get(i);
- allMethodElements.addAll(permission.getMethodElements(anEJB));
- }
- return allMethodElements;
-}
-
-
-public List getMethodTransactionMethodElements(EnterpriseBean anEJB) {
- List allMethodElements = new ArrayList();
- List transactions = getMethodTransactions();
- MethodTransaction transaction;
- for (int i = 0; i < transactions.size(); i++){
- transaction = (MethodTransaction) transactions.get(i);
- allMethodElements.addAll(transaction.getMethodElements(anEJB));
- }
- return allMethodElements;
-}
-
-public SecurityRole getSecurityRoleNamed(String roleName) {
- java.util.List tempRoles = getSecurityRoles();
- SecurityRole role;
- for (int i = 0; i < tempRoles.size(); i++) {
- role = (SecurityRole) tempRoles.get(i);
- if (role.getRoleName().equals(roleName))
- return role;
- }
- return null;
-}
-
-/**
- * @see org.eclipse.jst.j2ee.internal.ejb.AssemblyDescriptor
- */
-public void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName) {
- SecurityRole role = getSecurityRoleNamed(existingRoleName);
- role.setRoleName(newRoleName);
-}
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getMethodPermissions() {
- if (methodPermissions == null) {
- methodPermissions = new EObjectContainmentWithInverseEList(MethodPermission.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR);
- }
- return methodPermissions;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Specifies how the container must manage transaction scopes for the enterprise
- * bean's method invocations. The element consists of an optional description, a
- * list of method elements, and a transaction attribute.The transaction attribute
- * is to be applied to all the specified methods.
- */
- public EList getMethodTransactions() {
- if (methodTransactions == null) {
- methodTransactions = new EObjectContainmentWithInverseEList(MethodTransaction.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR);
- }
- return methodTransactions;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EJBJar getEjbJar() {
- if (eContainerFeatureID != EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR) return null;
- return (EJBJar)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetEjbJar(EJBJar newEjbJar, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setEjbJar(EJBJar newEjbJar) {
- if (newEjbJar != eInternalContainer() || (eContainerFeatureID != EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR && newEjbJar != null)) {
- if (EcoreUtil.isAncestor(this, newEjbJar))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newEjbJar != null)
- msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, EJBJar.class, msgs);
- msgs = basicSetEjbJar(newEjbJar, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, newEjbJar, newEjbJar));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getSecurityRoles() {
- if (securityRoles == null) {
- securityRoles = new EObjectContainmentEList(SecurityRole.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES);
- }
- return securityRoles;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public ExcludeList getExcludeList() {
- return excludeList;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetExcludeList(ExcludeList newExcludeList, NotificationChain msgs) {
- ExcludeList oldExcludeList = excludeList;
- excludeList = newExcludeList;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, oldExcludeList, newExcludeList);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setExcludeList(ExcludeList newExcludeList) {
- if (newExcludeList != excludeList) {
- NotificationChain msgs = null;
- if (excludeList != null)
- msgs = ((InternalEObject)excludeList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, null, msgs);
- if (newExcludeList != null)
- msgs = ((InternalEObject)newExcludeList).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, null, msgs);
- msgs = basicSetExcludeList(newExcludeList, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST, newExcludeList, newExcludeList));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getMessageDestinations() {
- if (messageDestinations == null) {
- messageDestinations = new EObjectContainmentEList(MessageDestination.class, this, EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS);
- }
- return messageDestinations;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS:
- return ((InternalEList)getMethodPermissions()).basicAdd(otherEnd, msgs);
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS:
- return ((InternalEList)getMethodTransactions()).basicAdd(otherEnd, msgs);
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetEjbJar((EJBJar)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS:
- return ((InternalEList)getMethodPermissions()).basicRemove(otherEnd, msgs);
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS:
- return ((InternalEList)getMethodTransactions()).basicRemove(otherEnd, msgs);
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR:
- return basicSetEjbJar(null, msgs);
- case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES:
- return ((InternalEList)getSecurityRoles()).basicRemove(otherEnd, msgs);
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST:
- return basicSetExcludeList(null, msgs);
- case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS:
- return ((InternalEList)getMessageDestinations()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR:
- return eInternalContainer().eInverseRemove(this, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, EJBJar.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS:
- return getMethodPermissions();
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS:
- return getMethodTransactions();
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR:
- return getEjbJar();
- case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES:
- return getSecurityRoles();
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST:
- return getExcludeList();
- case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS:
- return getMessageDestinations();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS:
- getMethodPermissions().clear();
- getMethodPermissions().addAll((Collection)newValue);
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS:
- getMethodTransactions().clear();
- getMethodTransactions().addAll((Collection)newValue);
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR:
- setEjbJar((EJBJar)newValue);
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES:
- getSecurityRoles().clear();
- getSecurityRoles().addAll((Collection)newValue);
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST:
- setExcludeList((ExcludeList)newValue);
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS:
- getMessageDestinations().clear();
- getMessageDestinations().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS:
- getMethodPermissions().clear();
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS:
- getMethodTransactions().clear();
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR:
- setEjbJar((EJBJar)null);
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES:
- getSecurityRoles().clear();
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST:
- setExcludeList((ExcludeList)null);
- return;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS:
- getMessageDestinations().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS:
- return methodPermissions != null && !methodPermissions.isEmpty();
- case EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS:
- return methodTransactions != null && !methodTransactions.isEmpty();
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR:
- return getEjbJar() != null;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__SECURITY_ROLES:
- return securityRoles != null && !securityRoles.isEmpty();
- case EjbPackage.ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST:
- return excludeList != null;
- case EjbPackage.ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS:
- return messageDestinations != null && !messageDestinations.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * Remove the MethodElements that are referencing @anEJB.
- */
- public void removeData(EnterpriseBean anEJB) {
- if (anEJB != null) {
- removeMethodPermissionData(anEJB);
- removeMethodTransactionData(anEJB);
- }
- }
- /**
- * Remove the MethodElements that are referencing @anEJB.
- */
- protected void removeMethodPermissionData(EnterpriseBean anEJB) {
- List mes = getMethodPermissionMethodElements(anEJB);
- MethodElement me;
- MethodPermission mp;
- for (int i = 0; i < mes.size(); i++){
- me = (MethodElement) mes.get(i);
- mp = (MethodPermission)me.eContainer();
- if (mp.getMethodElements().size() == 1){
- ExtendedEcoreUtil.becomeProxy(mp, mp.eResource());
- getMethodPermissions().remove(mp);
- }
- else{
- ExtendedEcoreUtil.becomeProxy(me, me.eResource());
- mp.getMethodElements().remove(me);
- }
- }
- }
- /**
- * Remove the MethodElements that are referencing @anEJB.
- */
- protected void removeMethodTransactionData(EnterpriseBean anEJB) {
- List mes = getMethodTransactionMethodElements(anEJB);
- MethodElement me;
- MethodTransaction mt;
- for (int i = 0; i < mes.size(); i++){
- me = (MethodElement) mes.get(i);
- mt = (MethodTransaction)me.eContainer();
- if (mt.getMethodElements().size() == 1){
- ExtendedEcoreUtil.becomeProxy(mt, mt.eResource());
- getMethodTransactions().remove(mt);
- }
- else{
- ExtendedEcoreUtil.becomeProxy(me, me.eResource());
- mt.getMethodElements().remove(me);
- }
- }
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/CMPAttributeImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/CMPAttributeImpl.java
deleted file mode 100644
index de2d0c74a..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/CMPAttributeImpl.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.EAttributeImpl;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jem.java.Field;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaHelpers;
-import org.eclipse.jem.java.JavaRefPackage;
-import org.eclipse.jem.java.Method;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-
-/**
- * Describes a container-managed field. The field element includes an optional description of the field, and the name of the field.
-
- */
-public class CMPAttributeImpl extends EAttributeImpl implements CMPAttribute, EAttribute {
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- protected transient JavaHelpers originatingType;
- protected transient CMPAttribute targetAttribute;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- protected boolean derived;
-
- public CMPAttributeImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.CMP_ATTRIBUTE;
- }
-
-protected Field findExistingField() {
- JavaClass javaClass = getEjbClass();
- if (javaClass != null)
- return javaClass.getFieldExtended(getName());
- return null;
-}
-public org.eclipse.emf.ecore.EClassifier getAccessorType() {
- if (getEjbClass() != null) {
- Method getter = getEjbClass().getMethodExtended(getGetterName(), Collections.EMPTY_LIST);
- if (getter != null)
- return getter.getReturnType();
- }
- return null;
-}
-public ContainerManagedEntity getCMPEntity() {
- return (ContainerManagedEntity) eContainer();
-}
-/**
- * Return the EjbClass from the CMP Entity.
- */
-
-protected JavaClass getEjbClass() {
- ContainerManagedEntity ejb = getCMPEntity();
- return ejb == null ? null : ejb.getEjbClass();
-}
-/**
- * Return the KeyClass from the CMP Entity.
- */
-
-protected JavaClass getKeyClass() {
- ContainerManagedEntity ejb = getCMPEntity();
- return ejb == null ? null : ejb.getPrimaryKey();
-}
-/**
- * @deprecated - With EJB 2.0, assuming a Java field is no longer safe.
- * Use getType() and getName() to get the most common field info.
- * Or use getEjbClass() to get additional Java info.
- */
-
- public Field getField() {
- ContainerManagedEntity ejb = getCMPEntity();
-
- if(ejb == null)
- return null;
-
- Field field = null;
- switch(ejb.getVersionID()) {
- case J2EEVersionConstants.EJB_1_0_ID:
- case J2EEVersionConstants.EJB_1_1_ID:
- field = findExistingField();
- //Set the field type based on the attribute type if necessary
- if (field != null && getEType() != null && field.getEType() == null)
- field.setEType(getEType());
- break;
- case J2EEVersionConstants.EJB_2_0_ID:
- case J2EEVersionConstants.EJB_2_1_ID: default:
- field = ((JavaRefPackage)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI)).getJavaRefFactory().createField();
- field.setName(getName());
- field.setEType(getAccessorType());
- break;
- }
- return field;
-}
-public String getGetterName() {
- if (name != null && name.length() > 0) {
- StringBuffer b = new StringBuffer("get"); //$NON-NLS-1$
-
- b.append(Character.toUpperCase(name.charAt(0))).append(name.length() > 1 ? name.substring(1) : ""); //$NON-NLS-1$
- return b.toString();
- }
- return name;
-}
-/**
- * Return the type of this attribute in its original form (i.e., unwrapped if
- * the type has been wrapped).
- */
-public JavaHelpers getOriginatingType() {
- return originatingType;
-}
-public String getSetterName() {
- return "set" + Character.toUpperCase(getName().charAt(0)) + (getName().length() > 1 ? getName().substring(1) : ""); //$NON-NLS-1$ //$NON-NLS-2$
-}
-public JavaHelpers getType() {
- if (getEType() != null)
- return (JavaHelpers) getEType();
- // Be sensitive to CMP 2.0 beans, get type from field or get accessor type
- ContainerManagedEntity ejb = getCMPEntity();
- Resource res = eResource();
- boolean modFlag = res == null ? false : res.isModified();
- boolean deliveryFlag = eDeliver();
- try {
- eSetDeliver(false);
- if(ejb != null) {
- switch(ejb.getVersionID()) {
- case J2EEVersionConstants.EJB_1_0_ID:
- case J2EEVersionConstants.EJB_1_1_ID:
- setEType(getTypeFromBeanField());
- break;
- case J2EEVersionConstants.EJB_2_0_ID:
- case J2EEVersionConstants.EJB_2_1_ID: default:
- setEType(get20Type());
- break;
- }
- }
- } finally {
- eSetDeliver(deliveryFlag);
- if (res != null && res.isTrackingModification())
- res.setModified(modFlag);
- }
- return (JavaHelpers) getEType();
-}
-protected EClassifier getTypeFromBeanField() {
- EClassifier type = null;
- Field field = getField();
- if (field != null)
- type = field.getEType();
- if (type == null)
- type = getKeyFieldTypeFromKeyClass();
- return type;
-}
-public EClassifier get20Type() {
- EClassifier type = null;
- if (getEjbClass() != null) {
- String getterName = getGetterName();
- if (getterName != null && getterName.length() > 0) {
- Method getter = getEjbClass().getMethodExtended(getterName, Collections.EMPTY_LIST);
- if (getter != null)
- type = getter.getReturnType();
- }
- }
- if (type == null)
- type = getKeyFieldTypeFromKeyClass();
- return type;
-}
-/**
- * @return
- */
-private EClassifier getKeyFieldTypeFromKeyClass() {
- if (isKey()) {
- JavaClass key = getCMPEntity().getPrimaryKey();
- if (key != null && key.getQualifiedName() != null && !key.getQualifiedName().startsWith("java.lang")) { //$NON-NLS-1$
- Field field = key.getFieldExtended(getName());
- if (field != null)
- return field.getEType();
- } else
- return key;
- }
- return null;
-}
-public boolean isCMRField() {
- return false;
-}
-public boolean isKey() {
- return getCMPEntity() == null ? false : getCMPEntity().isKeyAttribute(this);
-}
-
-public boolean isPrimKeyField(){
- return getCMPEntity() == null ? false : getCMPEntity().getPrimKeyField() == this;
-}
-
-public void setOriginatingType(JavaHelpers newOriginatingType) {
- originatingType = newOriginatingType;
-}
- /**
- * @generated This field/method will be replaced during code generation
- * The description is used by the ejb-jar file producer to provide text describing the cmr field.
- *
- * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMP_ATTRIBUTE__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION:
- return getDescription();
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.CMP_ATTRIBUTE__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * This field/method will be replaced during code generation.
- */
- public String toString() {
- return super.toString() + " :: " + getName(); //$NON-NLS-1$
- }
- /**
- * Returns true if a targetAttribute is being used.
- * @return Returns a boolean
- */
- public boolean isDerived() {
- return derived;
- }
- public void setDerived(boolean aBoolean) {
- if (aBoolean && getEType() == null)
- getType(); //This ensures that the type is set.
- derived = aBoolean;
- }
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toStringGen() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
-}
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/CMRFieldImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/CMRFieldImpl.java
deleted file mode 100644
index 70d85a122..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/CMRFieldImpl.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaRefFactory;
-import org.eclipse.jst.j2ee.ejb.CMRField;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-
-/**
- * Describes the bean provider's view of a relationship. It consists of an optional description, and the name and the class type of a field in the source of a role of a relationship. The CMRField::name element corresponds to the name used for the get and set accessor methods for the relationship. The CMRField::type element is used only for collection-valued CMRFields. It specifies the type of the collection that is used (a java class name).
- *
- * @generated
- */
-public class CMRFieldImpl extends CMPAttributeImpl implements CMRField {
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected JavaClass collectionType = null;
- public CMRFieldImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.CMR_FIELD;
- }
-
-/**
- * createClassRef - return a JavaURL reference to the named Java class
- */
-public JavaClass createClassRef(String targetName) {
- return JavaRefFactory.eINSTANCE.createClassRef(targetName);
-}
-public String getCollectionTypeName() {
- getCollectionType();
- return collectionType == null ? null : collectionType.getQualifiedName();
-}
-
-public boolean isPrimKeyField(){
- return false;
-}
-
-public boolean isCMRField() {
- return true;
-}
-public void setCollectionTypeName(String typeName) {
- eSet(EjbPackage.eINSTANCE.getCMRField_CollectionType(), createClassRef(typeName));
-}
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EJBRelationshipRole getRole() {
- if (eContainerFeatureID != EjbPackage.CMR_FIELD__ROLE) return null;
- return (EJBRelationshipRole)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetRole(EJBRelationshipRole newRole, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newRole, EjbPackage.CMR_FIELD__ROLE, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRole(EJBRelationshipRole newRole) {
- if (newRole != eInternalContainer() || (eContainerFeatureID != EjbPackage.CMR_FIELD__ROLE && newRole != null)) {
- if (EcoreUtil.isAncestor(this, newRole))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newRole != null)
- msgs = ((InternalEObject)newRole).eInverseAdd(this, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, EJBRelationshipRole.class, msgs);
- msgs = basicSetRole(newRole, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMR_FIELD__ROLE, newRole, newRole));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public JavaClass getCollectionType() {
- if (collectionType != null && collectionType.eIsProxy()) {
- InternalEObject oldCollectionType = (InternalEObject)collectionType;
- collectionType = (JavaClass)eResolveProxy(oldCollectionType);
- if (collectionType != oldCollectionType) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.CMR_FIELD__COLLECTION_TYPE, oldCollectionType, collectionType));
- }
- }
- return collectionType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetCollectionType() {
- return collectionType;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setCollectionType(JavaClass newCollectionType) {
- JavaClass oldCollectionType = collectionType;
- collectionType = newCollectionType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CMR_FIELD__COLLECTION_TYPE, oldCollectionType, collectionType));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.CMR_FIELD__ROLE:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetRole((EJBRelationshipRole)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.CMR_FIELD__ROLE:
- return basicSetRole(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.CMR_FIELD__ROLE:
- return eInternalContainer().eInverseRemove(this, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, EJBRelationshipRole.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.CMR_FIELD__ROLE:
- return getRole();
- case EjbPackage.CMR_FIELD__COLLECTION_TYPE:
- if (resolve) return getCollectionType();
- return basicGetCollectionType();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.CMR_FIELD__ROLE:
- setRole((EJBRelationshipRole)newValue);
- return;
- case EjbPackage.CMR_FIELD__COLLECTION_TYPE:
- setCollectionType((JavaClass)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.CMR_FIELD__ROLE:
- setRole((EJBRelationshipRole)null);
- return;
- case EjbPackage.CMR_FIELD__COLLECTION_TYPE:
- setCollectionType((JavaClass)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.CMR_FIELD__ROLE:
- return getRole() != null;
- case EjbPackage.CMR_FIELD__COLLECTION_TYPE:
- return collectionType != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @see org.eclipse.jst.j2ee.ejb.internal.impl.CMPAttributeImpl#getCMPEntity()
- */
- public ContainerManagedEntity getCMPEntity() {
- EJBRelationshipRole role = getRole();
- if (role != null)
- return role.getSourceEntity();
- return null;
- }
-
-
-}
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ContainerManagedEntityFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ContainerManagedEntityFilter.java
deleted file mode 100644
index 206558b69..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ContainerManagedEntityFilter.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EJBExtensionFilter;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper;
-import org.eclipse.jst.j2ee.internal.IEJBModelExtenderManager;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-
-
-/**
- * Insert the type's description here. Creation date: (11/28/2000 6:28:39 PM)
- * @author: Administrator
- */
-public abstract class ContainerManagedEntityFilter implements EJBExtensionFilter {
-
-
- /**
- * AttributeFilter constructor comment.
- */
- public ContainerManagedEntityFilter() {
- super();
- }
-
- /**
- * filter method comment.
- */
- public abstract List filter(ContainerManagedEntity cmp);
-
- /**
- * All CMPAttributeFilters only operate on ContainerManagedEntityExtension
- * objects.
- */
- public List filter(EnterpriseBean ejb) {
- if (ejb.isEntity() && ((Entity) ejb).isContainerManagedEntity()) return filter((ContainerManagedEntity) ejb);
- return new ArrayList();
- }
-
- protected void filterRoleAttributesByName(List allAttributes, List roleAttributes) {
- if (!roleAttributes.isEmpty()) {
- int allSize, roleSize;
- roleSize = roleAttributes.size();
- CMPAttribute roleAtt, allAtt;
- for (int i = 0; i < roleSize; i++) {
- roleAtt = (CMPAttribute) roleAttributes.get(i);
- allSize = allAttributes.size();
- for (int j = allSize - 1; j != -1; j--) {
- allAtt = (CMPAttribute) allAttributes.get(j);
- if (roleAtt == allAtt || roleAtt.getName().equals(allAtt.getName())) {
- allAttributes.remove(j);
- break;
- }
- }
- }
- }
- }
-
- protected EjbModuleExtensionHelper getEjbModuleExtHelper(Object context) {
- return IEJBModelExtenderManager.INSTANCE.getEJBModuleExtension(context);
- }
-
- protected List getLocalRelationshipRoles(ContainerManagedEntity cmp) {
- EjbModuleExtensionHelper modelExtender = null;
- if (cmp.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID)
- return cmp.getRoles();
- else if ( (modelExtender = getEjbModuleExtHelper(cmp)) != null ){
- return modelExtender.getLocalRelationshipRoles_cmp11(cmp);
- }
- return Collections.EMPTY_LIST;
- }
-
- protected List getRelationshipRoles(ContainerManagedEntity cmp) {
- List roles = new ArrayList();
- collectRelationshipRoles(cmp, getEjbModuleExtHelper(cmp), roles);
- return Collections.unmodifiableList(roles);
- }
-
- public void collectRelationshipRoles(ContainerManagedEntity cmp, EjbModuleExtensionHelper extensionHelper, List containerList) {
- if(cmp == null)
- return;
- containerList.addAll(getLocalRelationshipRoles(cmp));
- if(extensionHelper != null)
- collectRelationshipRoles((ContainerManagedEntity) extensionHelper.getSuperType(cmp), extensionHelper, containerList);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ContainerManagedEntityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ContainerManagedEntityImpl.java
deleted file mode 100644
index cea1c3efc..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ContainerManagedEntityImpl.java
+++ /dev/null
@@ -1,821 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jem.java.Field;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaRefFactory;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CMRField;
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EJBExtensionFilter;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbFactory;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.MethodElementKind;
-import org.eclipse.jst.j2ee.ejb.Query;
-import org.eclipse.jst.j2ee.ejb.internal.util.CMPKeySynchronizationAdapter;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionResource;
-
-
-/**
- * @generated
- */
-public class ContainerManagedEntityImpl extends EntityImpl implements ContainerManagedEntity {
-
- /**
- * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVersion()
- *
- * @ordered
- */
- protected static final String VERSION_EDEFAULT = "1.x"; //$NON-NLS-1$
-
- protected EClassifier fGeneratedIdType = null;
- protected static final String PERS_FEATURE_CHNG_NOTIFIER = "PersistentFeatureChangeNotificationAdapter"; //$NON-NLS-1$
- protected static final String QUERY_METHOD_NAME = "QueryMethod"; //$NON-NLS-1$
- protected static final String FIND_BY_PRIM_KEY_METHOD_NAME = "findByPrimaryKey"; //$NON-NLS-1$
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String version = VERSION_EDEFAULT;
- /**
- * The default value of the '{@link #getAbstractSchemaName() <em>Abstract Schema Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAbstractSchemaName()
- * @generated
- * @ordered
- */
- protected static final String ABSTRACT_SCHEMA_NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String abstractSchemaName = ABSTRACT_SCHEMA_NAME_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList persistentAttributes = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList keyAttributes = null;
- /**
- * The cached value of the '{@link #getQueries() <em>Queries</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getQueries()
- * @generated
- * @ordered
- */
- protected EList queries = null;
-
- /**
- * The cached value of the '{@link #getCMPAttribute() <em>CMP Attribute</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCMPAttribute()
- * @generated
- * @ordered
- */
- protected EList cmpAttribute = null;
-
- /**
- * The cached value of the '{@link #getPrimKeyField() <em>Prim Key Field</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPrimKeyField()
- * @generated
- * @ordered
- */
- protected CMPAttribute primKeyField = null;
-
- /**
- * @generated
- */
- protected ContainerManagedEntityImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.CONTAINER_MANAGED_ENTITY;
- }
-
-/**
- * Create a new instance of AttributeExtn with aName and add it to the keyFeatures.
- * Creation date: (8/2/2000 9:11:13 PM)
- * @param aName java.lang.String
- * @return CMPAttribute
- */
-public CMPAttribute addKeyAttributeName(String aName) {
- CMPAttribute attribute = getPersistentAttribute(aName);
- if (attribute != null) {
- List keys = getKeyAttributes();
- CMPAttribute key;
- for (int i = 0; i < keys.size(); i++) {
- key = (CMPAttribute) keys.get(i);
- if (aName.equals(key.getName()))
- return attribute;
- }
- keys.add(attribute);
- }
- return attribute;
-}
-/**
- * Return a List of one of the properties using aFilter.
-*/
-public List getFilteredFeatures(EJBExtensionFilter aFilter) {
- return aFilter.filter(this);
- }
-/**
- * Add a persistent attribute with the same name as the name for aField.
- * Creation date: (8/3/2000 8:30:42 AM)
- * @param aField org.eclipse.jem.internal.java.Field
- * @return CMPAttribute
- */
-public CMPAttribute addPersistentAttribute(Field aField) {
- if (aField == null)
- return null;
- return addPersistentAttributeName(aField.getName());
-}
-/**
- * Create a new instance of AttributeExtn with aName and add it to the persistentFeatures.
- * Creation date: (8/2/2000 9:11:13 PM)
- * @param aName java.lang.String
- * @return CMPAttribute
- */
-public CMPAttribute addPersistentAttributeName(String aName) {
- CMPAttribute attribute = getPersistentAttribute(aName);
- if (attribute == null) {
- attribute = createPersistentAttribute(aName);
- getPersistentAttributes().add(attribute);
- }
- return attribute;
-}
-protected CMPAttribute createPersistentAttribute(String aName) {
- CMPAttribute attribute = ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory().createCMPAttribute();
- attribute.setName(aName);
- return attribute;
-}
-public List getAllAvailableQueryMethods() {
- Set sigs = new HashSet();
- List javaMethods = getAvailableSelectQueryJavaMethods();
- sigs.addAll(getMethodElementSignatures(javaMethods));
- javaMethods = getAvailableLocalQueryJavaMethods();
- sigs.addAll(getMethodElementSignatures(javaMethods));
- javaMethods = getAvailableRemoteQueryJavaMethods();
- sigs.addAll(getMethodElementSignatures(javaMethods));
- List signatures = new ArrayList(sigs);
- return createQueryMethods(signatures);
-}
-protected List createQueryMethods(List signatures) {
- Collections.sort(signatures);
- Enumerator enumerator = MethodElementKind.UNSPECIFIED_LITERAL;
- return createMethodElements(QUERY_METHOD_NAME, signatures, enumerator);
-}
-
-public List getAvailableSelectQueryMethods() {
- List methods = getAvailableSelectQueryJavaMethods();
- List sigs = getMethodElementSignatures(methods);
- return createQueryMethods(sigs);
-}
-protected List getAvailableSelectQueryJavaMethods() {
- JavaClass bean = getEjbClass();
- if (bean == null)
- return Collections.EMPTY_LIST;
- return bean.getOnlySpecificMethods("ejbSelect", Collections.EMPTY_LIST); //$NON-NLS-1$
-}
-
-public List getAvailableFindQueryMethods() {
- Set sigs = new HashSet();
- List javaMethods = getAvailableRemoteQueryJavaMethods();
- sigs.addAll(getMethodElementSignatures(javaMethods));
- javaMethods = getAvailableLocalQueryJavaMethods();
- sigs.addAll(getMethodElementSignatures(javaMethods));
- List signatures = new ArrayList(sigs);
- return createQueryMethods(signatures);
-}
-protected List getAvailableLocalQueryJavaMethods() {
- return getAvailableQueryJavaMethods(getLocalHomeInterface());
-}
-/**
-* This returns the CMP version id by using the module id and the <cmp-version>.
-* Compare with J2EEVersionConstants to determine CMP level
-* This will help differentiate between 2.0,2.1,... rather than "2.x"
-*/
-public int getCMPVersionID() throws IllegalStateException {
- J2EEVersionResource res = (J2EEVersionResource) eResource();
- /* If resource is null we will return based on CMP version....*/
- if (res == null) {
- if (getVersion().equals(ContainerManagedEntity.VERSION_1_X))
- return J2EEVersionConstants.EJB_1_1_ID;
- return J2EEVersionConstants.EJB_2_0_ID;
- }
- int cmpVersion;
- switch (res.getModuleVersionID()) {
- case J2EEVersionConstants.EJB_2_0_ID :
- if (getVersion().equalsIgnoreCase(VERSION_2_X))
- cmpVersion = J2EEVersionConstants.EJB_2_0_ID;
- else
- cmpVersion = J2EEVersionConstants.EJB_1_1_ID;
- break;
- case J2EEVersionConstants.EJB_2_1_ID :
- if (getVersion().equalsIgnoreCase(VERSION_2_X))
- cmpVersion = J2EEVersionConstants.EJB_2_1_ID;
- else
- cmpVersion = J2EEVersionConstants.EJB_1_1_ID;
- break;
-
- default :
- cmpVersion = res.getModuleVersionID();
- }
- return cmpVersion;
-}
-
-/* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean#getVersionID()
- */
-public int getVersionID() {
- return getCMPVersionID();
-}protected List getAvailableRemoteQueryJavaMethods() {
- return getAvailableQueryJavaMethods(getHomeInterface());
-}
-
-protected List getAvailableQueryJavaMethods(JavaClass home) {
- if (home == null) return Collections.EMPTY_LIST;
- List excluded = new ArrayList(1);
- excluded.add("findByPrimaryKey"); //$NON-NLS-1$
- return home.getOnlySpecificMethods("find", excluded); //$NON-NLS-1$
-}
-
-protected EClassifier getGeneratedIdType() {
- if (fGeneratedIdType == null) {
- fGeneratedIdType = JavaRefFactory.eINSTANCE.reflectType(JAVA_LANG_STRING, this);
- }
- return fGeneratedIdType;
-}
-/**
- * Return the keyAttribute with aName.
- * Creation date: (8/8/2000 9:25:27 PM)
- * @return EStructuralFeature
- * @param aName java.lang.String
- */
-public CMPAttribute getKeyAttribute(String aName) {
- if (aName != null) {
- Iterator it = getKeyAttributes().iterator();
- CMPAttribute next;
- while (it.hasNext()) {
- next = (CMPAttribute) it.next();
- if (aName.equals(next.getName()))
- return next;
- }
- }
- return null;
-}
-/**
- * Return the persistentAttribute with aName.
- * Creation date: (8/8/2000 9:25:27 PM)
- * @return EStructuralFeature
- * @param aName java.lang.String
- */
-public CMPAttribute getPersistentAttribute(String aName) {
- if (aName != null) {
- Iterator it = getPersistentAttributes().iterator();
- CMPAttribute next;
- while (it.hasNext()) {
- next = (CMPAttribute) it.next();
- if (aName.equals(next.getName()))
- return next;
- }
- }
- return null;
-}
-
-/**
- * If a primary key exists, return the persistent attribute; the primary key is defined as one and only one
- * key attribute, whose type is the same as the key class
- * @deprecated use getPrimKeyField()
- */
-public CMPAttribute getPrimaryKeyAttribute() {
- return getPrimKeyField();
-}
-
-
-/**
- * isContainerManagedEntity method comment.
- */
-public boolean isContainerManagedEntity() {
- return true;
-}
-public boolean isKeyAttribute(CMPAttribute anAttribute) {
- java.util.List attributes = getKeyAttributes();
- for (int i = 0; i < attributes.size(); i++){
- if (attributes.get(i) == anAttribute)
- return true;
- }
- return false;
-}
-/*
- * Return whether this bean represents an instance of the "unknown primary key" case
- * described in the specification. This is identified by the primary key class
- * being specified as "java.lang.Object".
- * In order to deploy an unknown primary key bean, we must substitute a real key,
- * and add a corresponding field.
- */
-public boolean isUnknownPrimaryKey() {
- String keyName = getPrimaryKeyName();
- if (keyName == null) return false;
- //test whether it is unknown or we have the WAS generated key for the unknown prim key
- boolean genTest = keyName.equals(UNKNOWN_PRIMARY_KEY) || keyName.equals(WAS_GENERATED_STRING_KEY);
- if (genTest) return true;
- //Lastly, test for the findByPrimaryKey(Object) method on the home.
- JavaClass home = getHomeInterface();
- if (home == null)
- home = getLocalHomeInterface();
- if (home == null) return false;
- List parmType = new ArrayList(1);
- parmType.add(UNKNOWN_PRIMARY_KEY);
- return home.getMethodExtended(FIND_BY_PRIM_KEY_METHOD_NAME, parmType) != null;
-}
-/**
- * isVersion1_X method comment.
- */
-public boolean isVersion1_X() {
- return getVersion().equals(ContainerManagedEntity.VERSION_1_X);
-}
-/**
- * isVersion2_X method comment.
- */
-public boolean isVersion2_X() {
- return getVersion().equals(ContainerManagedEntity.VERSION_2_X);
-}
-/*
- * listPersistentFieldNames - return the names of our CMP fields. derived from persistentFeatures
- */
-public String[] listPersistentFieldNames() {
- java.util.List attributes = getPersistentAttributes();
- String[] names = new String[attributes.size()];
- for (int i = 0; i < attributes.size(); i++) {
- names[i] = ((CMPAttribute) attributes.get(i)).getName();
- }
- return names;
-}
-
-/**
- * Remove the persistentAttribute with the same name as the Field's name.
- * Creation date: (8/3/2000 8:33:01 AM)
- * @param aField org.eclipse.jem.internal.java.Field
- */
-public CMPAttribute removePersistentAttribute(Field aField) {
- if (aField != null)
- return removePersistentAttribute(aField.getName());
- return null;
-}
-/**
- * Remove the persistentAttribute named aName.
- * Creation date: (8/2/2000 8:59:32 PM)
- * @param aName java.lang.String
- */
-public CMPAttribute removePersistentAttribute(String aName) {
- if (aName != null) {
- Iterator it = getPersistentAttributes().iterator();
- CMPAttribute next;
- while (it.hasNext()) {
- next = (CMPAttribute) it.next();
- if (aName.equals(next.getName())) {
- getPersistentAttributes().remove(next);
- return next;
- }
- }
- }
- return null;
-}
-/**
- * @generated This field/method will be replaced during code generation
- * Specifies the version of an entity bean with container-managed persistence.
- *
- * @invariant The cmp-version element must be one of the two following: 1.x , 2.x
- * @default 2.x
- * Returns "1.x" if in a 1.1 Jar (For compatibility)
- */
- public String getVersion() {
- return version;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setVersion(String newVersion) {
- String oldVersion = version;
- version = newVersion;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION, oldVersion, version));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The abstract-schema-name element specifies the name of the abstract schema type of an entity bean with cmp-version 2.x. It is used in EJB QL queries.
- *
- * For example, the abstract-schema-name for an entity bean whose local interface is com.acme.commerce.Order might be Order.
- *
-
- */
- public String getAbstractSchemaName() {
- return abstractSchemaName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setAbstractSchemaName(String newAbstractSchemaName) {
- String oldAbstractSchemaName = abstractSchemaName;
- abstractSchemaName = newAbstractSchemaName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME, oldAbstractSchemaName, abstractSchemaName));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getPersistentAttributes() {
- if (persistentAttributes == null) {
- persistentAttributes = new EObjectContainmentEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES);
- }
- return persistentAttributes;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (version: ");
- result.append(version);
- result.append(", abstractSchemaName: ");
- result.append(abstractSchemaName);
- result.append(')');
- return result.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getKeyAttributesGen() {
- if (keyAttributes == null) {
- keyAttributes = new EObjectResolvingEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES);
- }
- return keyAttributes;
- }
-
- public EList getKeyAttributes() {
- if(keyAttributes == null) {
- CMPKeySynchronizationAdapter syncAdapter = (CMPKeySynchronizationAdapter) EcoreUtil.getExistingAdapter(this, CMPKeySynchronizationAdapter.ADAPTER_TYPE);
- if(syncAdapter != null)
- syncAdapter.initializeKeyAttributes();
- }
- return getKeyAttributesGen();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getQueries() {
- if (queries == null) {
- queries = new EObjectContainmentWithInverseEList(Query.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, EjbPackage.QUERY__ENTITY);
- }
- return queries;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getCMPAttribute() {
- if (cmpAttribute == null) {
- cmpAttribute = new EObjectResolvingEList(CMPAttribute.class, this, EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE);
- }
- return cmpAttribute;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CMPAttribute getPrimKeyField() {
- if (primKeyField != null && primKeyField.eIsProxy()) {
- InternalEObject oldPrimKeyField = (InternalEObject)primKeyField;
- primKeyField = (CMPAttribute)eResolveProxy(oldPrimKeyField);
- if (primKeyField != oldPrimKeyField) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD, oldPrimKeyField, primKeyField));
- }
- }
- return primKeyField;
- }
-
- public void makePrimKeyFieldProxy() {
- if (primKeyField == null) return;
- String fieldName = primKeyField.getName();
- if (fieldName == null) fieldName = ""; //$NON-NLS-1$
- primKeyField = EjbFactory.eINSTANCE.createCMPAttribute();
- ((InternalEObject)primKeyField).eSetProxyURI(URI.createURI(fieldName));
-
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public CMPAttribute basicGetPrimKeyField() {
- return primKeyField;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPrimKeyField(CMPAttribute newPrimKeyField) {
- CMPAttribute oldPrimKeyField = primKeyField;
- primKeyField = newPrimKeyField;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD, oldPrimKeyField, primKeyField));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES:
- return ((InternalEList)getQueries()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES:
- return ((InternalEList)getPersistentAttributes()).basicRemove(otherEnd, msgs);
- case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES:
- return ((InternalEList)getQueries()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION:
- return getVersion();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME:
- return getAbstractSchemaName();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES:
- return getPersistentAttributes();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES:
- return getKeyAttributes();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES:
- return getQueries();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE:
- return getCMPAttribute();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD:
- if (resolve) return getPrimKeyField();
- return basicGetPrimKeyField();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION:
- setVersion((String)newValue);
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME:
- setAbstractSchemaName((String)newValue);
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES:
- getPersistentAttributes().clear();
- getPersistentAttributes().addAll((Collection)newValue);
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES:
- getKeyAttributes().clear();
- getKeyAttributes().addAll((Collection)newValue);
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES:
- getQueries().clear();
- getQueries().addAll((Collection)newValue);
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE:
- getCMPAttribute().clear();
- getCMPAttribute().addAll((Collection)newValue);
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD:
- setPrimKeyField((CMPAttribute)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION:
- setVersion(VERSION_EDEFAULT);
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME:
- setAbstractSchemaName(ABSTRACT_SCHEMA_NAME_EDEFAULT);
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES:
- getPersistentAttributes().clear();
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES:
- getKeyAttributes().clear();
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES:
- getQueries().clear();
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE:
- getCMPAttribute().clear();
- return;
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD:
- setPrimKeyField((CMPAttribute)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.CONTAINER_MANAGED_ENTITY__VERSION:
- return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
- case EjbPackage.CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME:
- return ABSTRACT_SCHEMA_NAME_EDEFAULT == null ? abstractSchemaName != null : !ABSTRACT_SCHEMA_NAME_EDEFAULT.equals(abstractSchemaName);
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES:
- return persistentAttributes != null && !persistentAttributes.isEmpty();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES:
- return keyAttributes != null && !keyAttributes.isEmpty();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES:
- return queries != null && !queries.isEmpty();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE:
- return cmpAttribute != null && !cmpAttribute.isEmpty();
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD:
- return primKeyField != null;
- }
- return super.eIsSet(featureID);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getCMRFields()
- */
- public List getCMRFields() {
- List myRoles = getRoles();
- List cmrFields = Collections.EMPTY_LIST;
- if (myRoles != null && !myRoles.isEmpty()) {
- cmrFields = new ArrayList();
- Iterator i = myRoles.iterator();
- while (i.hasNext()) {
- EJBRelationshipRole role = (EJBRelationshipRole) i.next();
- CMRField field = role.getCmrField();
- if (field != null)
- cmrFields.add(field);
- }
- }
- return cmrFields;
- }
-
- public boolean isSelfReferencing(EJBRelation rel) {
- if (rel.getSecondRole() == null)
- return false;
- return (rel.getFirstRole().getSourceEntity() == this) &&
- (rel.getSecondRole().getSourceEntity() == this);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getRoles()
- */
- public List getRoles() {
- if (getEjbJar() == null)
- return Collections.EMPTY_LIST;
- List allRoles = getEjbJar().getEjbRelations();
- List myRoles = Collections.EMPTY_LIST;
- if (allRoles != null && !allRoles.isEmpty()) {
- myRoles = new ArrayList();
- Iterator i = allRoles.iterator();
- while (i.hasNext()) {
- EJBRelation rel = (EJBRelation) i.next();
- EJBRelationshipRole role = rel.getFirstRole();
- if (isSelfReferencing(rel)) {
- myRoles.add(rel.getFirstRole());
- myRoles.add(rel.getSecondRole());
- }
- else if ((role != null) && role.getSourceEntity() == this) {
- myRoles.add(role);
- } else {
- role = rel.getSecondRole();
- if ((role != null) && (role.getSourceEntity() == this))
- myRoles.add(role);
- }
- }
- }
- return myRoles;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ejb.ContainerManagedEntity#getRole(java.lang.String)
- */
- public CommonRelationshipRole getRole(String roleName) {
- List roles = getRoles();
- for (int i=0; i<roles.size(); i++) {
- CommonRelationshipRole role = (CommonRelationshipRole)roles.get(i);
- if (role.getName().equals(roleName))
- return role;
- }
- return null;
- }
-
-}
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJB20FlattenedRoleShapeStrategy.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJB20FlattenedRoleShapeStrategy.java
deleted file mode 100644
index 6499b3277..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJB20FlattenedRoleShapeStrategy.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jem.java.JavaHelpers;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.IRoleShapeStrategy;
-
-/**
- * Insert the type's description here.
- * Creation date: (11/6/2000 11:41:33 AM)
- * @author: Administrator
- */
-public class EJB20FlattenedRoleShapeStrategy extends RoleShapeStrategy {
- /**
- * FlattenedRoleShapeStrategy constructor comment.
- */
- public EJB20FlattenedRoleShapeStrategy(CommonRelationshipRole aRole) {
- super(aRole);
- }
- protected boolean canContinue() {
- return !busy && role.getName() != null && (role.isForward() ||
- (role.isMany() && (role.getOppositeAsCommonRole() == null ||
- role.getOppositeAsCommonRole().isMany())));
- }
-
- public boolean usesAttributeNamed(String attributeName) {
- if (attributeName != null) {
- int index = attributeName.indexOf(IRoleShapeStrategy.ATTRIBUTE_NAME_JOINER);
- String name = attributeName.substring(0, index);
- return getRole().getName().equals(name);
- }
- return false;
- }
-
- /**
- * @see RoleShapeStrategy#reconcileAttributes(CommonRelationshipRole, String, List, List)
- */
- protected void reconcileAttributes(CommonRelationshipRole aRole, String attributeName, List aList, List computedNames) {
-
- Resource res = aRole.eResource();
- boolean dirtyFlag = res != null ? res.isModified() : false;
- try {
- if (aRole.getOppositeAsCommonRole() != null) {
- ContainerManagedEntity entity = aRole.getOppositeAsCommonRole().getSourceEntity();
- // ContainerManagedEntityExtension roleType = (ContainerManagedEntityExtension)getTypeExtension(aRole);
- if (entity != null)
- collectAttributes(entity, attributeName, aList, computedNames);
- }
- } finally {
- if (res != null)
- res.setModified(dirtyFlag);
- }
- }
-
- /**
- * @see com.ibm.ejs.models.base.extensions.ejbext.impl.FlattenedRoleShapeStrategy#setDerivedAttributeType(CMPAttribute, JavaHelpers)
- */
- protected void setDerivedAttributeType(CMPAttribute attribute, CMPAttribute targetAttribute, boolean isNew) {
- if (targetAttribute == null) return;
- JavaHelpers fieldType = targetAttribute.getType();
- if (fieldType != null) {
- int singleRoleNameSize = getRole().getName().length() + targetAttribute.getName().length() + 1; //one for the underscore
- if (!(attribute.getName().length() > singleRoleNameSize)) //don't set the originating type since we are derived from another derived attribute
- attribute.setOriginatingType(fieldType);
- attribute.setEType(fieldType.getWrapper());
- }
- if (isNew && !getRole().isKey())
- attribute.setDerived(true);
- }
- /**
- * getFields method comment.
- */
- protected void collectAttributes(ContainerManagedEntity type, String attributeName, List aList, List computedNames) {
- collectKeyModelledAttributes(type, attributeName, aList, computedNames);
- collectKeyRoleAttributes(type, attributeName, aList, computedNames);
- }
-
- /**
- * @deprecated to be safe, really should use collectAttributes(ContainerManagedEntity entity, CMPAttribute type, String attributeName, List aList, List computedNames)
- * @param type
- * @param attributeName
- * @param aList
- * @param computedNames
- */
- protected void collectAttributes(CMPAttribute type, String attributeName, List aList, List computedNames) {
- // This is necessary for code generation
- ContainerManagedEntity entity = (ContainerManagedEntity) type.eContainer();
- collectAttributes(entity, type, attributeName, aList, computedNames);
- }
-
- /**
- *
- */
- protected void collectAttributes(ContainerManagedEntity entity, CMPAttribute type, String attributeName, List aList, List computedNames) {
- boolean isNewAttribute = false;
- attributeName = appendName(attributeName, type.getName());
- computedNames.add(attributeName);
- CMPAttribute attribute = getCMPEntity().getPersistentAttribute(attributeName);
- if (attribute == null) {
- attribute = createPersistentAttribute(attributeName);
- isNewAttribute = true;
- }
- if (entity != null)
- setDerivedAttributeType(attribute, type, isNewAttribute);
- if (isNewAttribute) {
- if (getRole().isKey())
- getCMPEntity().getKeyAttributes().add(attribute);
- aList.add(attribute);
- getCMPEntity().getPersistentAttributes().add(attribute);
- } else {
- if (!aList.contains(attribute))
- aList.add(attribute);
- }
- }
-
- protected CMPAttribute createPersistentAttribute(String aName) {
- CMPAttribute attribute = ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory().createCMPAttribute();
- attribute.setName(aName);
- attribute.setDescription("Generated to support relationships. Do NOT delete.");
- return attribute;
- }
- /**
- * getFields method comment.
- */
- protected void collectKeyModelledAttributes(ContainerManagedEntity entity, String attributeName, List aList, List computedNames) {
- java.util.Iterator it = entity.getFilteredFeatures(ModelledKeyAttributeFilter.singleton()).iterator();
- CMPAttribute attribute;
- while (it.hasNext()) {
- attribute = (CMPAttribute) it.next();
- collectAttributes(entity, attribute, attributeName, aList, computedNames);
- }
- }
- /**
- * getFields method comment.
- */
- protected void collectKeyRoleAttributes(ContainerManagedEntity entity, String attributeName, List aList, List computedNames) {
- if(visitedKeyTypes.contains(entity)){
- throw new RuntimeException("Key role cycle detected");
- }
- visitedKeyTypes.add(entity);
- java.util.Iterator it = entity.getFilteredFeatures(KeyRelationshipRoleFilter.singleton()).iterator();
- CommonRelationshipRole aRole;
- while (it.hasNext()) {
- aRole = (CommonRelationshipRole) it.next();
- String attName = appendName(attributeName, aRole.getName());
- reconcileAttributes(aRole, attName, aList, computedNames);
- }
- }
- protected ContainerManagedEntity getCMPEntity() {
- return getRole().getSourceEntity();
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBJarImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBJarImpl.java
deleted file mode 100644
index aef54f3d8..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBJarImpl.java
+++ /dev/null
@@ -1,733 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.common.EjbRef;
-import org.eclipse.jst.j2ee.common.internal.impl.CompatibilityDescriptionGroupImpl;
-import org.eclipse.jst.j2ee.common.internal.util.CommonUtil;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EJBResource;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.ejb.Relationships;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionResource;
-
-/**
- * The root element of the EJB deployment descriptor. It contains an optional description of the ejb-jar file; optional display name; optional small icon file name; optional large icon file
- * name; mandatory structural information about all included enterprise beans; a descriptor for container managed relationships, if any; an optional application-assembly descriptor; and an optional name of an ejb-client-jar file for the ejb-jar.
- */
-public class EJBJarImpl extends CompatibilityDescriptionGroupImpl implements EJBJar {
-
- /**
- * The default value of the '{@link #getEjbClientJar() <em>Ejb Client Jar</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEjbClientJar()
- * @generated
- * @ordered
- */
- protected static final String EJB_CLIENT_JAR_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String ejbClientJar = EJB_CLIENT_JAR_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 String VERSION_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getVersion()
- * @generated
- * @ordered
- */
- protected String version = VERSION_EDEFAULT;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected AssemblyDescriptor assemblyDescriptor = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList enterpriseBeans = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected Relationships relationshipList = null;
- public EJBJarImpl() {
- super();
-// setRefId(com.ibm.etools.archive.ArchiveConstants.EJBJAR_ID);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.EJB_JAR;
- }
-
-/**
- * Return true if there are any ContainerManagedEntity beans in this jar.
- */
-public boolean containsContainerManagedBeans() {
- Iterator it = getEnterpriseBeans().iterator();
- EnterpriseBean ejb;
- while (it.hasNext()) {
- ejb = (EnterpriseBean)it.next();
- if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity())
- return true;
- }
- return false;
-}
-/**
- * @see org.eclipse.jst.j2ee.internal.ejb.EJBJar
- */
-public boolean containsSecurityRole(java.lang.String name) {
- AssemblyDescriptor ad = getAssemblyDescriptor();
- return (ad != null) && (ad.getSecurityRoleNamed(name) != null);
-}
-/**
- * Return List of BMP beans in this jar.
- * @return java.util.List
- */
-public List getBeanManagedBeans() {
- List allBeans, beans;
- allBeans = getEnterpriseBeans();
- int size = allBeans.size();
- beans = new ArrayList(size);
- EnterpriseBean ejb;
- for (int i = 0; i < size; i++) {
- ejb = (EnterpriseBean) allBeans.get(i);
- if (ejb.isBeanManagedEntity())
- beans.add(ejb);
- }
- return beans;
-}
-/**
- * Return List of ContainerManagedEntity beans in this jar.
- * @return java.util.List
- */
-public List getContainerManagedBeans() {
- List cmps = new ArrayList(getEnterpriseBeans().size());
- Iterator it = getEnterpriseBeans().iterator();
- EnterpriseBean ejb;
- while (it.hasNext()) {
- ejb = (EnterpriseBean)it.next();
- if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity())
- cmps.add(ejb);
- }
- return cmps;
-}
-
-/**
- * Return List of EJB 1.1 ContainerManagedEntity beans in this jar.
- * @return java.util.List
- */
-public List getEJB11ContainerManagedBeans() {
- List cmps = new ArrayList(getEnterpriseBeans().size());
- Iterator it = getEnterpriseBeans().iterator();
- EnterpriseBean ejb;
- while (it.hasNext()) {
- ejb = (EnterpriseBean)it.next();
- if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity() && ejb.getVersionID() <= J2EEVersionConstants.EJB_1_1_ID)
- cmps.add(ejb);
- }
- return cmps;
-}
-
-/**
- * Return List of EJB 2.0 ContainerManagedEntity beans in this jar.
- * @return java.util.List
- */
-public List getEJB20ContainerManagedBeans() {
- List cmps = new ArrayList(getEnterpriseBeans().size());
- Iterator it = getEnterpriseBeans().iterator();
- EnterpriseBean ejb;
- while (it.hasNext()) {
- ejb = (EnterpriseBean)it.next();
- if (ejb.isEntity() && ((Entity)ejb).isContainerManagedEntity() && ejb.getVersionID() >= J2EEVersionConstants.EJB_2_0_ID)
- cmps.add(ejb);
- }
- return cmps;
-}
- /*
- * @see EJBJar#getMessageDrivenBeans()
- */
- public List getMessageDrivenBeans() {
- List ejbs = getEnterpriseBeans();
- int size = ejbs.size();
- List mdbs = new ArrayList(size);
- EnterpriseBean ejb;
- for (int i = 0; i < size; i++) {
- ejb = (EnterpriseBean)ejbs.get(i);
- if (ejb.isMessageDriven())
- mdbs.add(ejb);
- }
- return mdbs;
- }
-/**
- * @return The list of EjbRelations references
- * A list of ejb-relation elements, which specify the container managed relationships.
- */
-public List getEjbRelations() {
- return getRelationshipList() == null ? null : getRelationshipList().getEjbRelations();
-}
-/**
- * Return an enterprise bean referenced by the EjbRef, if one exists. The ejb-link value
- * of the ref must equate to a named enterprise bean contained in the jar; otherwise return
- * null
- */
-public EnterpriseBean getEnterpiseBeanFromRef(EjbRef ref) {
- String link = ref.getLink();
- if (link == null) {
- return null;
- }
- return getEnterpriseBeanNamed(link);
-}
-public EnterpriseBean getEnterpriseBeanNamed(String ejbName) {
- if (ejbName == null)
- return null;
- EList beans = getEnterpriseBeans();
- EnterpriseBean bean;
- for (int i = 0; i < beans.size(); i++) {
- bean = (EnterpriseBean) beans.get(i);
- if (ejbName.equals(bean.getName()))
- return bean;
- }
- return null;
-}
-/**
- * Return ALL EnterpriseBean(s) that are referencing @aJavaClass as a
- * home, remote, bean class, or key class.
- */
-public java.util.List getEnterpriseBeansWithReference(JavaClass aJavaClass) {
- List beans = getEnterpriseBeans();
- List result = new ArrayList();
- EnterpriseBean bean = null;
- for (int i = 0; i < beans.size(); i++){
- bean = (EnterpriseBean) beans.get(i);
- if (bean.hasJavaReference(aJavaClass))
- result.add(bean);
- }
- return result;
-}
-/**
- * Return the *FIRST* EnterpriseBean that is referencing @aJavaClass as its
- * home, remote, bean class, or key class.
- */
-public EnterpriseBean getEnterpriseBeanWithReference(JavaClass aJavaClass) {
- List beans = getEnterpriseBeans();
- EnterpriseBean bean = null;
- for (int i = 0; i < beans.size(); i++){
- bean = (EnterpriseBean) beans.get(i);
- if (bean.hasJavaReference(aJavaClass))
- return bean;
- }
- return null;
-}
-/**
- * Return List of Session beans in this jar.
- * @return java.util.List
- */
-public List getSessionBeans() {
- List allBeans, beans;
- allBeans = getEnterpriseBeans();
- int size = allBeans.size();
- beans = new ArrayList(size);
- EnterpriseBean ejb;
- for (int i = 0; i < size; i++) {
- ejb = (EnterpriseBean) allBeans.get(i);
- if (ejb.isSession())
- beans.add(ejb);
- }
- return beans;
-}
-/**
- * Return boolean indicating if this EJB JAR was populated from an EJB 1.1 descriptor
- * @return boolean
- * @deprecated Use getVersionID() to determine module level
- */
-public boolean isVersion1_1Descriptor() {
- CommonUtil.checkDDObjectForVersion(this);
- EJBResource ejbRes = (EJBResource) eResource();
- return ejbRes.isEJB1_1();
-}
-/**
- * Return boolean indicating if this EJB JAR was populated from an EJB 2.0 descriptor
- * @return boolean
- * @deprecated Use getVersionID() to determine module level
- */
-public boolean isVersion2_0Descriptor() {
- CommonUtil.checkDDObjectForVersion(this);
- EJBResource ejbRes = (EJBResource) eResource();
- return ejbRes.isEJB2_0();
-}
-/**
- * @see org.eclipse.jst.j2ee.internal.ejb.EJBJar
- */
-public void renameSecurityRole(java.lang.String existingRoleName, java.lang.String newRoleName) {
- AssemblyDescriptor ad = getAssemblyDescriptor();
- if (ad != null)
- ad.renameSecurityRole(existingRoleName, newRoleName);
- List ejbs = getEnterpriseBeans();
- for (int i = 0; i < ejbs.size(); i++) {
- EnterpriseBean ejb = (EnterpriseBean) ejbs.get(i);
- ejb.reSyncSecurityRoleRef(existingRoleName, newRoleName);
- }
-}
- /**
- *
- */
- public void setDisplayName(String newDisplayName) {
- super.setDisplayName(newDisplayName);
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The optional ejb-client-jar element specifies a JAR file that contains the class files necessary for a client program to access the enterprise beans in the ejb-jar file. The Deployer should make the ejb-client JAR file accessible to the client's class-loader. Example:<ejb-client-jar>employee_service_client.jar<//ejb-client-jar>
-
- */
- public String getEjbClientJar() {
- return ejbClientJar;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setEjbClientJar(String newEjbClientJar) {
- String oldEjbClientJar = ejbClientJar;
- ejbClientJar = newEjbClientJar;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__EJB_CLIENT_JAR, oldEjbClientJar, ejbClientJar));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getVersion() {
- return version;
- }
-
- /**
- This returns the module version id. Compare with J2EEVersionConstants to determine module level
- */
- public int getVersionID() throws IllegalStateException {
- J2EEVersionResource ejbRes = (J2EEVersionResource) eResource();
- if (ejbRes == null) {
- // fix defect 3276, when resource is unloaded
- if (version == null)
- throw new IllegalStateException();
- if (version.equals("2.1")) //$NON-NLS-1$
- return J2EEVersionConstants.EJB_2_1_ID;
- if (version.equals("2.0")) //$NON-NLS-1$
- return J2EEVersionConstants.EJB_2_0_ID;
- if (version.equals("1.1")) //$NON-NLS-1$
- return J2EEVersionConstants.EJB_1_1_ID;
- if (version.equals("1.0")) //$NON-NLS-1$
- return J2EEVersionConstants.EJB_1_0_ID;
- }
- return ejbRes.getModuleVersionID();
- }
- /**
- *This returns the j2ee version id. Compare with J2EEVersionConstants to determine j2ee level
- */
- public int getJ2EEVersionID() throws IllegalStateException {
- J2EEVersionResource res = (J2EEVersionResource) eResource();
- if (res == null) throw new IllegalStateException("XMLResource is null");
- return res.getJ2EEVersionID();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setVersion(String newVersion) {
- String oldVersion = version;
- version = newVersion;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__VERSION, oldVersion, version));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public AssemblyDescriptor getAssemblyDescriptor() {
- return assemblyDescriptor;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor, NotificationChain msgs) {
- AssemblyDescriptor oldAssemblyDescriptor = assemblyDescriptor;
- assemblyDescriptor = newAssemblyDescriptor;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, oldAssemblyDescriptor, newAssemblyDescriptor);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) {
- if (newAssemblyDescriptor != assemblyDescriptor) {
- NotificationChain msgs = null;
- if (assemblyDescriptor != null)
- msgs = ((InternalEObject)assemblyDescriptor).eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, AssemblyDescriptor.class, msgs);
- if (newAssemblyDescriptor != null)
- msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__EJB_JAR, AssemblyDescriptor.class, msgs);
- msgs = basicSetAssemblyDescriptor(newAssemblyDescriptor, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The enterprise-beans element contains the declarations of one or more
- * enterprise beans.
- */
- public EList getEnterpriseBeans() {
- if (enterpriseBeans == null) {
- enterpriseBeans = new EObjectContainmentWithInverseEList(EnterpriseBean.class, this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EjbPackage.ENTERPRISE_BEAN__EJB_JAR);
- }
- return enterpriseBeans;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The relationships collection describes the relationships in which container managed persistence entity beans and dependent objects participate. The relationships element contains an optional description; a list of ejb-entity-ref elements (references to entity beans that participate in container managed relationships but whose abstract persistence schemas are not included in the ejb-jar file);
- * and a list of ejb-relation elements, which specify the container managed relationships.
- */
- public Relationships getRelationshipList() {
- return relationshipList;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetRelationshipList(Relationships newRelationshipList, NotificationChain msgs) {
- Relationships oldRelationshipList = relationshipList;
- relationshipList = newRelationshipList;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, oldRelationshipList, newRelationshipList);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRelationshipList(Relationships newRelationshipList) {
- if (newRelationshipList != relationshipList) {
- NotificationChain msgs = null;
- if (relationshipList != null)
- msgs = ((InternalEObject)relationshipList).eInverseRemove(this, EjbPackage.RELATIONSHIPS__EJB_JAR, Relationships.class, msgs);
- if (newRelationshipList != null)
- msgs = ((InternalEObject)newRelationshipList).eInverseAdd(this, EjbPackage.RELATIONSHIPS__EJB_JAR, Relationships.class, msgs);
- msgs = basicSetRelationshipList(newRelationshipList, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, newRelationshipList, newRelationshipList));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR:
- if (assemblyDescriptor != null)
- msgs = ((InternalEObject)assemblyDescriptor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR, null, msgs);
- return basicSetAssemblyDescriptor((AssemblyDescriptor)otherEnd, msgs);
- case EjbPackage.EJB_JAR__ENTERPRISE_BEANS:
- return ((InternalEList)getEnterpriseBeans()).basicAdd(otherEnd, msgs);
- case EjbPackage.EJB_JAR__RELATIONSHIP_LIST:
- if (relationshipList != null)
- msgs = ((InternalEObject)relationshipList).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_JAR__RELATIONSHIP_LIST, null, msgs);
- return basicSetRelationshipList((Relationships)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR:
- return basicSetAssemblyDescriptor(null, msgs);
- case EjbPackage.EJB_JAR__ENTERPRISE_BEANS:
- return ((InternalEList)getEnterpriseBeans()).basicRemove(otherEnd, msgs);
- case EjbPackage.EJB_JAR__RELATIONSHIP_LIST:
- return basicSetRelationshipList(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.EJB_JAR__EJB_CLIENT_JAR:
- return getEjbClientJar();
- case EjbPackage.EJB_JAR__VERSION:
- return getVersion();
- case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR:
- return getAssemblyDescriptor();
- case EjbPackage.EJB_JAR__ENTERPRISE_BEANS:
- return getEnterpriseBeans();
- case EjbPackage.EJB_JAR__RELATIONSHIP_LIST:
- return getRelationshipList();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.EJB_JAR__EJB_CLIENT_JAR:
- setEjbClientJar((String)newValue);
- return;
- case EjbPackage.EJB_JAR__VERSION:
- setVersion((String)newValue);
- return;
- case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR:
- setAssemblyDescriptor((AssemblyDescriptor)newValue);
- return;
- case EjbPackage.EJB_JAR__ENTERPRISE_BEANS:
- getEnterpriseBeans().clear();
- getEnterpriseBeans().addAll((Collection)newValue);
- return;
- case EjbPackage.EJB_JAR__RELATIONSHIP_LIST:
- setRelationshipList((Relationships)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.EJB_JAR__EJB_CLIENT_JAR:
- setEjbClientJar(EJB_CLIENT_JAR_EDEFAULT);
- return;
- case EjbPackage.EJB_JAR__VERSION:
- setVersion(VERSION_EDEFAULT);
- return;
- case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR:
- setAssemblyDescriptor((AssemblyDescriptor)null);
- return;
- case EjbPackage.EJB_JAR__ENTERPRISE_BEANS:
- getEnterpriseBeans().clear();
- return;
- case EjbPackage.EJB_JAR__RELATIONSHIP_LIST:
- setRelationshipList((Relationships)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.EJB_JAR__EJB_CLIENT_JAR:
- return EJB_CLIENT_JAR_EDEFAULT == null ? ejbClientJar != null : !EJB_CLIENT_JAR_EDEFAULT.equals(ejbClientJar);
- case EjbPackage.EJB_JAR__VERSION:
- return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
- case EjbPackage.EJB_JAR__ASSEMBLY_DESCRIPTOR:
- return assemblyDescriptor != null;
- case EjbPackage.EJB_JAR__ENTERPRISE_BEANS:
- return enterpriseBeans != null && !enterpriseBeans.isEmpty();
- case EjbPackage.EJB_JAR__RELATIONSHIP_LIST:
- return relationshipList != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (ejbClientJar: ");
- result.append(ejbClientJar);
- result.append(", version: ");
- result.append(version);
- result.append(')');
- return result.toString();
- }
-
- public EJBRelationshipRole getRelationshipRole(String aRoleName, ContainerManagedEntity sourceCMP) {
- if (aRoleName == null || sourceCMP == null) return null;
- EJBRelationshipRole role = null;
- if (getRelationshipList() != null) {
- List relations = getRelationshipList().getEjbRelations();
- int size = relations.size();
- EJBRelation rel = null;
- for (int i = 0; i < size; i++) {
- rel = (EJBRelation) relations.get(i);
- role = rel.getRelationshipRole(aRoleName);
- if (role != null && role.getSourceEntity() == sourceCMP)
- return role;
- }
- }
- return null;
- }
-
- public EJBRelation getEJBRelation(String aRelationName) {
- Relationships relList = getRelationshipList();
- if (relList != null) {
- List rels = relList.getEjbRelations();
- int size = rels.size();
- EJBRelation rel = null;
- for (int i = 0; i < size; i++) {
- rel = (EJBRelation) rels.get(i);
- if (rel == null) continue;
- if (aRelationName.equals(rel.getName()))
- return rel;
- }
- }
- return null;
- }
- /**
- * @see EJBJar#getEJBRelationsForSource(ContainerManagedEntity)
- */
- public List getEJBRelationsForSource(ContainerManagedEntity cmp) {
- Relationships relList = getRelationshipList();
- List result = null;
- if (relList != null) {
- List rels = relList.getEjbRelations();
- int size = rels.size();
- EJBRelation rel = null;
- for (int i = 0; i < size; i++) {
- rel = (EJBRelation) rels.get(i);
- if (rel == null) continue;
- List roles = rel.getRelationshipRoles();
- EJBRelationshipRole role;
- for (int j = 0; j < roles.size(); j++) {
- role = (EJBRelationshipRole) roles.get(j);
- if (role.getSourceEntity() == cmp) {
- if (result == null)
- result = new ArrayList();
- result.add(rel);
- break;
- }
- }
- }
- }
- if (result == null)
- result = Collections.EMPTY_LIST;
- return result;
- }
-
- public List getEJBRelationshipRolesForType(ContainerManagedEntity cmp) {
- Relationships relList = getRelationshipList();
- List result = null;
- if (relList != null) {
- List rels = relList.getEjbRelations();
- int size = rels.size();
- EJBRelation rel = null;
- for (int i = 0; i < size; i++) {
- rel = (EJBRelation) rels.get(i);
- if (rel == null) continue;
- List roles = rel.getRelationshipRoles();
- EJBRelationshipRole role;
- for (int j = 0; j < roles.size(); j++) {
- role = (EJBRelationshipRole) roles.get(j);
- if (cmp.equals(((CommonRelationshipRole) role).getTypeEntity())) {
- if (result == null)
- result = new ArrayList();
- result.add(role);
- break;
- }
- }
- }
- }
- if (result == null)
- result = Collections.EMPTY_LIST;
- return result;
- }
-
-
-}
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBJarResourceFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBJarResourceFactory.java
deleted file mode 100644
index 35c6b0571..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBJarResourceFactory.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- */
-package org.eclipse.jst.j2ee.ejb.internal.impl;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEResourceFactoryRegistry;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver;
-import org.eclipse.wst.common.internal.emf.resource.FileNameResourceFactoryRegistry;
-import org.eclipse.wst.common.internal.emf.resource.Renderer;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory;
-
-
-/**
- * @author schacher
- */
-public class EJBJarResourceFactory extends TranslatorResourceFactory {
-
- public static void registerDtds() {
- J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJBJAR_SYSTEMID_1_1, "ejb-jar_1_1.dtd"); //$NON-NLS-1$
- J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJBJAR_ALT_SYSTEMID_1_1, "ejb-jar_1.1.dtd"); //$NON-NLS-1$
- J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJBJAR_SYSTEMID_2_0, "ejb-jar_2_0.dtd"); //$NON-NLS-1$
- J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJBJAR_ALT_SYSTEMID_2_0, "ejb-jar_2.0.dtd"); //$NON-NLS-1$
- J2EEXmlDtDEntityResolver.registerDtD(J2EEConstants.EJB_JAR_SCHEMA_LOC_2_1, "ejb-jar_2_1.xsd"); //$NON-NLS-1$
- }
-
- /**
- */
- public EJBJarResourceFactory() {
- super(RendererFactory.getDefaultRendererFactory());
- }
-
- /**
- * @param aRendererFactory
- */
- public EJBJarResourceFactory(RendererFactory aRendererFactory) {
- super(aRendererFactory);
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.emf2xml.impl.TranslatorResourceFactory#createResource(org.eclipse.emf.common.util.URI, com.ibm.etools.emf2xml.Renderer)
- */
- protected TranslatorResource createResource(URI uri, Renderer aRenderer) {
- return new EJBResourceImpl(uri, aRenderer);
- }
- /**
- * Register myself with the Resource.Factory.Registry
- */
- public static void registerWith(RendererFactory aRendererFactory) {
- J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment(J2EEConstants.EJBJAR_DD_SHORT_NAME, new EJBJarResourceFactory(aRendererFactory));
- }
- public static Resource.Factory getRegisteredFactory() {
- return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.EJBJAR_DD_URI_OBJ);
- }
-
- /**
- * register using the default renderer factory.
- * @see #registerWith(RendererFactory)
- */
- public static void register() {
- registerWith(RendererFactory.getDefaultRendererFactory());
- }
- public static void register(FileNameResourceFactoryRegistry aRegistry) {
- aRegistry.registerLastFileSegment(J2EEConstants.EJBJAR_DD_SHORT_NAME, new EJBJarResourceFactory(RendererFactory.getDefaultRendererFactory()));
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBMethodCategoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBMethodCategoryImpl.java
deleted file mode 100644
index 6cbcc8aac..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBMethodCategoryImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.EJBMethodCategory;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-
-/**
- * The valid EJB method category names are: EJBHOMEMETHOD, EJBCREATEMETHOD, EJBFINDERMETHOD, EJBREMOTEMETHOD.
- * @generated
- */
-public class EJBMethodCategoryImpl extends J2EEEObjectImpl implements EJBMethodCategory {
-
- public EJBMethodCategoryImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.EJB_METHOD_CATEGORY;
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBRelationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBRelationImpl.java
deleted file mode 100644
index d6a46a219..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBRelationImpl.java
+++ /dev/null
@@ -1,448 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.Relationships;
-
-/**
- * The ejb-relation element describes a relationship between two entity beans with container managed persistence. An ejb-relation element contains a description; an optional ejb-relation-name element; and exactly two relationship role declarations, defined by the ejb-relationship-roles. The name of the relationship, if specified, is unique within the ejb-jar file.
- *
- * @invariant The name of the relationship, if specified, is unique within the ejb-jar file.
- * @invariant self.relationshipRoles.size == 2
- * @invariant self.relationshipRoles[0].name != self.relationshipRoles[1].name
- *
- * @migration EJB1.1 Moved from ejbext::EjbRelationshipRole contained under ejbext::EJBJarExtension
- * @migration EJB1.1 added optional attribute, description:String
- * @migration EJB1.1 added optional attribute, name:String (May have been inherited from EObject previously)
- * @generated
- */
-public class EJBRelationImpl extends J2EEEObjectImpl implements EJBRelation {
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String name = NAME_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList relationshipRoles = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- public EJBRelationImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.EJB_RELATION;
- }
-
-public boolean containsRelationshipRole(EJBRelationshipRole aRole) {
- return getRelationshipRoles().contains(aRole);
-}
-/**
- * Return the roles.
- */
-public EList getCommonRoles() {
- return getRelationshipRoles();
-}
-/**
- * Return the first role.
- */
-public CommonRelationshipRole getFirstCommonRole() {
- return getFirstRole();
-}
-/**
- * Return the first role.
- */
-public EJBRelationshipRole getFirstRole() {
- List list = getRelationshipRoles();
- if (list.size() == 0)
- return null;
- return (EJBRelationshipRole) list.get(0);
-}
-/**
- * Return the other role.
- */
-public EJBRelationshipRole getOppositeRole(EJBRelationshipRole aRole) {
- if (aRole != null) {
- if (aRole == getFirstRole())
- return getSecondRole();
- if (aRole == getSecondRole())
- return getFirstRole();
- }
- return null;
-}
-/**
- * Return the first role.
- */
-public CommonRelationshipRole getSecondCommonRole() {
- return getSecondRole();
-}
-/**
- * Return the second role.
- */
-public EJBRelationshipRole getSecondRole() {
- List list = getRelationshipRoles();
- if (list.size() < 2)
- return null;
- return (EJBRelationshipRole) list.get(1);
-}
-/**
- * Set the forward role. Implemented by ensuring that the passed role is the first role
- * which is the "tiebreaker" in case of unclear relationships, such as 1:1.
- */
-public void setFoward(EJBRelationshipRole aRole) {
-
- EList roles = getRelationshipRoles();
- int currentIndex = roles.indexOf(aRole);
- if (currentIndex != 0) {
- if (currentIndex > -1)
- roles.move(0, aRole);
- else
- roles.set(0, aRole);
- }
-}
- /**
- * @generated This field/method will be replaced during code generation
- * The description is used by the ejb-jar file producer to provide text describing the ejb relation.
- *
- * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The name of the relationship. If specified, must be unique within the ejb-jar file.
- * @invariant self.name unique within Set<collect(ejbJar.ejbRelations.name)>
- */
- public String getName() {
- return name;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__NAME, oldName, name));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public Relationships getRelationshipList() {
- if (eContainerFeatureID != EjbPackage.EJB_RELATION__RELATIONSHIP_LIST) return null;
- return (Relationships)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetRelationshipList(Relationships newRelationshipList, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newRelationshipList, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRelationshipList(Relationships newRelationshipList) {
- if (newRelationshipList != eInternalContainer() || (eContainerFeatureID != EjbPackage.EJB_RELATION__RELATIONSHIP_LIST && newRelationshipList != null)) {
- if (EcoreUtil.isAncestor(this, newRelationshipList))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newRelationshipList != null)
- msgs = ((InternalEObject)newRelationshipList).eInverseAdd(this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, Relationships.class, msgs);
- msgs = basicSetRelationshipList(newRelationshipList, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST, newRelationshipList, newRelationshipList));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * A collection containing exactly two relationship roles.
- *
- * @migration EJB1.1 Containment used to be by reference on relation--now by value.
-
- */
- public EList getRelationshipRoles() {
- if (relationshipRoles == null) {
- relationshipRoles = new EObjectContainmentWithInverseEList(EJBRelationshipRole.class, this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP);
- }
- return relationshipRoles;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EJB_RELATION__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetRelationshipList((Relationships)otherEnd, msgs);
- case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES:
- return ((InternalEList)getRelationshipRoles()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST:
- return basicSetRelationshipList(null, msgs);
- case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES:
- return ((InternalEList)getRelationshipRoles()).basicRemove(otherEnd, msgs);
- case EjbPackage.EJB_RELATION__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST:
- return eInternalContainer().eInverseRemove(this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, Relationships.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.EJB_RELATION__DESCRIPTION:
- return getDescription();
- case EjbPackage.EJB_RELATION__NAME:
- return getName();
- case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST:
- return getRelationshipList();
- case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES:
- return getRelationshipRoles();
- case EjbPackage.EJB_RELATION__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.EJB_RELATION__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.EJB_RELATION__NAME:
- setName((String)newValue);
- return;
- case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST:
- setRelationshipList((Relationships)newValue);
- return;
- case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES:
- getRelationshipRoles().clear();
- getRelationshipRoles().addAll((Collection)newValue);
- return;
- case EjbPackage.EJB_RELATION__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.EJB_RELATION__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.EJB_RELATION__NAME:
- setName(NAME_EDEFAULT);
- return;
- case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST:
- setRelationshipList((Relationships)null);
- return;
- case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES:
- getRelationshipRoles().clear();
- return;
- case EjbPackage.EJB_RELATION__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.EJB_RELATION__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.EJB_RELATION__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case EjbPackage.EJB_RELATION__RELATIONSHIP_LIST:
- return getRelationshipList() != null;
- case EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES:
- return relationshipRoles != null && !relationshipRoles.isEmpty();
- case EjbPackage.EJB_RELATION__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
- public EJBRelationshipRole getRelationshipRole(String aRoleName) {
- if (aRoleName == null) return null;
- List roles = getRelationshipRoles();
- EJBRelationshipRole role = null;
- for (int i = 0; i < roles.size(); i++) {
- role = (EJBRelationshipRole) roles.get(i);
- if (aRoleName.equals(role.getName()))
- return role;
- }
- return null;
- }
-}
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBRelationshipRoleImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBRelationshipRoleImpl.java
deleted file mode 100644
index 3b2358dd4..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBRelationshipRoleImpl.java
+++ /dev/null
@@ -1,1012 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.lang.reflect.Constructor;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CMRField;
-import org.eclipse.jst.j2ee.ejb.CommonRelationship;
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.IRoleShapeStrategy;
-import org.eclipse.jst.j2ee.ejb.MultiplicityKind;
-import org.eclipse.jst.j2ee.ejb.RoleSource;
-import org.eclipse.wst.common.internal.emf.utilities.IDUtil;
-/**
- * The ejb-relationship-role element describes a role within a relationship.
- * There are two roles in each relationship. The ejb-relationship-role element contains an optional description; an optional name for the relationship role; a specification of the multiplicity of the role; an optional specification of cascade-delete functionality for the role; the role source; and a declaration of the cmr-field, if any, by means of which the other side of the relationship is accessed from the perspective of the role source. The multiplicity and relationship-role-source element are mandatory. The relationship-role-source element designates an entity-bean by means of an ejb-name element. For bidirectional relationships, both roles of a relationship must declare a relationship-role-source element that specifies a cmr-field in terms of which the relationship is accessed. The lack of a cmr-field element in an ejb-relationship-role specifies that the relationship is unidirectional in navigability and that entity bean that participates in the relationship is "not aware" of the relationship.
- *
- * @invariant multiplicity != null
- * @invariant roleSource != null
- * @invariant Cascade delete can only be specified in an EJBRelationshipRole element in which the roleSource element specifies a dependent object class.
- * @invariant Cascade delete can only be specified for an EJBRelationshipRole contained in an EJBRelation in which the other EJBRelationshipRole element specifies a multiplicity of One.
- *
- * Example:
- * <ejb-relation>
- * <ejb-relation-name>Product-LineItem<//ejb-relation-name>
- * <ejb-relationship-role>
- * <ejb-relationship-role-name>product-has-lineitems<//ejb-relationship-role-name>
- * <multiplicity>One<//multiplicity>
- * <relationship-role-source>
- * <ejb-name>ProductEJB<//ejb-name>
- * <//relationship-role-source>
- * <//ejb-relationship-role>
- * ...
- * @generated
- */
-public class EJBRelationshipRoleImpl extends J2EEEObjectImpl implements EJBRelationshipRole {
-
-
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- protected static final EList EMPTY_ELIST = new org.eclipse.emf.common.util.BasicEList(0);
-
- // Need to cache the computed attributes so that they maintain identity
- protected EList fAttributes = null;
- protected String fName = null;
- protected IRoleShapeStrategy roleShapeStrategy;
- private static final String ROLE_STRATEGY_CLASS_NAME = "org.eclipse.jst.j2ee.ejb.internal.impl.EJB20FlattenedRoleShapeStrategy"; //$NON-NLS-1$
- private static final String COMMON_ROLE_CLASS_NAME = "org.eclipse.jst.j2ee.ejb.CommonRelationshipRole"; //$NON-NLS-1$
- private static Class COMMON_ROLE_CLASS;
- private static Class ROLE_STRATEGY_CLASS;
- private static Constructor ROLE_STRATEGY_CONSTRUCTOR;
- private static final String NAME_SUFFIX = "Inverse"; //$NON-NLS-1$
-
- private boolean toStringGuard;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * The default value of the '{@link #getRoleName() <em>Role Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRoleName()
- * @generated
- * @ordered
- */
- protected static final String ROLE_NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String roleName = ROLE_NAME_EDEFAULT;
- /**
- * The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMultiplicity()
- * @generated
- * @ordered
- */
- protected static final MultiplicityKind MULTIPLICITY_EDEFAULT = MultiplicityKind.ONE_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected MultiplicityKind multiplicity = MULTIPLICITY_EDEFAULT;
- /**
- * This is true if the Multiplicity attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean multiplicityESet = false;
-
- /**
- * The default value of the '{@link #isCascadeDelete() <em>Cascade Delete</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isCascadeDelete()
- * @generated
- * @ordered
- */
- protected static final boolean CASCADE_DELETE_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean cascadeDelete = CASCADE_DELETE_EDEFAULT;
- /**
- * This is true if the Cascade Delete attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean cascadeDeleteESet = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected RoleSource source = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected CMRField cmrField = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- private boolean wasForward = false;
- private boolean wasMany = false;
-
- private boolean isKeySet = false;
- private boolean key = false;
-
- private transient Boolean required = null;
-
- public EJBRelationshipRoleImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.EJB_RELATIONSHIP_ROLE;
- }
-
- /**
- * Return the persistentAttributes from my Entity that are used
- * by this role.
- */
-
- public EList getAttributes() {
- if (fAttributes == null) {
- fAttributes = new BasicEList(1);
- }
- if (fAttributes.isEmpty()) {
- getRoleShapeStrategy().reconcileAttributes(fAttributes);
- }
- return fAttributes;
- }
- /**
- * Return our parent relationship as a CommonRelationship
- */
-
- public CommonRelationship getCommonRelationship() {
- return getRelationship();
- }
- protected IRoleShapeStrategy getDefaultRoleShapeStrategy() {
- try {
- return (IRoleShapeStrategy) getRoleStrategyConstructor(this).newInstance(new Object[] { this });
- } catch (Throwable t) {
- Logger.getLogger().logError("EJBRelationshipRoleImpl:Could not instantiate role shape strategy; this requires extensions"); //$NON-NLS-1$
- Logger.getLogger().logError(t);
- return null;
- }
-
- }
-
-
- /**
- * @return The logical name which can be used for naming this role.
- * Required to be unique within a JAR.
- * If a cmr-field is defined, then a name in the form %source-ejb-name%_%cmr-field-name% is computed.
- * Otherwise a default ID is generated.
- */
- public String getLogicalName() {
- String result = null;
- String qualifier = getCmrField().getName();
- if (qualifier != null) {
- result = getSource().getEntityBean().getName() + "_" + qualifier; //$NON-NLS-1$
- } else {
- // Apply a default ID
- result = IDUtil.getOrAssignID(this);
- }
- return result;
- }
- /**
- * @return The name for this role, derived from the CMR-field name
- * Used to determine the name used in querying this role as well as the accessor method names which implement it.
- * Note: may return the XMI ID for non-navigable roles, ie - where there is no CMR-field.
- */
- public String getName() {
- if (fName == null) {
- if (getCmrField() != null)
- fName = getCmrField().getName();
- else if (getOpposite() != null) {
- EJBRelationshipRole op = getOpposite();
- if (op.getCmrField() != null)
- fName = op.getCmrField().getName() + op.getSourceEntity().getName() + NAME_SUFFIX;
- } else {
- if (eGetId() == null)
- eSetId();
- fName = eGetId();
- }
- }
- return fName;
- }
- /**
- * Return the other role.
- */
- public EJBRelationshipRole getOpposite() {
- if (getRelationship() != null)
- return getRelationship().getOppositeRole(this);
- return null;
- }
- /**
- * Return the other role.
- */
- public CommonRelationshipRole getOppositeAsCommonRole() {
- return getOpposite();
- }
-
- /**
- * Insert the method's description here.
- * Creation date: (11/15/2000 6:50:30 PM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.IRoleShapeStrategy
- */
- public IRoleShapeStrategy getRoleShapeStrategy() {
- if (roleShapeStrategy == null)
- roleShapeStrategy = getDefaultRoleShapeStrategy();
- return roleShapeStrategy;
- }
- /**
- * @return The Source ejb
- * Compute the ContainerManagedEntity which is the source of a role that participates in a relationship.
- */
- public ContainerManagedEntity getSourceEntity() {
- if(null == getSource()) {
- return null;
- }
- return getSource().getEntityBean();
- }
- /**
- * @return The computed value of the isForward attribute
- * Specifies whether this role should be mapped to a persistent reference, such as a foreign key.
- * The current implementation is:
- * - if the role is many, it cannot be forward
- * - if the role is single and not navigable, it cannot be forward
- * - all other things being equal, the first role is considered to be forward
- * - clients can manipulate this by setting an ambiguous role to be fwd (by manipulating the role order under the covers).
- */
- public boolean isForward() {
- if (this.isMany())
- return false;
- if (getOppositeAsCommonRole() == null)
- return wasForward;
- if (getOppositeAsCommonRole().isMany())
- return true;
- // if (!this.isNavigable()) removed to allow non-navigable role in key
- // return false;
- if (getRelationship() == null)
- return wasForward;
- return (getRelationship().getFirstRole() == this);
- }
- /**
- * @return The computed value isKey
- */
- public boolean isKey() {
- if (isKeySet)
- return key;
- return isKeyFromAttributes();
- }
-
- protected boolean isKeyFromAttributes() {
- List list = getAttributes();
- if (list.isEmpty())
- return false;
- Iterator it = list.iterator();
- CMPAttribute attribute;
- while (it.hasNext()) {
- attribute = (CMPAttribute) it.next();
- if (!attribute.isKey())
- return false;
- }
- return true;
- }
-
- /**
- * This allows you to set the Role as being key so it will
- * not traverse it attributes to determine if it is key.
- */
- public void setKey(boolean aBoolean) {
- key = aBoolean;
- isKeySet = true;
- }
-
- /**
- * Handwritten version of isMany():
- */
-
-
- public boolean isMany() {
- if (getOpposite() == null)
- return wasMany;
- return getOpposite().getMultiplicity() == MultiplicityKind.MANY_LITERAL;
- }
-
-
-
- /**
- * @return The computed value of the isNavigable attribute
- * Specifies that accessors should be generated for this relationship role.
- * Current implementation is to test whether or not a CMR field exists.
- */
- public boolean isNavigable() {
- return getCmrField() != null;
- }
-
-
- public void reconcileAttributes() {
- if (fAttributes != null)
- getRoleShapeStrategy().reconcileAttributes(fAttributes);
- }
-
-
- /**
- * Set this role to be the forward role.
- */
- public void setFoward() {
- getRelationship().setFoward(this);
- }
- public void setName(java.lang.String uniqueName) {
- fName = uniqueName;
- }
- public String toString() {
- if (toStringGuard) return super.toString();
- try {
- toStringGuard = true;
- String oppositeType = getOpposite() != null ? getTypeEntity().getName() : "<<unknown>>"; //$NON-NLS-1$
- return getName() + "(" + oppositeType + ")" + (isMany() ? " *" : " 1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- } catch (Exception e) {
- return e.toString();
- } finally {
- toStringGuard = false;
- }
- }
-
- private static Class getCommonRoleClass(Object caller) throws ClassNotFoundException {
-
- if (COMMON_ROLE_CLASS == null) {
- COMMON_ROLE_CLASS = loadClass(COMMON_ROLE_CLASS_NAME, caller);
- }
- return COMMON_ROLE_CLASS;
- }
-
- private static Class loadClass(String name, Object caller) throws ClassNotFoundException {
- ClassLoader cl = caller.getClass().getClassLoader();
- if (cl != null)
- return cl.loadClass(name);
- return Class.forName(name);
- }
-
- private static Class getRoleStrategyClass(Object caller) throws ClassNotFoundException {
- if (ROLE_STRATEGY_CLASS == null)
- ROLE_STRATEGY_CLASS = loadClass(ROLE_STRATEGY_CLASS_NAME, caller);
- return ROLE_STRATEGY_CLASS;
- }
-
- private static Constructor getRoleStrategyConstructor(Object caller) throws ClassNotFoundException, NoSuchMethodException {
- if (ROLE_STRATEGY_CONSTRUCTOR == null) {
- Class[] parmTypes = new Class[] { getCommonRoleClass(caller)};
- ROLE_STRATEGY_CONSTRUCTOR = getRoleStrategyClass(caller).getConstructor(parmTypes);
- }
- return ROLE_STRATEGY_CONSTRUCTOR;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The description is used by the ejb-jar file producer to provide text describing
- * the ejb relationship role.
- *
- * The description should include any information that the ejb-jar file producer
- * wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer).
- * Typically, the tools used by the ejb-jar file consumer will display the
- * description when processing the list of dependents.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Defines a name for a role that is unique within an ejb-relation. Different
- * relationships can use the same name for a role.
-
- */
- public String getRoleName() {
- return roleName;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRoleName(String newRoleName) {
- String oldRoleName = roleName;
- roleName = newRoleName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME, oldRoleName, roleName));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MultiplicityKind getMultiplicity() {
- return multiplicity;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setMultiplicity(MultiplicityKind newMultiplicity) {
- MultiplicityKind oldMultiplicity = multiplicity;
- multiplicity = newMultiplicity == null ? MULTIPLICITY_EDEFAULT : newMultiplicity;
- boolean oldMultiplicityESet = multiplicityESet;
- multiplicityESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY, oldMultiplicity, multiplicity, !oldMultiplicityESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetMultiplicity() {
- MultiplicityKind oldMultiplicity = multiplicity;
- boolean oldMultiplicityESet = multiplicityESet;
- multiplicity = MULTIPLICITY_EDEFAULT;
- multiplicityESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY, oldMultiplicity, MULTIPLICITY_EDEFAULT, oldMultiplicityESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetMultiplicity() {
- return multiplicityESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Specifies that, within a particular relationship, the lifetime of one or more
- * entity beans is dependent upon the lifetime of another entity bean. The
- * cascade-delete element can Cascade delete can only be specified for an
- * EJBRelationshipRole contained in an EJBrelation in which the other
- * EJBRelationshipRole element specifies a multiplicity of One.
- *
- *
-
- */
- public boolean isCascadeDelete() {
- return cascadeDelete;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setCascadeDelete(boolean newCascadeDelete) {
- boolean oldCascadeDelete = cascadeDelete;
- cascadeDelete = newCascadeDelete;
- boolean oldCascadeDeleteESet = cascadeDeleteESet;
- cascadeDeleteESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE, oldCascadeDelete, cascadeDelete, !oldCascadeDeleteESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetCascadeDelete() {
- boolean oldCascadeDelete = cascadeDelete;
- boolean oldCascadeDeleteESet = cascadeDeleteESet;
- cascadeDelete = CASCADE_DELETE_EDEFAULT;
- cascadeDeleteESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE, oldCascadeDelete, CASCADE_DELETE_EDEFAULT, oldCascadeDeleteESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetCascadeDelete() {
- return cascadeDeleteESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EJBRelation getRelationship() {
- if (eContainerFeatureID != EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP) return null;
- return (EJBRelation)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetRelationship(EJBRelation newRelationship, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newRelationship, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, msgs);
- return msgs;
- }
-
- /**
- * This field/method will be replaced during code generation.
- */
- public void setRelationship(EJBRelation newContainer) {
- if (newContainer == null && getRelationship() != null) {
- updateCachedSettings();
- EJBRelationshipRoleImpl roleOpposite = (EJBRelationshipRoleImpl) getOpposite();
- if (roleOpposite != null)
- roleOpposite.updateCachedSettings();
- } else
- wasForward = false;
- setRelationshipGen(newContainer);
- }
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#getTargetAttributeName(org.eclipse.jst.j2ee.internal.ejb.CMPAttribute)
- */
- public String getTargetAttributeName(CMPAttribute roleAttribute) {
- int roleNameSize = getName().length();
- return roleAttribute.getName().substring(roleNameSize + 1);
- }
- /**
- * Method updateCachedSettings.
- */
- protected void updateCachedSettings() {
- wasForward = isForward();
- wasMany = isMany();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Designates the source of a role that participates in a relationship. A
- * relationship-role-source element uniquely identifies an entity bean.
- * @migration EJB1.1: was ibmejbext::EjbRelationshipRole::sourceEJBName, but that
- * may not be sufficient, as this can now refer to dependent class names or ejb
- * refs
- */
- public RoleSource getSource() {
- return source;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetSource(RoleSource newSource, NotificationChain msgs) {
- RoleSource oldSource = source;
- source = newSource;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, oldSource, newSource);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setSource(RoleSource newSource) {
- if (newSource != source) {
- NotificationChain msgs = null;
- if (source != null)
- msgs = ((InternalEObject)source).eInverseRemove(this, EjbPackage.ROLE_SOURCE__ROLE, RoleSource.class, msgs);
- if (newSource != null)
- msgs = ((InternalEObject)newSource).eInverseAdd(this, EjbPackage.ROLE_SOURCE__ROLE, RoleSource.class, msgs);
- msgs = basicSetSource(newSource, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, newSource, newSource));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * A declaration of the CMRField, if any, by means of which the other side of the
- * relationship is accessed from the perspective of the role source
- *
- * @migration EJB1.1: Used to be handled via ibmejbext::EjbRole::attributes list
- */
- public CMRField getCmrField() {
- return cmrField;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetCmrField(CMRField newCmrField, NotificationChain msgs) {
- CMRField oldCmrField = cmrField;
- cmrField = newCmrField;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, oldCmrField, newCmrField);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setCmrField(CMRField newCmrField) {
- if (newCmrField != cmrField) {
- NotificationChain msgs = null;
- if (cmrField != null)
- msgs = ((InternalEObject)cmrField).eInverseRemove(this, EjbPackage.CMR_FIELD__ROLE, CMRField.class, msgs);
- if (newCmrField != null)
- msgs = ((InternalEObject)newCmrField).eInverseAdd(this, EjbPackage.CMR_FIELD__ROLE, CMRField.class, msgs);
- msgs = basicSetCmrField(newCmrField, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, newCmrField, newCmrField));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetRelationship((EJBRelation)otherEnd, msgs);
- case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE:
- if (source != null)
- msgs = ((InternalEObject)source).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, null, msgs);
- return basicSetSource((RoleSource)otherEnd, msgs);
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD:
- if (cmrField != null)
- msgs = ((InternalEObject)cmrField).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD, null, msgs);
- return basicSetCmrField((CMRField)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP:
- return basicSetRelationship(null, msgs);
- case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE:
- return basicSetSource(null, msgs);
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD:
- return basicSetCmrField(null, msgs);
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP:
- return eInternalContainer().eInverseRemove(this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EJBRelation.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION:
- return getDescription();
- case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME:
- return getRoleName();
- case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY:
- return getMultiplicity();
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE:
- return isCascadeDelete() ? Boolean.TRUE : Boolean.FALSE;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP:
- return getRelationship();
- case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE:
- return getSource();
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD:
- return getCmrField();
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME:
- setRoleName((String)newValue);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY:
- setMultiplicity((MultiplicityKind)newValue);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE:
- setCascadeDelete(((Boolean)newValue).booleanValue());
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP:
- setRelationship((EJBRelation)newValue);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE:
- setSource((RoleSource)newValue);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD:
- setCmrField((CMRField)newValue);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME:
- setRoleName(ROLE_NAME_EDEFAULT);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY:
- unsetMultiplicity();
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE:
- unsetCascadeDelete();
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP:
- setRelationship((EJBRelation)null);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE:
- setSource((RoleSource)null);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD:
- setCmrField((CMRField)null);
- return;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.EJB_RELATIONSHIP_ROLE__ROLE_NAME:
- return ROLE_NAME_EDEFAULT == null ? roleName != null : !ROLE_NAME_EDEFAULT.equals(roleName);
- case EjbPackage.EJB_RELATIONSHIP_ROLE__MULTIPLICITY:
- return isSetMultiplicity();
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CASCADE_DELETE:
- return isSetCascadeDelete();
- case EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP:
- return getRelationship() != null;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE:
- return source != null;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__CMR_FIELD:
- return cmrField != null;
- case EjbPackage.EJB_RELATIONSHIP_ROLE__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toStringGen() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", roleName: ");
- result.append(roleName);
- result.append(", multiplicity: ");
- if (multiplicityESet) result.append(multiplicity); else result.append("<unset>");
- result.append(", cascadeDelete: ");
- if (cascadeDeleteESet) result.append(cascadeDelete); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
- /*
- * @see CommonRelationshipRole#getTypeEntity()
- */
- public ContainerManagedEntity getTypeEntity() {
- if (getOpposite() != null)
- return getOpposite().getSourceEntity();
- return null;
- }
-
- /**
- * @see CommonRelationshipRole#isRequired()
- */
- public boolean isRequired() {
- if (required!=null)
- return required.booleanValue();
- return isKey();
- }
-
- /**
- * Set the isRequired flag for bottom up
- */
- public void setRequired(Boolean isRequired) {
- required = isRequired;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRelationshipGen(EJBRelation newRelationship) {
- if (newRelationship != eInternalContainer() || (eContainerFeatureID != EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP && newRelationship != null)) {
- if (EcoreUtil.isAncestor(this, newRelationship))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newRelationship != null)
- msgs = ((InternalEObject)newRelationship).eInverseAdd(this, EjbPackage.EJB_RELATION__RELATIONSHIP_ROLES, EJBRelation.class, msgs);
- msgs = basicSetRelationship(newRelationship, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EJB_RELATIONSHIP_ROLE__RELATIONSHIP, newRelationship, newRelationship));
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#setLower(int)
- */
- public void setLower(int lowerBound) {
- // Do nothing... Only upperbound is relevant here
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.ejb.CommonRelationshipRole#setUpper(int)
- */
- public void setUpper(int upperBound) {
- switch (upperBound) {
- case MultiplicityKind.ONE :
- setMultiplicity(MultiplicityKind.ONE_LITERAL);
- break;
- default :
- setMultiplicity(MultiplicityKind.MANY_LITERAL);
- break;
- }
- }
-
- /**
- Gets the MOF XMI ref id for this object.
- */
- private String eGetId() {
- XMIResource res = (XMIResource)eResource();
- if (res == null)
- return null;
- return res.getID(this);
- }
-
-
- /**
- * Set and return The id of this element
- */
- private String eSetId() {
-
-
- IDUtil.getOrAssignID(this);
-
- return eGetId();
- }
-
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java
deleted file mode 100644
index fbc87230b..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EJBResourceImpl.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- */
-package org.eclipse.jst.j2ee.ejb.internal.impl;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jst.j2ee.common.internal.impl.XMLResourceImpl;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EJBResource;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.XMLResource;
-import org.eclipse.jst.j2ee.internal.model.translator.ejb.EJBJarTranslator;
-import org.eclipse.wst.common.internal.emf.resource.Renderer;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-
-/**
- * @author schacher
- */
-public class EJBResourceImpl extends XMLResourceImpl implements EJBResource {
-
- /**
- * @param uri
- * @param aRenderer
- */
- public EJBResourceImpl(URI uri, Renderer aRenderer) {
- super(uri, aRenderer);
- }
-
- /**
- * @param aRenderer
- */
- public EJBResourceImpl(Renderer aRenderer) {
- super(aRenderer);
- }
-
- /*
- * @see EJBResource#isEJB1_1()
- * @deprecated - use getModuleVersionID() and J2EEVersionConstants
- */
- public boolean isEJB1_1() {
- return getModuleVersionID() == EJB_1_1_ID;
- }
-
- /*
- * @see EJBResource#isEJB2_0()
- * @deprecated - use getModuleVersionID() and J2EEVersionConstants
- */
- public boolean isEJB2_0() {
- return getModuleVersionID() == EJB_2_0_ID;
- }
-
-
-
- /* (non-Javadoc)
- * @see com.ibm.etools.j2eexml.XMLResource#getType()
- */
- public int getType() {
- return XMLResource.EJB_TYPE;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.emf2xml.TranslatorResource#getDoctype()
- */
- public String getDoctype() {
- switch (getJ2EEVersionID()) {
- case (J2EE_1_2_ID) :
- case (J2EE_1_3_ID) :
- return J2EEConstants.EJBJAR_DOCTYPE;
- default :
- return null;
- }
-
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_PublicID()
- */
- public String getJ2EE_1_2_PublicID() {
- return J2EEConstants.EJBJAR_PUBLICID_1_1;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_2_SystemID()
- */
- public String getJ2EE_1_2_SystemID() {
- return J2EEConstants.EJBJAR_SYSTEMID_1_1;
- }
-
- public String getJ2EE_Alt_1_2_SystemID() {
- return J2EEConstants.EJBJAR_ALT_SYSTEMID_1_1;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_PublicID()
- */
- public String getJ2EE_1_3_PublicID() {
- return J2EEConstants.EJBJAR_PUBLICID_2_0;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.j2eexml.XMLResourceImpl#getJ2EE_1_3_SystemID()
- */
- public String getJ2EE_1_3_SystemID() {
- return J2EEConstants.EJBJAR_SYSTEMID_2_0;
- }
-
- public String getJ2EE_Alt_1_3_SystemID() {
- return J2EEConstants.EJBJAR_ALT_SYSTEMID_2_0;
- }
-
- /* (non-Javadoc)
- * @see com.ibm.etools.emf2xml.TranslatorResource#getRootTranslator()
- */
- public Translator getRootTranslator() {
- return EJBJarTranslator.INSTANCE;
- }
-
- /* Return J2EE version based on module version
- */
- public int getJ2EEVersionID() {
- switch (getModuleVersionID()) {
- case J2EEVersionConstants.EJB_1_0_ID :
- return J2EEVersionConstants.J2EE_1_2_ID;
- case J2EEVersionConstants.EJB_1_1_ID :
- return J2EEVersionConstants.J2EE_1_2_ID;
- case J2EEVersionConstants.EJB_2_0_ID :
- return J2EEVersionConstants.J2EE_1_3_ID;
- case J2EEVersionConstants.EJB_2_1_ID :
- return J2EEVersionConstants.J2EE_1_4_ID;
- default :
- return J2EEVersionConstants.J2EE_1_4_ID;
- }
- }
-
- /**
- * Return the first element in the EList.
- */
- public EJBJar getEJBJar() {
- return (EJBJar) getRootObject();
- }
-
- public void setBatchMode(boolean isBatch) {
- renderer.setBatchMode(isBatch);
-
- }
- /*
- * This directly sets the module version id
- */
- public void setModuleVersionID(int id) {
- super.setVersionID(id);
- switch (id) {
- case (EJB_2_1_ID) :
- super.setDoctypeValues(null, null);
- break;
- case (EJB_2_0_ID) :
- super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID());
- break;
- case (EJB_1_1_ID) :
- super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID());
- break;
- case (EJB_1_0_ID) :
- super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID());
-
- }
- syncVersionOfRootObject();
- }
- /*
- * Based on the J2EE version, this will set the module version
- */
- public void setJ2EEVersionID(int id) {
- switch (id) {
- case (J2EE_1_4_ID) :
- primSetDoctypeValues(null, null);
- primSetVersionID(EJB_2_1_ID);
- break;
- case (J2EE_1_3_ID) :
- primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID());
- primSetVersionID(EJB_2_0_ID);
- break;
- case (J2EE_1_2_ID) :
- primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID());
- primSetVersionID(EJB_1_1_ID);
- }
- syncVersionOfRootObject();
- }
- /* (non-Javadoc)
- * @see com.ibm.etools.emf2xml.impl.TranslatorResourceImpl#getDefaultVersionID()
- */
- protected int getDefaultVersionID() {
- return EJB_2_1_ID;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.common.impl.XMLResourceImpl#syncVersionOfRootObject()
- */
- protected void syncVersionOfRootObject() {
- EJBJar ejbJar = getEJBJar();
- if (ejbJar == null)
- return;
-
- String version = ejbJar.getVersion();
- String newVersion = getModuleVersionString();
- if (!newVersion.equals(version))
- ejbJar.setVersion(newVersion);
- }
-
- public boolean isBatchMode() {
- return renderer.isBatchMode();
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EjbFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EjbFactoryImpl.java
deleted file mode 100644
index 5ad8e812e..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EjbFactoryImpl.java
+++ /dev/null
@@ -1,705 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-import org.eclipse.jem.java.JavaHelpers;
-import org.eclipse.jem.java.JavaParameter;
-import org.eclipse.jem.java.Method;
-import org.eclipse.jst.j2ee.ejb.AcknowledgeMode;
-import org.eclipse.jst.j2ee.ejb.ActivationConfig;
-import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CMRField;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.DestinationType;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EJBMethodCategory;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbFactory;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodElementKind;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.jst.j2ee.ejb.MultiplicityKind;
-import org.eclipse.jst.j2ee.ejb.Query;
-import org.eclipse.jst.j2ee.ejb.QueryMethod;
-import org.eclipse.jst.j2ee.ejb.Relationships;
-import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping;
-import org.eclipse.jst.j2ee.ejb.RoleSource;
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.ejb.SessionType;
-import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind;
-import org.eclipse.jst.j2ee.ejb.TransactionAttributeType;
-import org.eclipse.jst.j2ee.ejb.TransactionType;
-import org.eclipse.jst.j2ee.ejb.internal.util.CMPKeySynchronizationAdapter;
-import org.eclipse.wst.common.internal.emf.utilities.AdapterFactoryDescriptor;
-import org.eclipse.wst.common.internal.emf.utilities.AdapterFactoryUtil;
-import org.eclipse.wst.common.internal.emf.utilities.ExtendedEcoreUtil;
-
-
-
-/**
- * @generated
- */
-public class EjbFactoryImpl extends EFactoryImpl implements EjbFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static EjbFactory init() {
- try {
- EjbFactory theEjbFactory = (EjbFactory)EPackage.Registry.INSTANCE.getEFactory("ejb.xmi");
- if (theEjbFactory != null) {
- return theEjbFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new EjbFactoryImpl();
- }
-
- private static List CMP_ADAPTER_FACTORIES = new ArrayList(1);
- private static List CMP_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1);
- private static List EJB_RELATION_ADAPTER_FACTORIES = new ArrayList(1);
- private static List EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1);
- private static List RELATIONSHIPS_ADAPTER_FACTORIES = new ArrayList(1);
- private static List RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS = new ArrayList(1);
- public static final String MM_VERSION = "1.1"; //$NON-NLS-1$
- private boolean createdAdapterFactories = false;
-
- public EjbFactoryImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case EjbPackage.CONTAINER_MANAGED_ENTITY: return createContainerManagedEntity();
- case EjbPackage.METHOD_PERMISSION: return createMethodPermission();
- case EjbPackage.ASSEMBLY_DESCRIPTOR: return createAssemblyDescriptor();
- case EjbPackage.METHOD_TRANSACTION: return createMethodTransaction();
- case EjbPackage.SESSION: return createSession();
- case EjbPackage.ENTITY: return createEntity();
- case EjbPackage.EJB_METHOD_CATEGORY: return createEJBMethodCategory();
- case EjbPackage.EJB_JAR: return createEJBJar();
- case EjbPackage.METHOD_ELEMENT: return createMethodElement();
- case EjbPackage.CMP_ATTRIBUTE: return createCMPAttribute();
- case EjbPackage.RELATIONSHIPS: return createRelationships();
- case EjbPackage.QUERY: return createQuery();
- case EjbPackage.EJB_RELATION: return createEJBRelation();
- case EjbPackage.EJB_RELATIONSHIP_ROLE: return createEJBRelationshipRole();
- case EjbPackage.ROLE_SOURCE: return createRoleSource();
- case EjbPackage.CMR_FIELD: return createCMRField();
- case EjbPackage.MESSAGE_DRIVEN: return createMessageDriven();
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION: return createMessageDrivenDestination();
- case EjbPackage.EXCLUDE_LIST: return createExcludeList();
- case EjbPackage.QUERY_METHOD: return createQueryMethod();
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY: return createActivationConfigProperty();
- case EjbPackage.ACTIVATION_CONFIG: return createActivationConfig();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case EjbPackage.TRANSACTION_ATTRIBUTE_TYPE:
- return createTransactionAttributeTypeFromString(eDataType, initialValue);
- case EjbPackage.TRANSACTION_TYPE:
- return createTransactionTypeFromString(eDataType, initialValue);
- case EjbPackage.SESSION_TYPE:
- return createSessionTypeFromString(eDataType, initialValue);
- case EjbPackage.METHOD_ELEMENT_KIND:
- return createMethodElementKindFromString(eDataType, initialValue);
- case EjbPackage.ACKNOWLEDGE_MODE:
- return createAcknowledgeModeFromString(eDataType, initialValue);
- case EjbPackage.SUBSCRIPTION_DURABILITY_KIND:
- return createSubscriptionDurabilityKindFromString(eDataType, initialValue);
- case EjbPackage.RETURN_TYPE_MAPPING:
- return createReturnTypeMappingFromString(eDataType, initialValue);
- case EjbPackage.DESTINATION_TYPE:
- return createDestinationTypeFromString(eDataType, initialValue);
- case EjbPackage.MULTIPLICITY_KIND:
- return createMultiplicityKindFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case EjbPackage.TRANSACTION_ATTRIBUTE_TYPE:
- return convertTransactionAttributeTypeToString(eDataType, instanceValue);
- case EjbPackage.TRANSACTION_TYPE:
- return convertTransactionTypeToString(eDataType, instanceValue);
- case EjbPackage.SESSION_TYPE:
- return convertSessionTypeToString(eDataType, instanceValue);
- case EjbPackage.METHOD_ELEMENT_KIND:
- return convertMethodElementKindToString(eDataType, instanceValue);
- case EjbPackage.ACKNOWLEDGE_MODE:
- return convertAcknowledgeModeToString(eDataType, instanceValue);
- case EjbPackage.SUBSCRIPTION_DURABILITY_KIND:
- return convertSubscriptionDurabilityKindToString(eDataType, instanceValue);
- case EjbPackage.RETURN_TYPE_MAPPING:
- return convertReturnTypeMappingToString(eDataType, instanceValue);
- case EjbPackage.DESTINATION_TYPE:
- return convertDestinationTypeToString(eDataType, instanceValue);
- case EjbPackage.MULTIPLICITY_KIND:
- return convertMultiplicityKindToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
-public MethodElement createMethodElement(String aSignature) {
- MethodElement me = createMethodElement();
- me.initializeFromSignature(aSignature);
- return me;
-}
-/**
- * Helper method to create a MethodElement from a java method. Defaults the type to "Unspecified".
- */
-public MethodElement createMethodElementFrom(
- Method method) {
-
- MethodElement element = createMethodElement();
- element.setName(method.getName());
- element.setType(MethodElementKind.UNSPECIFIED_LITERAL);
-
- JavaParameter[] params =
- method.listParametersWithoutReturn();
- if (params.length == 0)
- element.applyZeroParams();
- else {
- for (int i = 0; i < params.length; i++) {
- JavaHelpers helper = (JavaHelpers) params[i].getEType();
- element.addMethodParams(helper.getQualifiedName());
- }
- }
- return element;
-}
-/**
- * Helper method to reflect the method and create a MethodElement. If the parameter is null, creates an element
- * with a name of "*". Defaults the type to "Unspecified".
- */
-public MethodElement createMethodElementFrom(java.lang.reflect.Method method) {
-
- String methodName = method == null ? "*" : method.getName(); //$NON-NLS-1$
- MethodElement me = createMethodElement();
- me.setName(methodName);
- me.setType(MethodElementKind.UNSPECIFIED_LITERAL);
- if (method != null) {
- Class[] types = method.getParameterTypes();
- for (int i = 0; i < types.length; i++) {
- me.addMethodParams(getTypeName(types[i]));
- }
- }
- return me;
-}
-public static EjbFactory getActiveFactory() {
- return (EjbFactory) getPackage().getEFactoryInstance();
-}
-/*
- * Utility routine to paper over array type names
- * Borrowed from a package-visibility helper on java.lang.reflect.Field
- */
-static String getTypeName(Class type) {
- if (type.isArray()) {
- try {
- Class cl = type;
- int dimensions = 0;
- while (cl.isArray()) {
- dimensions++;
- cl = cl.getComponentType();
- }
- StringBuffer sb = new StringBuffer();
- sb.append(cl.getName());
- for (int i = 0; i < dimensions; i++) {
- sb.append("[]");//$NON-NLS-1$
- }
- return sb.toString();
- } catch (Throwable e) { /*FALLTHRU*/
- }
- }
- return type.getName();
-}
-
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public MethodPermission createMethodPermission() {
- MethodPermissionImpl methodPermission = new MethodPermissionImpl();
- return methodPermission;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public AssemblyDescriptor createAssemblyDescriptor() {
- AssemblyDescriptorImpl assemblyDescriptor = new AssemblyDescriptorImpl();
- return assemblyDescriptor;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public MethodTransaction createMethodTransaction() {
- MethodTransactionImpl methodTransaction = new MethodTransactionImpl();
- return methodTransaction;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Entity createEntity() {
- EntityImpl entity = new EntityImpl();
- return entity;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public ContainerManagedEntity createContainerManagedEntityGen() {
- ContainerManagedEntityImpl containerManagedEntity = new ContainerManagedEntityImpl();
- return containerManagedEntity;
- }
-
- public ContainerManagedEntity createContainerManagedEntity() {
- ContainerManagedEntity cmp = createContainerManagedEntityGen();
- adaptNew(cmp, CMP_ADAPTER_FACTORIES);
- addKeySynchronizationAdapter(cmp);
- return cmp;
- }
-
- /**
- * @param cmp
- */
- private void addKeySynchronizationAdapter(ContainerManagedEntity cmp) {
- CMPKeySynchronizationAdapter cmpAdapter = new CMPKeySynchronizationAdapter(cmp);
- Adapter loadingAdapter = ExtendedEcoreUtil.createAdapterForLoading(cmpAdapter,cmp);
- cmp.eAdapters().add(loadingAdapter);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public CMPAttribute createCMPAttribute() {
- CMPAttributeImpl cmpAttribute = new CMPAttributeImpl();
- return cmpAttribute;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public CMRField createCMRField() {
- CMRFieldImpl cmrField = new CMRFieldImpl();
- return cmrField;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EJBRelationshipRole createEJBRelationshipRole() {
- EJBRelationshipRoleImpl ejbRelationshipRole = new EJBRelationshipRoleImpl();
- return ejbRelationshipRole;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EJBRelation createEJBRelationGen() {
- EJBRelationImpl ejbRelation = new EJBRelationImpl();
- return ejbRelation;
- }
-
- public EJBRelation createEJBRelation() {
- EJBRelation rel = createEJBRelationGen();
- adaptNew(rel, EJB_RELATION_ADAPTER_FACTORIES);
- return rel;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Relationships createRelationshipsGen() {
- RelationshipsImpl relationships = new RelationshipsImpl();
- return relationships;
- }
-
- public Relationships createRelationships() {
- Relationships rel = createRelationshipsGen();
- adaptNew(rel, RELATIONSHIPS_ADAPTER_FACTORIES);
- return rel;
- }
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EJBJar createEJBJar() {
- EJBJarImpl ejbJar = new EJBJarImpl();
- return ejbJar;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public RoleSource createRoleSource() {
- RoleSourceImpl roleSource = new RoleSourceImpl();
- return roleSource;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Query createQuery() {
- QueryImpl query = new QueryImpl();
- return query;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public QueryMethod createQueryMethod() {
- QueryMethodImpl queryMethod = new QueryMethodImpl();
- return queryMethod;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ActivationConfigProperty createActivationConfigProperty() {
- ActivationConfigPropertyImpl activationConfigProperty = new ActivationConfigPropertyImpl();
- return activationConfigProperty;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ActivationConfig createActivationConfig() {
- ActivationConfigImpl activationConfig = new ActivationConfigImpl();
- return activationConfig;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public TransactionAttributeType createTransactionAttributeTypeFromString(EDataType eDataType, String initialValue) {
- TransactionAttributeType result = TransactionAttributeType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertTransactionAttributeTypeToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public TransactionType createTransactionTypeFromString(EDataType eDataType, String initialValue) {
- TransactionType result = TransactionType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertTransactionTypeToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SessionType createSessionTypeFromString(EDataType eDataType, String initialValue) {
- SessionType result = SessionType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertSessionTypeToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MethodElementKind createMethodElementKindFromString(EDataType eDataType, String initialValue) {
- MethodElementKind result = MethodElementKind.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertMethodElementKindToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AcknowledgeMode createAcknowledgeModeFromString(EDataType eDataType, String initialValue) {
- AcknowledgeMode result = AcknowledgeMode.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertAcknowledgeModeToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SubscriptionDurabilityKind createSubscriptionDurabilityKindFromString(EDataType eDataType, String initialValue) {
- SubscriptionDurabilityKind result = SubscriptionDurabilityKind.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertSubscriptionDurabilityKindToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ReturnTypeMapping createReturnTypeMappingFromString(EDataType eDataType, String initialValue) {
- ReturnTypeMapping result = ReturnTypeMapping.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertReturnTypeMappingToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DestinationType createDestinationTypeFromString(EDataType eDataType, String initialValue) {
- DestinationType result = DestinationType.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertDestinationTypeToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MultiplicityKind createMultiplicityKindFromString(EDataType eDataType, String initialValue) {
- MultiplicityKind result = MultiplicityKind.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertMultiplicityKindToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public MethodElement createMethodElement() {
- MethodElementImpl methodElement = new MethodElementImpl();
- return methodElement;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public ExcludeList createExcludeList() {
- ExcludeListImpl excludeList = new ExcludeListImpl();
- return excludeList;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Session createSession() {
- SessionImpl session = new SessionImpl();
- return session;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public MessageDriven createMessageDriven() {
- MessageDrivenImpl messageDriven = new MessageDrivenImpl();
- return messageDriven;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public MessageDrivenDestination createMessageDrivenDestination() {
- MessageDrivenDestinationImpl messageDrivenDestination = new MessageDrivenDestinationImpl();
- return messageDrivenDestination;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EJBMethodCategory createEJBMethodCategory() {
- EJBMethodCategoryImpl ejbMethodCategory = new EJBMethodCategoryImpl();
- return ejbMethodCategory;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EjbPackage getEjbPackage() {
- return (EjbPackage)getEPackage();
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public static EjbPackage getPackage() {
- return EjbPackage.eINSTANCE;
- }
-
- public static void internalRegisterCMPAdapterFactory(AdapterFactoryDescriptor config) {
- CMP_ADAPTER_FACTORY_DESCRIPTORS.add(config);
-
- }
- public static void internalRegisterEJBRelationAdapterFactory(AdapterFactoryDescriptor config) {
- EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS.add(config);
- }
- public static void internalRegisterRelationshipsAdapterFactory(AdapterFactoryDescriptor config) {
- RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS.add(config);
- }
-
-
- private void createAdapterFactories() {
- createdAdapterFactories = true;
- AdapterFactoryUtil.createAdapterFactories(CMP_ADAPTER_FACTORY_DESCRIPTORS, CMP_ADAPTER_FACTORIES);
- AdapterFactoryUtil.createAdapterFactories(EJB_RELATION_ADAPTER_FACTORY_DESCRIPTORS, EJB_RELATION_ADAPTER_FACTORIES);
- AdapterFactoryUtil.createAdapterFactories(RELATIONSHIPS_ADAPTER_FACTORY_DESCRIPTORS, RELATIONSHIPS_ADAPTER_FACTORIES);
- }
-
- private void adaptNew(Notifier notifier, List factories) {
- if (!createdAdapterFactories)
- createAdapterFactories();
- AdapterFactoryUtil.adaptNew(notifier, factories);
- }
-
-}
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EjbPackageImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EjbPackageImpl.java
deleted file mode 100644
index 8ceb023f5..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EjbPackageImpl.java
+++ /dev/null
@@ -1,1789 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.jem.java.JavaRefPackage;
-import org.eclipse.jst.j2ee.application.ApplicationPackage;
-import org.eclipse.jst.j2ee.application.internal.impl.ApplicationPackageImpl;
-import org.eclipse.jst.j2ee.client.ClientPackage;
-import org.eclipse.jst.j2ee.client.internal.impl.ClientPackageImpl;
-import org.eclipse.jst.j2ee.common.CommonPackage;
-import org.eclipse.jst.j2ee.common.internal.impl.CommonPackageImpl;
-import org.eclipse.jst.j2ee.ejb.AcknowledgeMode;
-import org.eclipse.jst.j2ee.ejb.ActivationConfig;
-import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CMRField;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.DestinationType;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EJBMethodCategory;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbFactory;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodElementKind;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.jst.j2ee.ejb.MultiplicityKind;
-import org.eclipse.jst.j2ee.ejb.Query;
-import org.eclipse.jst.j2ee.ejb.QueryMethod;
-import org.eclipse.jst.j2ee.ejb.Relationships;
-import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping;
-import org.eclipse.jst.j2ee.ejb.RoleSource;
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.ejb.SessionType;
-import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind;
-import org.eclipse.jst.j2ee.ejb.TransactionAttributeType;
-import org.eclipse.jst.j2ee.ejb.TransactionType;
-import org.eclipse.jst.j2ee.jca.JcaPackage;
-import org.eclipse.jst.j2ee.jca.internal.impl.JcaPackageImpl;
-import org.eclipse.jst.j2ee.jsp.JspPackage;
-import org.eclipse.jst.j2ee.jsp.internal.impl.JspPackageImpl;
-import org.eclipse.jst.j2ee.taglib.internal.TaglibPackage;
-import org.eclipse.jst.j2ee.taglib.internal.impl.TaglibPackageImpl;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.webapplication.internal.impl.WebapplicationPackageImpl;
-import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage;
-import org.eclipse.jst.j2ee.webservice.wsclient.internal.impl.Webservice_clientPackageImpl;
-import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage;
-import org.eclipse.jst.j2ee.webservice.wscommon.internal.impl.WscommonPackageImpl;
-import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage;
-import org.eclipse.jst.j2ee.webservice.wsdd.internal.impl.WsddPackageImpl;
-
-
-public class EjbPackageImpl extends EPackageImpl implements EjbPackage, EPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass containerManagedEntityEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass methodPermissionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass assemblyDescriptorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass methodTransactionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass sessionEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass entityEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass enterpriseBeanEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass ejbMethodCategoryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass ejbJarEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass methodElementEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass cmpAttributeEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass relationshipsEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass queryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass ejbRelationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass ejbRelationshipRoleEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass roleSourceEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass cmrFieldEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass messageDrivenEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass messageDrivenDestinationEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass excludeListEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass queryMethodEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass activationConfigPropertyEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass activationConfigEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum transactionAttributeTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum transactionTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum sessionTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum methodElementKindEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum acknowledgeModeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum subscriptionDurabilityKindEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum returnTypeMappingEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum destinationTypeEEnum = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum multiplicityKindEEnum = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- private EjbPackageImpl() {
- super(eNS_URI, EjbFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public static EjbPackage init() {
- if (isInited) return (EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI);
-
- // Obtain or create and register package
- EjbPackageImpl theEjbPackage = (EjbPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof EjbPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new EjbPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- EcorePackage.eINSTANCE.eClass();
- JavaRefPackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- ClientPackageImpl theClientPackage = (ClientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) instanceof ClientPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ClientPackage.eNS_URI) : ClientPackage.eINSTANCE);
- ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof ApplicationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE);
- ApplicationPackageImpl theApplicationPackage_1 = (ApplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) instanceof ApplicationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI) : ApplicationPackage.eINSTANCE);
- CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
- TaglibPackageImpl theTaglibPackage = (TaglibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) instanceof TaglibPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(TaglibPackage.eNS_URI) : TaglibPackage.eINSTANCE);
- WebapplicationPackageImpl theWebapplicationPackage = (WebapplicationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) instanceof WebapplicationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(WebapplicationPackage.eNS_URI) : WebapplicationPackage.eINSTANCE);
- JcaPackageImpl theJcaPackage = (JcaPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) instanceof JcaPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(JcaPackage.eNS_URI) : JcaPackage.eINSTANCE);
- Webservice_clientPackageImpl theWebservice_clientPackage = (Webservice_clientPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) instanceof Webservice_clientPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(Webservice_clientPackage.eNS_URI) : Webservice_clientPackage.eINSTANCE);
- JspPackageImpl theJspPackage = (JspPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) instanceof JspPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(JspPackage.eNS_URI) : JspPackage.eINSTANCE);
- WscommonPackageImpl theWscommonPackage = (WscommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) instanceof WscommonPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(WscommonPackage.eNS_URI) : WscommonPackage.eINSTANCE);
- WsddPackageImpl theWsddPackage = (WsddPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) instanceof WsddPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(WsddPackage.eNS_URI) : WsddPackage.eINSTANCE);
-
- // Create package meta-data objects
- theEjbPackage.createPackageContents();
- theClientPackage.createPackageContents();
- theApplicationPackage.createPackageContents();
- theApplicationPackage_1.createPackageContents();
- theCommonPackage.createPackageContents();
- theTaglibPackage.createPackageContents();
- theWebapplicationPackage.createPackageContents();
- theJcaPackage.createPackageContents();
- theWebservice_clientPackage.createPackageContents();
- theJspPackage.createPackageContents();
- theWscommonPackage.createPackageContents();
- theWsddPackage.createPackageContents();
-
- // Initialize created meta-data
- theEjbPackage.initializePackageContents();
- theClientPackage.initializePackageContents();
- theApplicationPackage.initializePackageContents();
- theApplicationPackage_1.initializePackageContents();
- theCommonPackage.initializePackageContents();
- theTaglibPackage.initializePackageContents();
- theWebapplicationPackage.initializePackageContents();
- theJcaPackage.initializePackageContents();
- theWebservice_clientPackage.initializePackageContents();
- theJspPackage.initializePackageContents();
- theWscommonPackage.initializePackageContents();
- theWsddPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theEjbPackage.freeze();
-
- return theEjbPackage;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getMethodPermission() {
- return methodPermissionEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMethodPermission_Description() {
- return (EAttribute)methodPermissionEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMethodPermission_Unchecked() {
- return (EAttribute)methodPermissionEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getMethodPermission_AssemblyDescriptor() {
- return (EReference)methodPermissionEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getMethodPermission_Roles() {
- return (EReference)methodPermissionEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getMethodPermission_MethodElements() {
- return (EReference)methodPermissionEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMethodPermission_Descriptions() {
- return (EReference)methodPermissionEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getAssemblyDescriptor() {
- return assemblyDescriptorEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getAssemblyDescriptor_MethodPermissions() {
- return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getAssemblyDescriptor_MethodTransactions() {
- return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getAssemblyDescriptor_EjbJar() {
- return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getAssemblyDescriptor_SecurityRoles() {
- return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getAssemblyDescriptor_ExcludeList() {
- return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getAssemblyDescriptor_MessageDestinations() {
- return (EReference)assemblyDescriptorEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getMethodTransaction() {
- return methodTransactionEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMethodTransaction_TransactionAttribute() {
- return (EAttribute)methodTransactionEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMethodTransaction_Description() {
- return (EAttribute)methodTransactionEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getMethodTransaction_AssemblyDescriptor() {
- return (EReference)methodTransactionEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getMethodTransaction_MethodElements() {
- return (EReference)methodTransactionEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMethodTransaction_Descriptions() {
- return (EReference)methodTransactionEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getEnterpriseBean() {
- return enterpriseBeanEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEnterpriseBean_Name() {
- return (EAttribute)enterpriseBeanEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEnterpriseBean_SecurityRoleRefs() {
- return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEnterpriseBean_EjbClass() {
- return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEnterpriseBean_HomeInterface() {
- return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEnterpriseBean_RemoteInterface() {
- return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEnterpriseBean_EjbJar() {
- return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEnterpriseBean_SecurityIdentity() {
- return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEnterpriseBean_LocalHomeInterface() {
- return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEnterpriseBean_LocalInterface() {
- return (EReference)enterpriseBeanEClass.getEStructuralFeatures().get(8);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getEntity() {
- return entityEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEntity_Reentrant() {
- return (EAttribute)entityEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEntity_PrimaryKey() {
- return (EReference)entityEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getContainerManagedEntity() {
- return containerManagedEntityEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getContainerManagedEntity_Version() {
- return (EAttribute)containerManagedEntityEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getContainerManagedEntity_AbstractSchemaName() {
- return (EAttribute)containerManagedEntityEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getContainerManagedEntity_PersistentAttributes() {
- return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getContainerManagedEntity_KeyAttributes() {
- return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getContainerManagedEntity_Queries() {
- return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getContainerManagedEntity_CMPAttribute() {
- return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getContainerManagedEntity_PrimKeyField() {
- return (EReference)containerManagedEntityEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getCMPAttribute() {
- return cmpAttributeEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getCMPAttribute_Description() {
- return (EAttribute)cmpAttributeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getCMPAttribute_Descriptions() {
- return (EReference)cmpAttributeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getCMRField() {
- return cmrFieldEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getCMRField_Role() {
- return (EReference)cmrFieldEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getCMRField_CollectionType() {
- return (EReference)cmrFieldEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getEJBRelationshipRole() {
- return ejbRelationshipRoleEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getEJBRelationshipRole_Description() {
- return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getEJBRelationshipRole_RoleName() {
- return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getEJBRelationshipRole_Multiplicity() {
- return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getEJBRelationshipRole_CascadeDelete() {
- return (EAttribute)ejbRelationshipRoleEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEJBRelationshipRole_Relationship() {
- return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEJBRelationshipRole_Source() {
- return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEJBRelationshipRole_CmrField() {
- return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getEJBRelationshipRole_Descriptions() {
- return (EReference)ejbRelationshipRoleEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getEJBRelation() {
- return ejbRelationEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getEJBRelation_Description() {
- return (EAttribute)ejbRelationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getEJBRelation_Name() {
- return (EAttribute)ejbRelationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEJBRelation_RelationshipList() {
- return (EReference)ejbRelationEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEJBRelation_RelationshipRoles() {
- return (EReference)ejbRelationEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getEJBRelation_Descriptions() {
- return (EReference)ejbRelationEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getRelationships() {
- return relationshipsEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getRelationships_Description() {
- return (EAttribute)relationshipsEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getRelationships_EjbJar() {
- return (EReference)relationshipsEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getRelationships_EjbRelations() {
- return (EReference)relationshipsEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getRelationships_Descriptions() {
- return (EReference)relationshipsEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getEJBJar() {
- return ejbJarEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getEJBJar_EjbClientJar() {
- return (EAttribute)ejbJarEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getEJBJar_Version() {
- return (EAttribute)ejbJarEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEJBJar_AssemblyDescriptor() {
- return (EReference)ejbJarEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEJBJar_EnterpriseBeans() {
- return (EReference)ejbJarEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getEJBJar_RelationshipList() {
- return (EReference)ejbJarEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getRoleSource() {
- return roleSourceEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getRoleSource_Description() {
- return (EAttribute)roleSourceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getRoleSource_Role() {
- return (EReference)roleSourceEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getRoleSource_EntityBean() {
- return (EReference)roleSourceEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getRoleSource_Descriptions() {
- return (EReference)roleSourceEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getQuery() {
- return queryEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getQuery_Description() {
- return (EAttribute)queryEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getQuery_EjbQL() {
- return (EAttribute)queryEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getQuery_ReturnTypeMapping() {
- return (EAttribute)queryEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getQuery_QueryMethod() {
- return (EReference)queryEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getQuery_Entity() {
- return (EReference)queryEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getQuery_Descriptions() {
- return (EReference)queryEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getQueryMethod() {
- return queryMethodEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getQueryMethod_Query() {
- return (EReference)queryMethodEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getActivationConfigProperty() {
- return activationConfigPropertyEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getActivationConfigProperty_Value() {
- return (EAttribute)activationConfigPropertyEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getActivationConfigProperty_Name() {
- return (EAttribute)activationConfigPropertyEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getActivationConfig() {
- return activationConfigEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getActivationConfig_ConfigProperties() {
- return (EReference)activationConfigEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getActivationConfig_Descriptions() {
- return (EReference)activationConfigEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getMethodElement() {
- return methodElementEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMethodElement_Name() {
- return (EAttribute)methodElementEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMethodElement_Parms() {
- return (EAttribute)methodElementEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMethodElement_Type() {
- return (EAttribute)methodElementEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMethodElement_Description() {
- return (EAttribute)methodElementEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getMethodElement_EnterpriseBean() {
- return (EReference)methodElementEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMethodElement_Descriptions() {
- return (EReference)methodElementEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getExcludeList() {
- return excludeListEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getExcludeList_Description() {
- return (EAttribute)excludeListEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getExcludeList_MethodElements() {
- return (EReference)excludeListEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExcludeList_Descriptions() {
- return (EReference)excludeListEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getSession() {
- return sessionEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getSession_TransactionType() {
- return (EAttribute)sessionEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getSession_SessionType() {
- return (EAttribute)sessionEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getSession_ServiceEndpoint() {
- return (EReference)sessionEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getMessageDriven() {
- return messageDrivenEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMessageDriven_TransactionType() {
- return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMessageDriven_MessageSelector() {
- return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMessageDriven_AcknowledgeMode() {
- return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getMessageDriven_Destination() {
- return (EReference)messageDrivenEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMessageDriven_ActivationConfig() {
- return (EReference)messageDrivenEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMessageDriven_MessageDestination() {
- return (EReference)messageDrivenEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getMessageDriven_Link() {
- return (EAttribute)messageDrivenEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getMessageDriven_MessagingType() {
- return (EReference)messageDrivenEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getMessageDrivenDestination() {
- return messageDrivenDestinationEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMessageDrivenDestination_Type() {
- return (EAttribute)messageDrivenDestinationEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EAttribute getMessageDrivenDestination_SubscriptionDurability() {
- return (EAttribute)messageDrivenDestinationEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EReference getMessageDrivenDestination_Bean() {
- return (EReference)messageDrivenDestinationEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EClass getEJBMethodCategory() {
- return ejbMethodCategoryEClass;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getTransactionAttributeType() {
- return transactionAttributeTypeEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getMultiplicityKind() {
- return multiplicityKindEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getReturnTypeMapping() {
- return returnTypeMappingEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getMethodElementKind() {
- return methodElementKindEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getTransactionType() {
- return transactionTypeEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getAcknowledgeMode() {
- return acknowledgeModeEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getDestinationType() {
- return destinationTypeEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getSubscriptionDurabilityKind() {
- return subscriptionDurabilityKindEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EEnum getSessionType() {
- return sessionTypeEEnum;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public EjbFactory getEjbFactory() {
- return (EjbFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- containerManagedEntityEClass = createEClass(CONTAINER_MANAGED_ENTITY);
- createEAttribute(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__VERSION);
- createEAttribute(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__ABSTRACT_SCHEMA_NAME);
- createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES);
- createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES);
- createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__QUERIES);
- createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__CMP_ATTRIBUTE);
- createEReference(containerManagedEntityEClass, CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD);
-
- methodPermissionEClass = createEClass(METHOD_PERMISSION);
- createEAttribute(methodPermissionEClass, METHOD_PERMISSION__DESCRIPTION);
- createEAttribute(methodPermissionEClass, METHOD_PERMISSION__UNCHECKED);
- createEReference(methodPermissionEClass, METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR);
- createEReference(methodPermissionEClass, METHOD_PERMISSION__ROLES);
- createEReference(methodPermissionEClass, METHOD_PERMISSION__METHOD_ELEMENTS);
- createEReference(methodPermissionEClass, METHOD_PERMISSION__DESCRIPTIONS);
-
- assemblyDescriptorEClass = createEClass(ASSEMBLY_DESCRIPTOR);
- createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS);
- createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS);
- createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__EJB_JAR);
- createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__SECURITY_ROLES);
- createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__EXCLUDE_LIST);
- createEReference(assemblyDescriptorEClass, ASSEMBLY_DESCRIPTOR__MESSAGE_DESTINATIONS);
-
- methodTransactionEClass = createEClass(METHOD_TRANSACTION);
- createEAttribute(methodTransactionEClass, METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE);
- createEAttribute(methodTransactionEClass, METHOD_TRANSACTION__DESCRIPTION);
- createEReference(methodTransactionEClass, METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR);
- createEReference(methodTransactionEClass, METHOD_TRANSACTION__METHOD_ELEMENTS);
- createEReference(methodTransactionEClass, METHOD_TRANSACTION__DESCRIPTIONS);
-
- sessionEClass = createEClass(SESSION);
- createEAttribute(sessionEClass, SESSION__TRANSACTION_TYPE);
- createEAttribute(sessionEClass, SESSION__SESSION_TYPE);
- createEReference(sessionEClass, SESSION__SERVICE_ENDPOINT);
-
- entityEClass = createEClass(ENTITY);
- createEAttribute(entityEClass, ENTITY__REENTRANT);
- createEReference(entityEClass, ENTITY__PRIMARY_KEY);
-
- enterpriseBeanEClass = createEClass(ENTERPRISE_BEAN);
- createEAttribute(enterpriseBeanEClass, ENTERPRISE_BEAN__NAME);
- createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__SECURITY_ROLE_REFS);
- createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__EJB_CLASS);
- createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__HOME_INTERFACE);
- createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__REMOTE_INTERFACE);
- createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__EJB_JAR);
- createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__SECURITY_IDENTITY);
- createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE);
- createEReference(enterpriseBeanEClass, ENTERPRISE_BEAN__LOCAL_INTERFACE);
-
- ejbMethodCategoryEClass = createEClass(EJB_METHOD_CATEGORY);
-
- ejbJarEClass = createEClass(EJB_JAR);
- createEAttribute(ejbJarEClass, EJB_JAR__EJB_CLIENT_JAR);
- createEAttribute(ejbJarEClass, EJB_JAR__VERSION);
- createEReference(ejbJarEClass, EJB_JAR__ASSEMBLY_DESCRIPTOR);
- createEReference(ejbJarEClass, EJB_JAR__ENTERPRISE_BEANS);
- createEReference(ejbJarEClass, EJB_JAR__RELATIONSHIP_LIST);
-
- methodElementEClass = createEClass(METHOD_ELEMENT);
- createEAttribute(methodElementEClass, METHOD_ELEMENT__NAME);
- createEAttribute(methodElementEClass, METHOD_ELEMENT__PARMS);
- createEAttribute(methodElementEClass, METHOD_ELEMENT__TYPE);
- createEAttribute(methodElementEClass, METHOD_ELEMENT__DESCRIPTION);
- createEReference(methodElementEClass, METHOD_ELEMENT__ENTERPRISE_BEAN);
- createEReference(methodElementEClass, METHOD_ELEMENT__DESCRIPTIONS);
-
- cmpAttributeEClass = createEClass(CMP_ATTRIBUTE);
- createEAttribute(cmpAttributeEClass, CMP_ATTRIBUTE__DESCRIPTION);
- createEReference(cmpAttributeEClass, CMP_ATTRIBUTE__DESCRIPTIONS);
-
- relationshipsEClass = createEClass(RELATIONSHIPS);
- createEAttribute(relationshipsEClass, RELATIONSHIPS__DESCRIPTION);
- createEReference(relationshipsEClass, RELATIONSHIPS__EJB_JAR);
- createEReference(relationshipsEClass, RELATIONSHIPS__EJB_RELATIONS);
- createEReference(relationshipsEClass, RELATIONSHIPS__DESCRIPTIONS);
-
- queryEClass = createEClass(QUERY);
- createEAttribute(queryEClass, QUERY__DESCRIPTION);
- createEAttribute(queryEClass, QUERY__EJB_QL);
- createEAttribute(queryEClass, QUERY__RETURN_TYPE_MAPPING);
- createEReference(queryEClass, QUERY__QUERY_METHOD);
- createEReference(queryEClass, QUERY__ENTITY);
- createEReference(queryEClass, QUERY__DESCRIPTIONS);
-
- ejbRelationEClass = createEClass(EJB_RELATION);
- createEAttribute(ejbRelationEClass, EJB_RELATION__DESCRIPTION);
- createEAttribute(ejbRelationEClass, EJB_RELATION__NAME);
- createEReference(ejbRelationEClass, EJB_RELATION__RELATIONSHIP_LIST);
- createEReference(ejbRelationEClass, EJB_RELATION__RELATIONSHIP_ROLES);
- createEReference(ejbRelationEClass, EJB_RELATION__DESCRIPTIONS);
-
- ejbRelationshipRoleEClass = createEClass(EJB_RELATIONSHIP_ROLE);
- createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__DESCRIPTION);
- createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__ROLE_NAME);
- createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__MULTIPLICITY);
- createEAttribute(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__CASCADE_DELETE);
- createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__RELATIONSHIP);
- createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__SOURCE);
- createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__CMR_FIELD);
- createEReference(ejbRelationshipRoleEClass, EJB_RELATIONSHIP_ROLE__DESCRIPTIONS);
-
- roleSourceEClass = createEClass(ROLE_SOURCE);
- createEAttribute(roleSourceEClass, ROLE_SOURCE__DESCRIPTION);
- createEReference(roleSourceEClass, ROLE_SOURCE__ROLE);
- createEReference(roleSourceEClass, ROLE_SOURCE__ENTITY_BEAN);
- createEReference(roleSourceEClass, ROLE_SOURCE__DESCRIPTIONS);
-
- cmrFieldEClass = createEClass(CMR_FIELD);
- createEReference(cmrFieldEClass, CMR_FIELD__ROLE);
- createEReference(cmrFieldEClass, CMR_FIELD__COLLECTION_TYPE);
-
- messageDrivenEClass = createEClass(MESSAGE_DRIVEN);
- createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__TRANSACTION_TYPE);
- createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGE_SELECTOR);
- createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__ACKNOWLEDGE_MODE);
- createEAttribute(messageDrivenEClass, MESSAGE_DRIVEN__LINK);
- createEReference(messageDrivenEClass, MESSAGE_DRIVEN__DESTINATION);
- createEReference(messageDrivenEClass, MESSAGE_DRIVEN__ACTIVATION_CONFIG);
- createEReference(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGE_DESTINATION);
- createEReference(messageDrivenEClass, MESSAGE_DRIVEN__MESSAGING_TYPE);
-
- messageDrivenDestinationEClass = createEClass(MESSAGE_DRIVEN_DESTINATION);
- createEAttribute(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__TYPE);
- createEAttribute(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY);
- createEReference(messageDrivenDestinationEClass, MESSAGE_DRIVEN_DESTINATION__BEAN);
-
- excludeListEClass = createEClass(EXCLUDE_LIST);
- createEAttribute(excludeListEClass, EXCLUDE_LIST__DESCRIPTION);
- createEReference(excludeListEClass, EXCLUDE_LIST__METHOD_ELEMENTS);
- createEReference(excludeListEClass, EXCLUDE_LIST__DESCRIPTIONS);
-
- queryMethodEClass = createEClass(QUERY_METHOD);
- createEReference(queryMethodEClass, QUERY_METHOD__QUERY);
-
- activationConfigPropertyEClass = createEClass(ACTIVATION_CONFIG_PROPERTY);
- createEAttribute(activationConfigPropertyEClass, ACTIVATION_CONFIG_PROPERTY__VALUE);
- createEAttribute(activationConfigPropertyEClass, ACTIVATION_CONFIG_PROPERTY__NAME);
-
- activationConfigEClass = createEClass(ACTIVATION_CONFIG);
- createEReference(activationConfigEClass, ACTIVATION_CONFIG__CONFIG_PROPERTIES);
- createEReference(activationConfigEClass, ACTIVATION_CONFIG__DESCRIPTIONS);
-
- // Create enums
- transactionAttributeTypeEEnum = createEEnum(TRANSACTION_ATTRIBUTE_TYPE);
- transactionTypeEEnum = createEEnum(TRANSACTION_TYPE);
- sessionTypeEEnum = createEEnum(SESSION_TYPE);
- methodElementKindEEnum = createEEnum(METHOD_ELEMENT_KIND);
- acknowledgeModeEEnum = createEEnum(ACKNOWLEDGE_MODE);
- subscriptionDurabilityKindEEnum = createEEnum(SUBSCRIPTION_DURABILITY_KIND);
- returnTypeMappingEEnum = createEEnum(RETURN_TYPE_MAPPING);
- destinationTypeEEnum = createEEnum(DESTINATION_TYPE);
- multiplicityKindEEnum = createEEnum(MULTIPLICITY_KIND);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);
- JavaRefPackage theJavaRefPackage = (JavaRefPackage)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI);
-
- // Add supertypes to classes
- containerManagedEntityEClass.getESuperTypes().add(this.getEntity());
- methodPermissionEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- assemblyDescriptorEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- methodTransactionEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- sessionEClass.getESuperTypes().add(this.getEnterpriseBean());
- entityEClass.getESuperTypes().add(this.getEnterpriseBean());
- enterpriseBeanEClass.getESuperTypes().add(theCommonPackage.getJNDIEnvRefsGroup());
- ejbMethodCategoryEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- ejbJarEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup());
- methodElementEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- cmpAttributeEClass.getESuperTypes().add(theCommonPackage.getJ2EEEAttribute());
- relationshipsEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- queryEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- ejbRelationEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- ejbRelationshipRoleEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- roleSourceEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- cmrFieldEClass.getESuperTypes().add(this.getCMPAttribute());
- messageDrivenEClass.getESuperTypes().add(this.getEnterpriseBean());
- messageDrivenDestinationEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- excludeListEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- queryMethodEClass.getESuperTypes().add(this.getMethodElement());
- activationConfigPropertyEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
- activationConfigEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
-
- // Initialize classes and features; add operations and parameters
- initEClass(containerManagedEntityEClass, ContainerManagedEntity.class, "ContainerManagedEntity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getContainerManagedEntity_Version(), ecorePackage.getEString(), "version", "2.x", 0, 1, ContainerManagedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getContainerManagedEntity_AbstractSchemaName(), ecorePackage.getEString(), "abstractSchemaName", null, 0, 1, ContainerManagedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getContainerManagedEntity_PersistentAttributes(), this.getCMPAttribute(), null, "persistentAttributes", null, 0, -1, ContainerManagedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getContainerManagedEntity_KeyAttributes(), this.getCMPAttribute(), null, "keyAttributes", null, 0, -1, ContainerManagedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getContainerManagedEntity_Queries(), this.getQuery(), this.getQuery_Entity(), "queries", null, 0, -1, ContainerManagedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getContainerManagedEntity_CMPAttribute(), this.getCMPAttribute(), null, "CMPAttribute", null, 0, -1, ContainerManagedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getContainerManagedEntity_PrimKeyField(), this.getCMPAttribute(), null, "primKeyField", null, 0, 1, ContainerManagedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(methodPermissionEClass, MethodPermission.class, "MethodPermission", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMethodPermission_Description(), ecorePackage.getEString(), "description", null, 0, 1, MethodPermission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMethodPermission_Unchecked(), ecorePackage.getEBoolean(), "unchecked", null, 0, 1, MethodPermission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodPermission_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_MethodPermissions(), "assemblyDescriptor", null, 1, 1, MethodPermission.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodPermission_Roles(), theCommonPackage.getSecurityRole(), null, "roles", null, 1, -1, MethodPermission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodPermission_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, MethodPermission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodPermission_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, MethodPermission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(assemblyDescriptorEClass, AssemblyDescriptor.class, "AssemblyDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getAssemblyDescriptor_MethodPermissions(), this.getMethodPermission(), this.getMethodPermission_AssemblyDescriptor(), "methodPermissions", null, 0, -1, AssemblyDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAssemblyDescriptor_MethodTransactions(), this.getMethodTransaction(), this.getMethodTransaction_AssemblyDescriptor(), "methodTransactions", null, 0, -1, AssemblyDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAssemblyDescriptor_EjbJar(), this.getEJBJar(), this.getEJBJar_AssemblyDescriptor(), "ejbJar", null, 0, 1, AssemblyDescriptor.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAssemblyDescriptor_SecurityRoles(), theCommonPackage.getSecurityRole(), null, "securityRoles", null, 0, -1, AssemblyDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAssemblyDescriptor_ExcludeList(), this.getExcludeList(), null, "excludeList", null, 0, 1, AssemblyDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAssemblyDescriptor_MessageDestinations(), theCommonPackage.getMessageDestination(), null, "messageDestinations", null, 0, -1, AssemblyDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(methodTransactionEClass, MethodTransaction.class, "MethodTransaction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMethodTransaction_TransactionAttribute(), this.getTransactionAttributeType(), "transactionAttribute", null, 0, 1, MethodTransaction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMethodTransaction_Description(), ecorePackage.getEString(), "description", null, 0, 1, MethodTransaction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodTransaction_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_MethodTransactions(), "assemblyDescriptor", null, 1, 1, MethodTransaction.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodTransaction_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, MethodTransaction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodTransaction_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, MethodTransaction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(sessionEClass, Session.class, "Session", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getSession_TransactionType(), this.getTransactionType(), "transactionType", null, 0, 1, Session.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getSession_SessionType(), this.getSessionType(), "sessionType", null, 0, 1, Session.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getSession_ServiceEndpoint(), theJavaRefPackage.getJavaClass(), null, "serviceEndpoint", null, 0, 1, Session.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(entityEClass, Entity.class, "Entity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEntity_Reentrant(), ecorePackage.getEBoolean(), "reentrant", null, 0, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEntity_PrimaryKey(), theJavaRefPackage.getJavaClass(), null, "primaryKey", null, 1, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(enterpriseBeanEClass, EnterpriseBean.class, "EnterpriseBean", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEnterpriseBean_Name(), ecorePackage.getEString(), "name", null, 0, 1, EnterpriseBean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEnterpriseBean_SecurityRoleRefs(), theCommonPackage.getSecurityRoleRef(), null, "securityRoleRefs", null, 0, -1, EnterpriseBean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEnterpriseBean_EjbClass(), theJavaRefPackage.getJavaClass(), null, "ejbClass", null, 1, 1, EnterpriseBean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEnterpriseBean_HomeInterface(), theJavaRefPackage.getJavaClass(), null, "homeInterface", null, 1, 1, EnterpriseBean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEnterpriseBean_RemoteInterface(), theJavaRefPackage.getJavaClass(), null, "remoteInterface", null, 1, 1, EnterpriseBean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEnterpriseBean_EjbJar(), this.getEJBJar(), this.getEJBJar_EnterpriseBeans(), "ejbJar", null, 1, 1, EnterpriseBean.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEnterpriseBean_SecurityIdentity(), theCommonPackage.getSecurityIdentity(), null, "securityIdentity", null, 0, 1, EnterpriseBean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEnterpriseBean_LocalHomeInterface(), theJavaRefPackage.getJavaClass(), null, "localHomeInterface", null, 0, 1, EnterpriseBean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEnterpriseBean_LocalInterface(), theJavaRefPackage.getJavaClass(), null, "localInterface", null, 0, 1, EnterpriseBean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(ejbMethodCategoryEClass, EJBMethodCategory.class, "EJBMethodCategory", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(ejbJarEClass, EJBJar.class, "EJBJar", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEJBJar_EjbClientJar(), ecorePackage.getEString(), "ejbClientJar", null, 0, 1, EJBJar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEJBJar_Version(), ecorePackage.getEString(), "version", null, 0, 1, EJBJar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBJar_AssemblyDescriptor(), this.getAssemblyDescriptor(), this.getAssemblyDescriptor_EjbJar(), "assemblyDescriptor", null, 0, 1, EJBJar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBJar_EnterpriseBeans(), this.getEnterpriseBean(), this.getEnterpriseBean_EjbJar(), "enterpriseBeans", null, 1, -1, EJBJar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBJar_RelationshipList(), this.getRelationships(), this.getRelationships_EjbJar(), "relationshipList", null, 0, 1, EJBJar.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(methodElementEClass, MethodElement.class, "MethodElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMethodElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, MethodElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMethodElement_Parms(), ecorePackage.getEString(), "parms", null, 0, 1, MethodElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMethodElement_Type(), this.getMethodElementKind(), "type", null, 0, 1, MethodElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMethodElement_Description(), ecorePackage.getEString(), "description", null, 0, 1, MethodElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodElement_EnterpriseBean(), this.getEnterpriseBean(), null, "enterpriseBean", null, 1, 1, MethodElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMethodElement_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, MethodElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(cmpAttributeEClass, CMPAttribute.class, "CMPAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getCMPAttribute_Description(), ecorePackage.getEString(), "description", null, 0, 1, CMPAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getCMPAttribute_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, CMPAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(relationshipsEClass, Relationships.class, "Relationships", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getRelationships_Description(), ecorePackage.getEString(), "description", null, 0, 1, Relationships.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getRelationships_EjbJar(), this.getEJBJar(), this.getEJBJar_RelationshipList(), "ejbJar", null, 1, 1, Relationships.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getRelationships_EjbRelations(), this.getEJBRelation(), this.getEJBRelation_RelationshipList(), "ejbRelations", null, 0, -1, Relationships.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getRelationships_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, Relationships.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(queryEClass, Query.class, "Query", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getQuery_Description(), ecorePackage.getEString(), "description", null, 0, 1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getQuery_EjbQL(), ecorePackage.getEString(), "ejbQL", null, 0, 1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getQuery_ReturnTypeMapping(), this.getReturnTypeMapping(), "returnTypeMapping", null, 0, 1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getQuery_QueryMethod(), this.getQueryMethod(), this.getQueryMethod_Query(), "queryMethod", null, 1, 1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getQuery_Entity(), this.getContainerManagedEntity(), this.getContainerManagedEntity_Queries(), "entity", null, 0, 1, Query.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getQuery_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(ejbRelationEClass, EJBRelation.class, "EJBRelation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEJBRelation_Description(), ecorePackage.getEString(), "description", null, 0, 1, EJBRelation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEJBRelation_Name(), ecorePackage.getEString(), "name", null, 0, 1, EJBRelation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBRelation_RelationshipList(), this.getRelationships(), this.getRelationships_EjbRelations(), "relationshipList", null, 0, 1, EJBRelation.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBRelation_RelationshipRoles(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_Relationship(), "relationshipRoles", null, 2, 2, EJBRelation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBRelation_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, EJBRelation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(ejbRelationshipRoleEClass, EJBRelationshipRole.class, "EJBRelationshipRole", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEJBRelationshipRole_Description(), ecorePackage.getEString(), "description", null, 0, 1, EJBRelationshipRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEJBRelationshipRole_RoleName(), ecorePackage.getEString(), "roleName", null, 0, 1, EJBRelationshipRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEJBRelationshipRole_Multiplicity(), this.getMultiplicityKind(), "multiplicity", null, 0, 1, EJBRelationshipRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getEJBRelationshipRole_CascadeDelete(), ecorePackage.getEBoolean(), "cascadeDelete", null, 0, 1, EJBRelationshipRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBRelationshipRole_Relationship(), this.getEJBRelation(), this.getEJBRelation_RelationshipRoles(), "relationship", null, 1, 1, EJBRelationshipRole.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBRelationshipRole_Source(), this.getRoleSource(), this.getRoleSource_Role(), "source", null, 1, 1, EJBRelationshipRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBRelationshipRole_CmrField(), this.getCMRField(), this.getCMRField_Role(), "cmrField", null, 1, 1, EJBRelationshipRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getEJBRelationshipRole_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, EJBRelationshipRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(roleSourceEClass, RoleSource.class, "RoleSource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getRoleSource_Description(), ecorePackage.getEString(), "description", null, 0, 1, RoleSource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getRoleSource_Role(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_Source(), "role", null, 1, 1, RoleSource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getRoleSource_EntityBean(), this.getContainerManagedEntity(), null, "entityBean", null, 1, 1, RoleSource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getRoleSource_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, RoleSource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(cmrFieldEClass, CMRField.class, "CMRField", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getCMRField_Role(), this.getEJBRelationshipRole(), this.getEJBRelationshipRole_CmrField(), "role", null, 0, 1, CMRField.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getCMRField_CollectionType(), theJavaRefPackage.getJavaClass(), null, "collectionType", null, 0, 1, CMRField.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(messageDrivenEClass, MessageDriven.class, "MessageDriven", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMessageDriven_TransactionType(), this.getTransactionType(), "transactionType", null, 0, 1, MessageDriven.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMessageDriven_MessageSelector(), ecorePackage.getEString(), "messageSelector", null, 0, 1, MessageDriven.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMessageDriven_AcknowledgeMode(), this.getAcknowledgeMode(), "acknowledgeMode", null, 0, 1, MessageDriven.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMessageDriven_Link(), ecorePackage.getEString(), "link", null, 0, 1, MessageDriven.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMessageDriven_Destination(), this.getMessageDrivenDestination(), this.getMessageDrivenDestination_Bean(), "destination", null, 0, 1, MessageDriven.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMessageDriven_ActivationConfig(), this.getActivationConfig(), null, "activationConfig", null, 0, 1, MessageDriven.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMessageDriven_MessageDestination(), theJavaRefPackage.getJavaClass(), null, "messageDestination", null, 0, 1, MessageDriven.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMessageDriven_MessagingType(), theJavaRefPackage.getJavaClass(), null, "messagingType", null, 0, 1, MessageDriven.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(messageDrivenDestinationEClass, MessageDrivenDestination.class, "MessageDrivenDestination", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getMessageDrivenDestination_Type(), this.getDestinationType(), "type", null, 0, 1, MessageDrivenDestination.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getMessageDrivenDestination_SubscriptionDurability(), this.getSubscriptionDurabilityKind(), "subscriptionDurability", null, 0, 1, MessageDrivenDestination.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getMessageDrivenDestination_Bean(), this.getMessageDriven(), this.getMessageDriven_Destination(), "bean", null, 1, 1, MessageDrivenDestination.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(excludeListEClass, ExcludeList.class, "ExcludeList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getExcludeList_Description(), ecorePackage.getEString(), "description", null, 0, 1, ExcludeList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getExcludeList_MethodElements(), this.getMethodElement(), null, "methodElements", null, 1, -1, ExcludeList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getExcludeList_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, ExcludeList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(queryMethodEClass, QueryMethod.class, "QueryMethod", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getQueryMethod_Query(), this.getQuery(), this.getQuery_QueryMethod(), "query", null, 1, 1, QueryMethod.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(activationConfigPropertyEClass, ActivationConfigProperty.class, "ActivationConfigProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getActivationConfigProperty_Value(), ecorePackage.getEString(), "value", null, 0, 1, ActivationConfigProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getActivationConfigProperty_Name(), ecorePackage.getEString(), "name", null, 0, 1, ActivationConfigProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(activationConfigEClass, ActivationConfig.class, "ActivationConfig", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getActivationConfig_ConfigProperties(), this.getActivationConfigProperty(), null, "configProperties", null, 1, -1, ActivationConfig.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getActivationConfig_Descriptions(), theCommonPackage.getDescription(), null, "descriptions", null, 0, -1, ActivationConfig.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Initialize enums and add enum literals
- initEEnum(transactionAttributeTypeEEnum, TransactionAttributeType.class, "TransactionAttributeType");
- addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.NOT_SUPPORTED_LITERAL);
- addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.SUPPORTS_LITERAL);
- addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.REQUIRED_LITERAL);
- addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.REQUIRES_NEW_LITERAL);
- addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.MANDATORY_LITERAL);
- addEEnumLiteral(transactionAttributeTypeEEnum, TransactionAttributeType.NEVER_LITERAL);
-
- initEEnum(transactionTypeEEnum, TransactionType.class, "TransactionType");
- addEEnumLiteral(transactionTypeEEnum, TransactionType.BEAN_LITERAL);
- addEEnumLiteral(transactionTypeEEnum, TransactionType.CONTAINER_LITERAL);
-
- initEEnum(sessionTypeEEnum, SessionType.class, "SessionType");
- addEEnumLiteral(sessionTypeEEnum, SessionType.STATEFUL_LITERAL);
- addEEnumLiteral(sessionTypeEEnum, SessionType.STATELESS_LITERAL);
-
- initEEnum(methodElementKindEEnum, MethodElementKind.class, "MethodElementKind");
- addEEnumLiteral(methodElementKindEEnum, MethodElementKind.UNSPECIFIED_LITERAL);
- addEEnumLiteral(methodElementKindEEnum, MethodElementKind.REMOTE_LITERAL);
- addEEnumLiteral(methodElementKindEEnum, MethodElementKind.HOME_LITERAL);
- addEEnumLiteral(methodElementKindEEnum, MethodElementKind.LOCAL_LITERAL);
- addEEnumLiteral(methodElementKindEEnum, MethodElementKind.LOCAL_HOME_LITERAL);
- addEEnumLiteral(methodElementKindEEnum, MethodElementKind.SERVICE_ENDPOINT_LITERAL);
-
- initEEnum(acknowledgeModeEEnum, AcknowledgeMode.class, "AcknowledgeMode");
- addEEnumLiteral(acknowledgeModeEEnum, AcknowledgeMode.AUTO_ACKNOWLEDGE_LITERAL);
- addEEnumLiteral(acknowledgeModeEEnum, AcknowledgeMode.DUPS_OK_ACKNOWLEDGE_LITERAL);
-
- initEEnum(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.class, "SubscriptionDurabilityKind");
- addEEnumLiteral(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.DURABLE_LITERAL);
- addEEnumLiteral(subscriptionDurabilityKindEEnum, SubscriptionDurabilityKind.NON_DURABLE_LITERAL);
-
- initEEnum(returnTypeMappingEEnum, ReturnTypeMapping.class, "ReturnTypeMapping");
- addEEnumLiteral(returnTypeMappingEEnum, ReturnTypeMapping.LOCAL_LITERAL);
- addEEnumLiteral(returnTypeMappingEEnum, ReturnTypeMapping.REMOTE_LITERAL);
-
- initEEnum(destinationTypeEEnum, DestinationType.class, "DestinationType");
- addEEnumLiteral(destinationTypeEEnum, DestinationType.QUEUE_LITERAL);
- addEEnumLiteral(destinationTypeEEnum, DestinationType.TOPIC_LITERAL);
-
- initEEnum(multiplicityKindEEnum, MultiplicityKind.class, "MultiplicityKind");
- addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.ONE_LITERAL);
- addEEnumLiteral(multiplicityKindEEnum, MultiplicityKind.MANY_LITERAL);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //EjbPackageImpl
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EnterpriseBeanImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EnterpriseBeanImpl.java
deleted file mode 100644
index 3017e9f9f..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EnterpriseBeanImpl.java
+++ /dev/null
@@ -1,1292 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaHelpers;
-import org.eclipse.jem.java.JavaParameter;
-import org.eclipse.jem.java.JavaRefFactory;
-import org.eclipse.jem.java.JavaRefPackage;
-import org.eclipse.jem.java.Method;
-import org.eclipse.jst.j2ee.common.EJBLocalRef;
-import org.eclipse.jst.j2ee.common.EjbRef;
-import org.eclipse.jst.j2ee.common.SecurityIdentity;
-import org.eclipse.jst.j2ee.common.SecurityRoleRef;
-import org.eclipse.jst.j2ee.common.internal.impl.JNDIEnvRefsGroupImpl;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EjbFactory;
-import org.eclipse.jst.j2ee.ejb.EjbMethodElementComparator;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodElementKind;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionResource;
-import org.eclipse.wst.common.internal.emf.utilities.Revisit;
-
-/**
- * @generated
- * EnterpriseJavaBean is a class. It can have instances, someone could write an instance document containing Departments and Employees. It also has attributes, operations, and associations. These are actually derived//filtered from its implementation classes and interfaces. For mapping and browsing purposes, though, you would like the EJB to appear as a class.
- *
- * In this light, even Session Beans can have associations and properties implemented by their bean. For example, it would be meaningful to describe associations from a Session to the Entities which it uses to perform its work.
- */
-public abstract class EnterpriseBeanImpl extends JNDIEnvRefsGroupImpl implements EnterpriseBean {
-
- protected final static Method[] EMPTY_METHOD_ARRAY = new Method[0];
- protected static final String METHOD_ELEMENT_NAME = "MethodElement"; //$NON-NLS-1$
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList securityRoleRefs = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected JavaClass ejbClass = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected JavaClass homeInterface = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected JavaClass remoteInterface = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected SecurityIdentity securityIdentity = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected JavaClass localHomeInterface = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected JavaClass localInterface = null;
- protected EjbMethodElementComparator defaultMethodElementComparator;
- public EnterpriseBeanImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.ENTERPRISE_BEAN;
- }
-
- /**
- * createClassRef - return a JavaURL reference to the named Java class
- */
- public JavaClass createClassRef(String targetName) {
- return getJavaRefFactory().createClassRef(targetName);
- }
-
- protected List createMethodElements(List signatures, Enumerator aType) {
- return createMethodElements(METHOD_ELEMENT_NAME, signatures, aType);
- }
-
- protected List createMethodElements(String meTypeName, List signatures, Enumerator aType) {
- int size = signatures.size();
- List methodElements = new ArrayList(size);
- String signature;
- MethodElement me;
- for (int i = 0; i < size; i++) {
- signature = (String) signatures.get(i);
- me = (MethodElement) getEjbFactory().create((EClass)getEjbPackage().getEClassifier(meTypeName));
- me.initializeFromSignature(signature);
- me.setEnterpriseBean(this);
- me.setType((MethodElementKind)aType);
- methodElements.add(me);
- }
- return methodElements;
- }
-
- public List createMethodElements(List someMethods, JavaClass anInterface) {
- return createMethodElements(METHOD_ELEMENT_NAME, someMethods, anInterface);
- }
-
- public List createMethodElements(String meTypeName, List someMethods, JavaClass anInterface) {
- if (anInterface == null)
- return Collections.EMPTY_LIST;
- List signatures = getMethodElementSignatures(someMethods);
- Collections.sort(signatures);
- Enumerator enumerator = getMethodElementKindLiteral(anInterface);
- return createMethodElements(meTypeName, signatures, enumerator);
- }
-
- protected Enumerator getMethodElementKindLiteral(JavaClass anInterface) {
- Enumerator enumerator = MethodElementKind.UNSPECIFIED_LITERAL;
- if (anInterface == getHomeInterface())
- enumerator = MethodElementKind.HOME_LITERAL;
- else if (anInterface == getRemoteInterface())
- enumerator = MethodElementKind.REMOTE_LITERAL;
- else if (anInterface == getLocalHomeInterface())
- enumerator = MethodElementKind.LOCAL_HOME_LITERAL;
- else if (anInterface == getLocalInterface())
- enumerator = MethodElementKind.LOCAL_LITERAL;
- return enumerator;
- }
-
- protected List getMethodElementSignatures(List someMethods) {
- int size = someMethods.size();
- List signatures = new ArrayList(size);
- Method method;
- for (int i = 0; i < size; i++) {
- method = (Method) someMethods.get(i);
- signatures.add(method.getMethodElementSignature());
- }
- return signatures;
- }
- /**
- * This method will return a List of newly created MethodElements
- * that represent all the possible MethodElements that can be created
- * and are common to both the Home and Remote interfaces. These MethodElements are not contained and will
- * not be serialized and should not be added to the model. Their intention is
- * solely for comparing with actual MethodElements contained in the model.
- * @deprecated use getAvailableUnspecifiedMethodElements();
- */
- public List getAvailableCommonMethodElements() {
- return getAvailableUnspecifiedMethodElements();
- }
- /**
- * This method will return a List of newly created MethodElements
- * that represent all the possible MethodElements that can be created
- * and are common to both the Home and Remote interfaces. These MethodElements are not contained and will
- * not be serialized and should not be added to the model. Their intention is
- * solely for comparing with actual MethodElements contained in the model.
- */
- public List getAvailableUnspecifiedMethodElements() {
- List commonSigs = getAvailableUnspecifiedMethodElementSignatures();
- return createMethodElements(commonSigs, MethodElementKind.UNSPECIFIED_LITERAL);
- }
- protected List gatherCommonSignatures(List sigCollections) {
- if (sigCollections.isEmpty()) return sigCollections;
- List first = (List)sigCollections.get(0);
- if (sigCollections.size() == 1) return first;
- List result = new ArrayList(first.size());
- sigCollections.remove(0);
- String sig = null;
- boolean contains = false;
- for (int i = 0; i < first.size(); i++) {
- contains = false;
- sig = (String) first.get(i);
- List list = null;
- for (int j = 0; j < sigCollections.size(); j++) {
- list = (List) sigCollections.get(j);
- if (list.contains(sig))
- contains = true;
- }
- if (contains)
- result.add(sig);
- }
- return result;
- }
- /**
- * Return a List of MethodElements that are set for a particular EObject
- * which can be a MethodTransaction or a MethodPermission.
- */
- protected List getExistingMethodElements(EObject refObject) {
- if (refObject != null) {
- EjbPackage pack = getEjbPackage();
- if (refObject.eClass() == pack.getMethodTransaction())
- return ((MethodTransaction)refObject).getMethodElements(this);
- if (refObject.eClass() == pack.getMethodPermission())
- return ((MethodPermission)refObject).getMethodElements(this);
- }
- return Collections.EMPTY_LIST;
- }
- /**
- * This method will return a List of MethodElements signatures
- * that represent all the possible MethodElements that can be created
- * and are common to both the Home and Remote interfaces.
- * @deprecated use getAvailableUnspecifiedMethodElementSignatures();
- */
- public List getAvailableCommonMethodElementSignatures() {
- return getAvailableUnspecifiedMethodElementSignatures();
- }
- /**
- * This method will return a List of MethodElements signatures
- * that represent all the possible MethodElements that can be created
- * and are common to both the Home and Remote interfaces.
- */
- public List getAvailableUnspecifiedMethodElementSignatures() {
- List sigCollections = new ArrayList();
- if (getHomeInterface() != null)
- sigCollections.add(getHomeInterface().getMethodElementSignatures());
- if (getRemoteInterface() != null)
- sigCollections.add(getRemoteInterface().getMethodElementSignatures());
- if (getLocalHomeInterface() != null)
- sigCollections.add(getLocalHomeInterface().getMethodElementSignatures());
- if (getLocalInterface() != null)
- sigCollections.add(getLocalInterface().getMethodElementSignatures());
- return gatherCommonSignatures(sigCollections);
- }
- /**
- * This method will return a List of newly created MethodElements
- * that represent all the possible MethodElements that can be created
- * for the Home interface. These MethodElements are not contained and will
- * not be serialized and should not be added to the model. Their intention is
- * solely for comparing with actual MethodElements contained in the model.
- */
- public List getAvailableHomeMethodElements() {
- return getAvailableMethodElements(getHomeInterface(), MethodElementKind.HOME_LITERAL);
- }
- /**
- * This method will return a List of newly created MethodElements
- * that represent all the possible MethodElements that can be created
- * for the Local Home interface. These MethodElements are not contained and will
- * not be serialized and should not be added to the model. Their intention is
- * solely for comparing with actual MethodElements contained in the model.
- */
- public List getAvailableLocalHomeMethodElements() {
- return getAvailableMethodElements(getLocalHomeInterface(), MethodElementKind.LOCAL_HOME_LITERAL);
- }
- /**
- * This method will return a List of newly created MethodElements
- * that represent all the possible MethodElements that can be created
- * for the Local interface. These MethodElements are not contained and will
- * not be serialized and should not be added to the model. Their intention is
- * solely for comparing with actual MethodElements contained in the model.
- */
- public List getAvailableLocalMethodElements() {
- return getAvailableMethodElements(getLocalInterface(), MethodElementKind.LOCAL_LITERAL);
- }
-
- public List getAvailableServiceEndpointMethodElements(){
- return getAvailableMethodElements(getServiceEndpoint(), MethodElementKind.SERVICE_ENDPOINT_LITERAL);
- }
-
- protected List getAvailableMethodElements(JavaClass anInterface, Enumerator aType) {
- if (anInterface == null)
- return Collections.EMPTY_LIST;
- List signatures = anInterface.getMethodElementSignatures();
- return createMethodElements(signatures, aType);
- }
- /**
- * This method will return a List of newly created MethodElements
- * that represent all the possible MethodElements that can be created
- * for the Remote interface. These MethodElements are not contained and will
- * not be serialized and should not be added to the model. Their intention is
- * solely for comparing with actual MethodElements contained in the model.
- */
- public List getAvailableRemoteMethodElements() {
- return getAvailableMethodElements(getRemoteInterface(), MethodElementKind.REMOTE_LITERAL);
- }
-
- /*
- * See EnterpriseBean#getExistingOrAvailableMethodElements(EObject, Comparator);
- */
- public List getExistingOrAvailableMethodElements(EObject refObject, Comparator comparator) {
- List result = new ArrayList();
- result.addAll(getAvailableHomeMethodElements());
- result.addAll(getAvailableRemoteMethodElements());
- result.addAll(getAvailableLocalHomeMethodElements());
- result.addAll(getAvailableLocalMethodElements());
- result.addAll(getAvailableServiceEndpointMethodElements());
- result.addAll(getAvailableUnspecifiedMethodElements());
-
- List list = getEjbClass().getImplementsInterfaces();
- Iterator it = list.iterator();
- while( it.hasNext()){
- JavaClass interfaceClass = (JavaClass)it.next();
- String interfaceName = interfaceClass.getQualifiedName();
- if( !interfaceName.equals("javax.ejb.MessageDrivenBean") &&
- !interfaceName.equals("javax.ejb.EntityBean")&&
- !interfaceName.equals("javax.ejb.SessionBean")){
- result.addAll( getAvailableMethodElements(interfaceClass, MethodElementKind.UNSPECIFIED_LITERAL));
- }
- }
-
- unionMethodElements(result, getExistingMethodElements(refObject));
- Collections.sort(result, comparator);
- return result;
- }
- /*
- * See EnterpriseBean#getExistingOrAvailableMethodElements(EObject);
- */
- public List getExistingOrAvailableMethodElements(EObject refObject) {
- return getExistingOrAvailableMethodElements(refObject, getDefaultMethodElementComparator());
- }
-
- protected EjbMethodElementComparator getDefaultMethodElementComparator() {
- if (defaultMethodElementComparator == null)
- defaultMethodElementComparator = new EjbMethodElementComparator();
- return defaultMethodElementComparator;
- }
- protected void unionMethodElements(List sourceMethodElements, List additionalMethodElements) {
- MethodElement sourceME, additionalME;
- int sourceSize, addSize;
- sourceSize = sourceMethodElements.size();
- addSize = additionalMethodElements.size();
- List foundElements = new ArrayList(addSize);
- boolean found = false;
- for (int i = 0; i < addSize; i++){
- found = false;
- additionalME = (MethodElement) additionalMethodElements.get(i);
- sourceME = null;
- for (int ii = 0; ii < sourceSize; ii++){
- sourceME = (MethodElement) sourceMethodElements.get(ii);
- if (sourceME.isEquivalent(additionalME)) {
- found = true;
- break;
- }
- }
- if (found)
- foundElements.add(sourceME);
- }
- sourceMethodElements.removeAll(foundElements);
- sourceMethodElements.addAll(additionalMethodElements);
- }
- public String getEjbClassName() {
- getEjbClass();
- return (ejbClass == null) ? null : ejbClass.getQualifiedName();
- }
- protected EjbPackage getEjbPackage() {
- return EjbFactoryImpl.getPackage();
- }
- protected EjbFactory getEjbFactory() {
- return ((EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI)).getEjbFactory();
- }
- public EjbRef getEquivalentEjbRef(EjbRef anEjbRef) {
- return getEquivalentEjbRef(anEjbRef, getEjbRefs());
- }
- public EJBLocalRef getEquivalentEJBLocalRef(EJBLocalRef anEjbLocalRef) {
- return (EJBLocalRef) getEquivalentEjbRef(anEjbLocalRef, getEjbLocalRefs());
- }
- private EjbRef getEquivalentEjbRef(EjbRef anEjbRef, List someRefs) {
- if (anEjbRef == null)
- return null;
- int size = someRefs.size();
- EjbRef ref;
- for (int i = 0; i < size; i++) {
- ref = (EjbRef) someRefs.get(i);
- if (ref.isEquivalent(anEjbRef))
- return ref;
- }
- return null;
- }
- public String getHomeInterfaceName() {
- getHomeInterface();
- return homeInterface == null ? null : homeInterface.getQualifiedName();
- }
- /**
- * See <code>getMethods<code> for comment
- */
- public Method[] getHomeMethodsForDeployment() {
- return (getHomeInterface() != null ? getMethods(getHomeInterface()) : EMPTY_METHOD_ARRAY);
- }
- private JavaRefFactory getJavaRefFactory() {
- return ((JavaRefPackage)EPackage.Registry.INSTANCE.getEPackage(JavaRefPackage.eNS_URI)).getJavaRefFactory();
- }
- public EjbRef getLinkedEJBReference(EnterpriseBean anEJB) {
- return getLinkedEJBReference(anEJB, getEjbRefs());
- }
- public EJBLocalRef getLinkedEJBLocalReference(EnterpriseBean anEJB) {
- return (EJBLocalRef) getLinkedEJBReference(anEJB, getEjbLocalRefs());
- }
- private EjbRef getLinkedEJBReference(EnterpriseBean anEJB, List someRefs) {
- if (anEJB == null)
- return null;
- int size = someRefs.size();
- EjbRef ref;
- for (int i = 0; i < size; i++) {
- ref = (EjbRef) someRefs.get(i);
- if (ref.isLinked(anEJB))
- return ref;
- }
- return null;
- }
- public String getLocalHomeInterfaceName() {
- getLocalHomeInterface();
- return localHomeInterface == null ? null : localHomeInterface.getQualifiedName();
- }
- /**
- * See <code>getMethods<code> for comment
- */
- public Method[] getLocalHomeMethodsForDeployment() {
- return (getLocalHomeInterface() != null ? getMethods(getLocalHomeInterface()) : EMPTY_METHOD_ARRAY);
- }
- public String getLocalInterfaceName() {
- getLocalInterface();
- return localInterface == null ? null : localInterface.getQualifiedName();
- }
- /**
- * Retrieve an ordered list of methods for the given JavaClass.
- * The list should include all non-static, public methods that are
- * not inherited from javax.ejb.EJBObject
- * This uses the algorithm that web sphere currently uses, and could
- * be subject to change
- * Creation date: (8/21/00 1:41:03 PM)
- * @param intf JavaClass
- */
- public static Method[] getMethods(JavaClass intf) {
- Method[] allMethods = intf.listMethodExtended();
- java.util.Vector resultVector = new java.util.Vector(allMethods.length);
- java.util.Hashtable methodNameTable = new java.util.Hashtable();
-
- //----------------------------------------------------------------
- // Iterate over the list returned by "listMethodExtended" and
- // filter out methods belonging to the EJBObject interface
- // and method synonyms.
- //
- // Method synonyms correspond to overrides. For all synonyms
- // keep the method instance declared on the most specific class.
- // How do you determine the most specific class? Don't know.
- // For now, if the method is declared on the interface class
- // it always overrides others.
- //----------------------------------------------------------------
-
- Method[] result = null;
-
- for (int i = 0; i < allMethods.length; i++) {
- Method m = allMethods[i];
-
- //---------------------------
- // Filter out static methods
- //---------------------------
-
- if (m.isStatic()) {
- continue;
- }
-
- String mKey = methodKey(m);
-
- String interfaceName = m.getContainingJavaClass().getJavaName();
- if (!interfaceName.equals("javax.ejb.EJBObject")) { //$NON-NLS-1$
- Method synonym = (Method) methodNameTable.get(mKey);
- if (synonym == null) {
- methodNameTable.put(mKey, m);
- resultVector.addElement(m);
- } else {
- //---------------------------------------------
- // Method declared on most specific class wins
- //---------------------------------------------
- JavaClass mClass = m.getContainingJavaClass();
- JavaClass sClass = synonym.getContainingJavaClass();
- if (sClass.implementsInterface(mClass)) {
- resultVector.removeElement(synonym);
- methodNameTable.put(mKey, m);
- resultVector.addElement(m);
- }
- }
- }
- }
-
- result = new Method[resultVector.size()];
- resultVector.copyInto(result);
- return sortMethods(result);
- }
- public String getRemoteInterfaceName() {
- getRemoteInterface();
- return remoteInterface == null ? null : remoteInterface.getQualifiedName();
- }
- /**
- * See <code>getMethods<code> for comment
- */
- public Method[] getRemoteMethodsForDeployment() {
- return getMethods(getRemoteInterface());
- }
- /**
- * Return true if @aJavaClass as equal to the
- * home, remote, bean class, or key class.
- */
- public boolean hasJavaReference(JavaClass aJavaClass) {
- if (aJavaClass != null) {
- return aJavaClass.equals(getEjbClass())||
- aJavaClass.equals(getRemoteInterface()) ||
- aJavaClass.equals(getHomeInterface()) ||
- aJavaClass.equals(getLocalInterface()) ||
- aJavaClass.equals(getLocalHomeInterface());
- }
- return false;
- }
- /**
- * Return true if this ejb has BeanManagedPersistance.
- */
- public boolean isBeanManagedEntity() {
- return isEntity() && !isContainerManagedEntity();
- }
- /**
- * isContainerManagedEntity method comment.
- */
- public boolean isContainerManagedEntity() {
- return false;
- }
- //Return false by default
- public boolean isEntity() {
- return false;
- }
- //Return false by default
- public boolean isMessageDriven() {
- return false;
- }
- //Return false by default
- public boolean isSession() {
- return false;
- }
- /**
- * @deprecated - Use getEjbJar().getVersionID()
- * isVersion1_X method comment.
- */
- public boolean isVersion1_X() {
- if (getEjbJar() != null)
- return getEjbJar().getVersionID() <= J2EEVersionConstants.EJB_1_1_ID;
- Revisit.revisit(); //jsholl this should throw an exception. if there is not JAR then the version is undefined
- return false;
- }
- /**
- * @deprecated - Use getEjbJar().getVersionID()
- * isVersion2_X method comment.
- */
- public boolean isVersion2_X() {
- if (getEjbJar() != null) {
- return getEjbJar().getVersionID() >= J2EEVersionConstants.EJB_1_1_ID;
- }
- Revisit.revisit(); //jsholl this should throw an exception. if there is not JAR then the version is undefined
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean#getVersionID()
- */
- public int getVersionID() throws IllegalStateException {
- J2EEVersionResource res = (J2EEVersionResource) eResource();
- if (res == null) throw new IllegalStateException();
- return res.getModuleVersionID();
- }
-
-
- /*
- * @see EnterpriseBean#hasLocalClient()
- */
- public boolean hasLocalClient() {
- return getLocalInterface() != null && getLocalHomeInterface() != null;
- }
-
- /*
- * @see EnterpriseBean#hasRemoteClient()
- */
- public boolean hasRemoteClient() {
- return getRemoteInterface() != null && getHomeInterface() != null;
- }
-
- /**
- * Get method name string of form:
- * methodName(class name of arg1,class name of arg2,...)
- * Creation date: (8/24/00 1:21:10 PM)
- * @return String
- * @param m Method
- */
- private static String methodKey(Method m) {
- StringBuffer result = new StringBuffer(m.getName());
-
- result.append("("); //$NON-NLS-1$
-
- java.util.List args = m.getParameters();
- JavaParameter arg;
- for (int i = 0; i < args.size(); i++) {
- arg = (JavaParameter) args.get(i);
- result.append(((JavaHelpers) arg.getEType()).getJavaName());
- result.append(","); //$NON-NLS-1$
- }
- result.append(")"); //$NON-NLS-1$
- return result.toString();
- }
- public Object primRefValue(EObject feature) {
- switch (eDerivedStructuralFeatureID(((EStructuralFeature)feature).getFeatureID(), ((EStructuralFeature)feature).getContainerClass())) {
- case EjbPackage.ENTERPRISE_BEAN__DESCRIPTION :
- return getDescription();
- case EjbPackage.ENTERPRISE_BEAN__DISPLAY_NAME :
- return getDisplayName();
- case EjbPackage.ENTERPRISE_BEAN__SMALL_ICON :
- return getSmallIcon();
- case EjbPackage.ENTERPRISE_BEAN__LARGE_ICON :
- return getLargeIcon();
- case EjbPackage.ENTERPRISE_BEAN__RESOURCE_REFS :
- return getResourceRefs();
- case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS :
- return getEjbClass();
- case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE :
- return getHomeInterface();
- case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE :
- return getRemoteInterface();
- case EjbPackage.ENTERPRISE_BEAN__ENVIRONMENT_PROPERTIES :
- return getEnvironmentProperties();
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS :
- return getSecurityRoleRefs();
- case EjbPackage.ENTERPRISE_BEAN__EJB_REFS :
- return getEjbRefs();
- case EjbPackage.ENTERPRISE_BEAN__EJB_LOCAL_REFS :
- return getEjbLocalRefs();
- case EjbPackage.ENTERPRISE_BEAN__RESOURCE_ENV_REFS :
- return getResourceEnvRefs();
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY :
- return getSecurityIdentity();
- case EjbPackage.ENTERPRISE_BEAN__NAME :
- return getName();
- }
- return null;
- }
- /**
- * @see org.eclipse.jst.j2ee.internal.ejb.EnterpriseBean
- */
- public void reSyncSecurityRoleRef(java.lang.String existingRoleName, java.lang.String newRoleName) {
- List roleRefs = getSecurityRoleRefs();
- for (int i = 0; i < roleRefs.size(); i++) {
- SecurityRoleRef roleRef = (SecurityRoleRef) roleRefs.get(i);
- if (roleRef.getLink() != null && roleRef.getLink().equals(existingRoleName))
- roleRef.setLink(newRoleName);
- }
- }
- public void setEjbClassName(String ejbClassName) {
- eSet(EjbPackage.eINSTANCE.getEnterpriseBean_EjbClass(), createClassRef(ejbClassName));
- }
- public void setHomeInterfaceName(String homeInterfaceName) {
- eSet(EjbPackage.eINSTANCE.getEnterpriseBean_HomeInterface(), createClassRef(homeInterfaceName));
- }
- public void setLocalHomeInterfaceName(String localHomeInterfaceName) {
- eSet(EjbPackage.eINSTANCE.getEnterpriseBean_LocalHomeInterface(), createClassRef(localHomeInterfaceName));
- }
- public void setLocalInterfaceName(String localInterfaceName) {
- eSet(EjbPackage.eINSTANCE.getEnterpriseBean_LocalInterface(), createClassRef(localInterfaceName));
- }
- public void setRemoteInterfaceName(String remoteInterfaceName) {
- eSet(EjbPackage.eINSTANCE.getEnterpriseBean_RemoteInterface(), createClassRef(remoteInterfaceName));
- }
- /**
- * Insert the method's description here.
- * Creation date: (8/24/00 1:32:13 PM)
- * @return Method[]
- * @param methods Method[]
- */
- private static Method[] sortMethods(Method[] methods) {
- Method result[] = new Method[methods.length];
-
- /**
- * Insert each element of given list of methods into result
- * arary in sorted order
- */
-
- for (int i = 0; i < methods.length; i++) {
- Method currMethod = methods[i];
- String currMethodName = currMethod.getSignature();
- int insertIndex = 0;
- while (insertIndex < i) {
- if (currMethodName.compareTo(result[insertIndex].getSignature()) <= 0) {
- break;
- }
- insertIndex++;
- }
-
- for (int j = insertIndex; j <= i; j++) {
- Method tmpMethod = result[j];
- result[j] = currMethod;
- currMethod = tmpMethod;
- }
- }
- return result;
- }
- public String toString() {
- return getClass().getName() + "(" + getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- /**
- *
- */
- public void setDisplayName(String newDisplayName) {
- super.setDisplayName(newDisplayName);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__NAME, oldName, name));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getSecurityRoleRefs() {
- if (securityRoleRefs == null) {
- securityRoleRefs = new EObjectContainmentEList(SecurityRoleRef.class, this, EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS);
- }
- return securityRoleRefs;
- }
-
- /**
- * Handwritten version of getEjbClass():
- */
-
-
- public JavaClass getEjbClass() {
- if (ejbClass != null && ejbClass.eIsProxy()) {
- JavaClass oldEjbClass = ejbClass;
- JavaClass resolved = (JavaClass)EcoreUtil.resolve(ejbClass, this);
- resolved(this.ejbClass, resolved);
- this.ejbClass = resolved;
- if (ejbClass != oldEjbClass) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass));
- }
- }
- return ejbClass;
- }
-
-
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setEjbClass(JavaClass newEjbClass) {
- JavaClass oldEjbClass = ejbClass;
- ejbClass = newEjbClass;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public JavaClass getHomeInterface() {
- if (homeInterface != null && homeInterface.eIsProxy()) {
- InternalEObject oldHomeInterface = (InternalEObject)homeInterface;
- homeInterface = (JavaClass)eResolveProxy(oldHomeInterface);
- if (homeInterface != oldHomeInterface) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE, oldHomeInterface, homeInterface));
- }
- }
- return homeInterface;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetHomeInterface() {
- return homeInterface;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setHomeInterface(JavaClass newHomeInterface) {
- JavaClass oldHomeInterface = homeInterface;
- homeInterface = newHomeInterface;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE, oldHomeInterface, homeInterface));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public JavaClass getRemoteInterface() {
- if (remoteInterface != null && remoteInterface.eIsProxy()) {
- InternalEObject oldRemoteInterface = (InternalEObject)remoteInterface;
- remoteInterface = (JavaClass)eResolveProxy(oldRemoteInterface);
- if (remoteInterface != oldRemoteInterface) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE, oldRemoteInterface, remoteInterface));
- }
- }
- return remoteInterface;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetRemoteInterface() {
- return remoteInterface;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRemoteInterface(JavaClass newRemoteInterface) {
- JavaClass oldRemoteInterface = remoteInterface;
- remoteInterface = newRemoteInterface;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE, oldRemoteInterface, remoteInterface));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EJBJar getEjbJar() {
- if (eContainerFeatureID != EjbPackage.ENTERPRISE_BEAN__EJB_JAR) return null;
- return (EJBJar)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetEjbJar(EJBJar newEjbJar, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setEjbJar(EJBJar newEjbJar) {
- if (newEjbJar != eInternalContainer() || (eContainerFeatureID != EjbPackage.ENTERPRISE_BEAN__EJB_JAR && newEjbJar != null)) {
- if (EcoreUtil.isAncestor(this, newEjbJar))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newEjbJar != null)
- msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs);
- msgs = basicSetEjbJar(newEjbJar, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__EJB_JAR, newEjbJar, newEjbJar));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The security-identity element specifies whether the caller's security identity is to be used for the execution of the methods of the enterprise bean or whether a specific run-as identity is to be used. It
- * contains an optional description and a specification of the security identity to be used.
- */
- public SecurityIdentity getSecurityIdentity() {
- return securityIdentity;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetSecurityIdentity(SecurityIdentity newSecurityIdentity, NotificationChain msgs) {
- SecurityIdentity oldSecurityIdentity = securityIdentity;
- securityIdentity = newSecurityIdentity;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, oldSecurityIdentity, newSecurityIdentity);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setSecurityIdentity(SecurityIdentity newSecurityIdentity) {
- if (newSecurityIdentity != securityIdentity) {
- NotificationChain msgs = null;
- if (securityIdentity != null)
- msgs = ((InternalEObject)securityIdentity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, null, msgs);
- if (newSecurityIdentity != null)
- msgs = ((InternalEObject)newSecurityIdentity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, null, msgs);
- msgs = basicSetSecurityIdentity(newSecurityIdentity, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY, newSecurityIdentity, newSecurityIdentity));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public JavaClass getLocalHomeInterface() {
- if (localHomeInterface != null && localHomeInterface.eIsProxy()) {
- InternalEObject oldLocalHomeInterface = (InternalEObject)localHomeInterface;
- localHomeInterface = (JavaClass)eResolveProxy(oldLocalHomeInterface);
- if (localHomeInterface != oldLocalHomeInterface) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE, oldLocalHomeInterface, localHomeInterface));
- }
- }
- return localHomeInterface;
- }
-
- public JavaClass getServiceEndpoint() {
- return null;
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetLocalHomeInterface() {
- return localHomeInterface;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setLocalHomeInterface(JavaClass newLocalHomeInterface) {
- JavaClass oldLocalHomeInterface = localHomeInterface;
- localHomeInterface = newLocalHomeInterface;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE, oldLocalHomeInterface, localHomeInterface));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public JavaClass getLocalInterface() {
- if (localInterface != null && localInterface.eIsProxy()) {
- InternalEObject oldLocalInterface = (InternalEObject)localInterface;
- localInterface = (JavaClass)eResolveProxy(oldLocalInterface);
- if (localInterface != oldLocalInterface) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE, oldLocalInterface, localInterface));
- }
- }
- return localInterface;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetLocalInterface() {
- return localInterface;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setLocalInterface(JavaClass newLocalInterface) {
- JavaClass oldLocalInterface = localInterface;
- localInterface = newLocalInterface;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE, oldLocalInterface, localInterface));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.ENTERPRISE_BEAN__EJB_JAR:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetEjbJar((EJBJar)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS:
- return ((InternalEList)getSecurityRoleRefs()).basicRemove(otherEnd, msgs);
- case EjbPackage.ENTERPRISE_BEAN__EJB_JAR:
- return basicSetEjbJar(null, msgs);
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY:
- return basicSetSecurityIdentity(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.ENTERPRISE_BEAN__EJB_JAR:
- return eInternalContainer().eInverseRemove(this, EjbPackage.EJB_JAR__ENTERPRISE_BEANS, EJBJar.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.ENTERPRISE_BEAN__NAME:
- return getName();
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS:
- return getSecurityRoleRefs();
- case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS:
- if (resolve) return getEjbClass();
- return basicGetEjbClass();
- case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE:
- if (resolve) return getHomeInterface();
- return basicGetHomeInterface();
- case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE:
- if (resolve) return getRemoteInterface();
- return basicGetRemoteInterface();
- case EjbPackage.ENTERPRISE_BEAN__EJB_JAR:
- return getEjbJar();
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY:
- return getSecurityIdentity();
- case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE:
- if (resolve) return getLocalHomeInterface();
- return basicGetLocalHomeInterface();
- case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE:
- if (resolve) return getLocalInterface();
- return basicGetLocalInterface();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.ENTERPRISE_BEAN__NAME:
- setName((String)newValue);
- return;
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS:
- getSecurityRoleRefs().clear();
- getSecurityRoleRefs().addAll((Collection)newValue);
- return;
- case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS:
- setEjbClass((JavaClass)newValue);
- return;
- case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE:
- setHomeInterface((JavaClass)newValue);
- return;
- case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE:
- setRemoteInterface((JavaClass)newValue);
- return;
- case EjbPackage.ENTERPRISE_BEAN__EJB_JAR:
- setEjbJar((EJBJar)newValue);
- return;
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY:
- setSecurityIdentity((SecurityIdentity)newValue);
- return;
- case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE:
- setLocalHomeInterface((JavaClass)newValue);
- return;
- case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE:
- setLocalInterface((JavaClass)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.ENTERPRISE_BEAN__NAME:
- setName(NAME_EDEFAULT);
- return;
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS:
- getSecurityRoleRefs().clear();
- return;
- case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS:
- setEjbClass((JavaClass)null);
- return;
- case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE:
- setHomeInterface((JavaClass)null);
- return;
- case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE:
- setRemoteInterface((JavaClass)null);
- return;
- case EjbPackage.ENTERPRISE_BEAN__EJB_JAR:
- setEjbJar((EJBJar)null);
- return;
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY:
- setSecurityIdentity((SecurityIdentity)null);
- return;
- case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE:
- setLocalHomeInterface((JavaClass)null);
- return;
- case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE:
- setLocalInterface((JavaClass)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.ENTERPRISE_BEAN__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_ROLE_REFS:
- return securityRoleRefs != null && !securityRoleRefs.isEmpty();
- case EjbPackage.ENTERPRISE_BEAN__EJB_CLASS:
- return ejbClass != null;
- case EjbPackage.ENTERPRISE_BEAN__HOME_INTERFACE:
- return homeInterface != null;
- case EjbPackage.ENTERPRISE_BEAN__REMOTE_INTERFACE:
- return remoteInterface != null;
- case EjbPackage.ENTERPRISE_BEAN__EJB_JAR:
- return getEjbJar() != null;
- case EjbPackage.ENTERPRISE_BEAN__SECURITY_IDENTITY:
- return securityIdentity != null;
- case EjbPackage.ENTERPRISE_BEAN__LOCAL_HOME_INTERFACE:
- return localHomeInterface != null;
- case EjbPackage.ENTERPRISE_BEAN__LOCAL_INTERFACE:
- return localInterface != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toStringGen() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
- /**
- * Preserve adapters when object is resolved.
- */
- protected void resolved(EObject originalObject, EObject resolvedObject) {
- if (originalObject != null && resolvedObject != null && originalObject != resolvedObject) {
- Collection col = originalObject.eAdapters();
- if (!col.isEmpty()) {
- Iterator it = col.iterator();
- Adapter a;
- while (it.hasNext()) {
- a = (Adapter) it.next();
- if (a == null) continue;
- resolvedObject.eAdapters().add(a);
- }
- }
- }
- }
- /**
- * @generated This field/method will be replaced during code generation
- */
- public JavaClass getEjbClassGen() {
- if (ejbClass != null && ejbClass.eIsProxy()) {
- InternalEObject oldEjbClass = (InternalEObject)ejbClass;
- ejbClass = (JavaClass)eResolveProxy(oldEjbClass);
- if (ejbClass != oldEjbClass) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldEjbClass, ejbClass));
- }
- }
- return ejbClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetEjbClass() {
- return ejbClass;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.ecore.EModelElement#getEAnnotation(java.lang.String)
- */
- public EAnnotation getEAnnotation(String source) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.ecore.EModelElement#getEAnnotations()
- */
- public EList getEAnnotations() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EntityImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EntityImpl.java
deleted file mode 100644
index 216cc2962..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/EntityImpl.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-
-/**
- * The entity element declares an entity bean. The declaration consists of: an optional description; optional display name; optional small icon file name; optional large icon file name; a unique name assigned to the enterprise bean in the deployment descriptor; the names of the entity bean's home and remote interfaces, if any; the names of the entity bean's local home and local interface, if any; the entity bean's implementation class; the entity bean's persistence management type; the entity bean's primary key class name; an indication of the entity bean's reentrancy; an optional specification of the entity bean's cmp-version; an optional specification of the entity bean's abstract schema name; an optional list of container-managed fields; an optional specification of the primary key field; an optional declaration of the bean's environment entries; an optional declaration of the bean's EJB references; an optional declaration of the bean's local EJB references; an optional declaration of the security role references; an optional declaration of the security identity to be used for the execution of the bean's methods; an optional declaration of the bean's resource manager connection factory references; an optional declaration of the bean's resource environment references; an optional set of query declarations for finder and select methods for an entity bean with cmp-version 2.x.
- * The optional abstract-schema-name element must be specified for an entity bean with container managed persistence and cmp-version 2.x. The optional primkey-field may be present in the descriptor if the entity's persistence-type is Container. The optional cmp-version element may be present in the descriptor if the entity's persistence-type is Container. If the persistence-type is Container and the cmp-version element is not specified, its value defaults to 2.x.
- * The optional home and remote elements must be specified if the entity bean cmp-version is 1.x.
- * The optional local-home and local elements must be specified if the entity bean has a local home and local interface.
- * The optional query elements must be present if the persistence-type is Container and the cmp-version is 2.x and query methods other than findByPrimaryKey have been defined for the entity bean.
- * The other elements that are optional are "optional" in the sense that they are omitted if the lists represented by them are empty. At least one cmp-field element must be present in the descriptor if
- * the entity's persistence-type is Container and the cmp-version is 1.x, and none must not be present if the entity's persistence-type is Bean.
- */
-public class EntityImpl extends EnterpriseBeanImpl implements Entity, EnterpriseBean {
-
- /**
- * The default value of the '{@link #isReentrant() <em>Reentrant</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isReentrant()
- * @generated
- * @ordered
- */
- protected static final boolean REENTRANT_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isReentrant() <em>Reentrant</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isReentrant()
- * @generated
- * @ordered
- */
- protected boolean reentrant = REENTRANT_EDEFAULT;
-
- /**
- * This is true if the Reentrant attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean reentrantESet = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected JavaClass primaryKey = null;
- public EntityImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.ENTITY;
- }
-
-public String getPrimaryKeyName() {
- getPrimaryKey();
- return primaryKey == null ? null : primaryKey.getQualifiedName();
-}
-/**
- * Return true if @aJavaClass as equal to the
- * home, remote, bean class, or key class.
- */
-public boolean hasJavaReference(JavaClass aJavaClass) {
- boolean result = super.hasJavaReference(aJavaClass);
- if (!result && aJavaClass != null)
- result = aJavaClass.equals(getPrimaryKey());
- return result;
-}
-//Return false by default
-public boolean isContainerManagedEntity() {
- return false;
-}
-public boolean isEntity() {
- return true;
-}
-protected boolean primGetIsReentrant() {
- return isReentrant();
-}
-protected JavaClass primGetPrimaryKey() {
- return getPrimaryKey();
-}
-
-public java.lang.Object primRefValue(EObject feature) {
- switch (eDerivedStructuralFeatureID(((EStructuralFeature)feature).getFeatureID(), ((EStructuralFeature)feature).getContainerClass())) {
- case EjbPackage.ENTITY__REENTRANT: return new Boolean(isReentrant());
- case EjbPackage.ENTITY__PRIMARY_KEY: return getPrimaryKey();
- }
- return super.primRefValue(feature);
-}
-public void setPrimaryKeyName(String primaryKeyName) {
- eSet(EjbPackage.eINSTANCE.getEntity_PrimaryKey(), createClassRef(primaryKeyName));
-}
- /**
- * @generated This field/method will be replaced during code generation
- * The reentrant element specifies whether an entity bean is reentrant or not.
-
- */
- public boolean isReentrant() {
- return reentrant;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setReentrant(boolean newReentrant) {
- boolean oldReentrant = reentrant;
- reentrant = newReentrant;
- boolean oldReentrantESet = reentrantESet;
- reentrantESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTITY__REENTRANT, oldReentrant, reentrant, !oldReentrantESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetReentrant() {
- boolean oldReentrant = reentrant;
- boolean oldReentrantESet = reentrantESet;
- reentrant = REENTRANT_EDEFAULT;
- reentrantESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.ENTITY__REENTRANT, oldReentrant, REENTRANT_EDEFAULT, oldReentrantESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetReentrant() {
- return reentrantESet;
- }
-
- /**
- * Handwritten version of getPrimaryKey():
- */
-
-
- public JavaClass getPrimaryKey() {
- if (primaryKey != null && primaryKey.eIsProxy()) {
- JavaClass oldPrimaryKey = primaryKey;
- JavaClass resolved = (JavaClass)EcoreUtil.resolve(primaryKey, this);
- resolved(this.primaryKey, resolved);
- this.primaryKey = resolved;
- if (primaryKey != oldPrimaryKey) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTERPRISE_BEAN__EJB_CLASS, oldPrimaryKey, primaryKey));
- }
- }
- return primaryKey;
- }
-
-
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setPrimaryKey(JavaClass newPrimaryKey) {
- JavaClass oldPrimaryKey = primaryKey;
- primaryKey = newPrimaryKey;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ENTITY__PRIMARY_KEY, oldPrimaryKey, primaryKey));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.ENTITY__REENTRANT:
- return isReentrant() ? Boolean.TRUE : Boolean.FALSE;
- case EjbPackage.ENTITY__PRIMARY_KEY:
- if (resolve) return getPrimaryKey();
- return basicGetPrimaryKey();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.ENTITY__REENTRANT:
- setReentrant(((Boolean)newValue).booleanValue());
- return;
- case EjbPackage.ENTITY__PRIMARY_KEY:
- setPrimaryKey((JavaClass)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.ENTITY__REENTRANT:
- unsetReentrant();
- return;
- case EjbPackage.ENTITY__PRIMARY_KEY:
- setPrimaryKey((JavaClass)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.ENTITY__REENTRANT:
- return isSetReentrant();
- case EjbPackage.ENTITY__PRIMARY_KEY:
- return primaryKey != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (reentrant: ");
- if (reentrantESet) result.append(reentrant); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The primkey-field element is used to specify the name of the primary key field
- * for an entity with container-managed persistence. The primkey-field must be
- * one of the fields declared in the cmp-field
- * element, and the type of the field must be the same as the primary key type.
- * The primkey-field element is not used if the primary key maps to multiple
- * container-managed fields (i.e. the key is a compound key). In this case, the
- * fields of the primary key class must be public, and their names must correspond
- * to the field names of the entity bean class that comprise the key.
- * Examples:<prim-key-class>java.lang.String<//prim-key-class>
- * <prim-key-class>com.wombat.empl.EmployeeID<//prim-key-class>
- * <prim-key-class>java.lang.Object<//prim-key-class>
-
- */
- public JavaClass getPrimaryKeyGen() {
- if (primaryKey != null && primaryKey.eIsProxy()) {
- InternalEObject oldPrimaryKey = (InternalEObject)primaryKey;
- primaryKey = (JavaClass)eResolveProxy(oldPrimaryKey);
- if (primaryKey != oldPrimaryKey) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ENTITY__PRIMARY_KEY, oldPrimaryKey, primaryKey));
- }
- }
- return primaryKey;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetPrimaryKey() {
- return primaryKey;
- }
-
-}
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ExcludeListImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ExcludeListImpl.java
deleted file mode 100644
index fa6047f3d..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ExcludeListImpl.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-
-/**
- * The exclude list element defines a set of methods which the Assembler marks to be uncallable. It contains one or more methods.
- *
- * If the method permission relation contains methods that are in the exclude list, the Deployer must consider those methods to be uncallable.
- * @generated
- */
-public class ExcludeListImpl extends J2EEEObjectImpl implements ExcludeList {
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList methodElements = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- public ExcludeListImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.EXCLUDE_LIST;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.EXCLUDE_LIST__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getMethodElements() {
- if (methodElements == null) {
- methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS);
- }
- return methodElements;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.EXCLUDE_LIST__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS:
- return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs);
- case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.EXCLUDE_LIST__DESCRIPTION:
- return getDescription();
- case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS:
- return getMethodElements();
- case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.EXCLUDE_LIST__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS:
- getMethodElements().clear();
- getMethodElements().addAll((Collection)newValue);
- return;
- case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.EXCLUDE_LIST__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS:
- getMethodElements().clear();
- return;
- case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.EXCLUDE_LIST__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.EXCLUDE_LIST__METHOD_ELEMENTS:
- return methodElements != null && !methodElements.isEmpty();
- case EjbPackage.EXCLUDE_LIST__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
- public List getMethodElements(EnterpriseBean anEJB) {
- if (anEJB == null)
- return Collections.EMPTY_LIST;
- List result = new ArrayList();
- List elements = getMethodElements();
- MethodElement me;
- for (int i = 0; i < elements.size(); i++) {
- me = (MethodElement) elements.get(i);
- if (anEJB.equals(me.getEnterpriseBean()))
- result.add(me);
- }
- return result;
- }
-}
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/KeyRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/KeyRelationshipRoleAttributeFilter.java
deleted file mode 100644
index 19436c1a6..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/KeyRelationshipRoleAttributeFilter.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-
-/**
- * This filter will return a subset of the keyAttributes (this includes inherited
- * key attributes) from the ContainerManagedEntityExtension that is passed as an
- * argument to the filter method.
- * It will remove any key attribute that is not pointed to by an EjbRelationshipRole.
- * Thus, the returned list will contain key attributes (including inherited key attributes) that only
- * belong to roles.
- * Creation date: (11/28/2000 7:23:22 PM)
- * @author: Administrator
- */
-public class KeyRelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter {
- private static KeyRelationshipRoleAttributeFilter singleton;
-/**
- * Return the proper list of attributes from cmpExt.
- */
-protected java.util.List getSourceRoles(ContainerManagedEntity cmp) {
- return cmp.getFilteredFeatures(KeyRelationshipRoleFilter.singleton());
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/28/2000 5:36:00 PM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleAttributeFilter
- */
-public static KeyRelationshipRoleAttributeFilter singleton() {
- if (singleton == null)
- singleton = new KeyRelationshipRoleAttributeFilter();
- return singleton;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/KeyRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/KeyRelationshipRoleFilter.java
deleted file mode 100644
index 01b7beada..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/KeyRelationshipRoleFilter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-
-/**
- * This filter will return a subset of the relationshipRoles (this includes
- * inherited EjbRelationshipRoles) from the ContainerManagedEntityExtension
- * that is passed as an argument to the filter method. It will remove any
- * EjbRelationshipRole that is not part of the key. Creation date: (11/28/2000
- * 7:14:57 PM) @author: Administrator
- */
-public class KeyRelationshipRoleFilter extends ContainerManagedEntityFilter {
-
- private static KeyRelationshipRoleFilter singleton;
-
- /**
- * filter method comment.
- */
- public java.util.List filter(ContainerManagedEntity cmp) {
- List keyRoles = new ArrayList();
- Iterator it = getRelationshipRoles(cmp).iterator();
- CommonRelationshipRole role;
- while (it.hasNext()) {
- role = (CommonRelationshipRole) it.next();
- if (role.isKey()) keyRoles.add(role);
- }
- return keyRoles;
- }
-
- /**
- * Insert the method's description here. Creation date: (11/28/2000 7:15:37
- * PM)
- *
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleFilter
- */
- public static KeyRelationshipRoleFilter singleton() {
- if (singleton == null) singleton = new KeyRelationshipRoleFilter();
- return singleton;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalKeyAttributeFilter.java
deleted file mode 100644
index 6d80bfc8b..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalKeyAttributeFilter.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import java.util.ArrayList;
-
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-/**
- * This filter will return a subset of the keyAttributes from the
- * ContainerManagedEntityExtension that is passed as an argument to the filter method.
- * It will remove any keyPersistentAttributes that are inherited by any supertypes.
- * That means the returned list of CMPAttributes will be key attributes that were defined locally
- * for the ContainerManagedEntity held by the ContainerManagedEntityExtension plus key attributes
- * that were added from EjbRelationshipRoles that are held by the ContainerManagedEntityExtension.
- * Creation date: (11/28/2000 6:24:33 PM)
- * @author: Administrator
- */
-public class LocalKeyAttributeFilter extends SupertypeCMPAttributeFilter {
- private static LocalKeyAttributeFilter singleton;
-/**
- * Return the proper list of attributes from cmpExt.
- */
-protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) {
- return new ArrayList(cmp.getKeyAttributes());
-}
-/**
- * Return a boolean indicating whether anAttribute also exists in the superEntity.
- * For this filter, only the name has to be the same.
- */
-protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) {
- CMPAttribute found = superEntity.getKeyAttribute(anAttribute.getName());
- return found != null;
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/28/2000 5:36:00 PM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalKeyAttributeFilter
- */
-public static LocalKeyAttributeFilter singleton() {
- if (singleton == null)
- singleton = new LocalKeyAttributeFilter();
- return singleton;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalModelledPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalModelledPersistentAttributeFilter.java
deleted file mode 100644
index 189535da1..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalModelledPersistentAttributeFilter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-/**
- * This filter will return a subset of the persistentAttributes from the
- * ContainerManagedEntityExtension that is passed as an argument to the filter
- * method. It will remove any inherited persistentAttributes and any
- * persistentAttributes that are held by EjbRelationshipRole objects (including
- * inherited EjbRelationshipRole attributes). That means the returned list of
- * CMPAttributes will be attributes that were defined locally minus all
- * inherited attributes and minus any attributes pointed to by
- * EjbRelationshipRoles, thus the attributes will only be attributes that were
- * defined locally by the user. Creation date: (11/28/2000 7:31:42 PM) @author:
- * Administrator
- */
-public class LocalModelledPersistentAttributeFilter extends SupertypeCMPAttributeFilter {
- private static LocalModelledPersistentAttributeFilter singleton;
- /**
- * Return the proper list of attributes from cmpExt. Return local
- * attributes minus those added due to Relationship Roles.
- */
- protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) {
- java.util.List local = null, localRoleAttributes;
- local = cmp.getFilteredFeatures(LocalPersistentAttributeFilter.singleton());
- localRoleAttributes = cmp.getFilteredFeatures(LocalRelationshipRoleAttributeFilter.singleton());
- if(local != null)
- local.removeAll(localRoleAttributes);
- return local;
- }
- /**
- * Return a boolean indicating whether anAttribute also exists in the
- * superEntity. For this filter, only the name has to be the same.
- */
- protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) {
- CMPAttribute found = superEntity.getPersistentAttribute(anAttribute.getName());
- return found != null;
- }
- /**
- * Insert the method's description here. Creation date: (11/28/2000 5:36:00
- * PM)
- *
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalModelledPersistentAttributeFilter
- */
- public static LocalModelledPersistentAttributeFilter singleton() {
- if (singleton == null)
- singleton = new LocalModelledPersistentAttributeFilter();
- return singleton;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalOppositeRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalOppositeRelationshipRoleFilter.java
deleted file mode 100644
index 034835798..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalOppositeRelationshipRoleFilter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-
-/**
- * This filter will return a subset of the relationshipRoles (this includes
- * inherited EjbRelationshipRoles) from the ContainerManagedEntityExtension
- * that is passed as an argument to the filter method. It will remove any
- * EjbRelationshipRole that is inherited and it will return the opposite role.
- * Creation date: (11/28/2000 7:14:57 PM) @author: Administrator
- */
-public class LocalOppositeRelationshipRoleFilter extends ContainerManagedEntityFilter {
-
- private static LocalOppositeRelationshipRoleFilter singleton;
-
- /**
- * Return a List with the opposite roles for the local relationship roles.
- */
- public List filter(ContainerManagedEntity cmp) {
- List oppositeRoles = new ArrayList();
- Iterator it = getLocalRelationshipRoles(cmp).iterator();
- CommonRelationshipRole role, opposite;
- while (it != null && it.hasNext()) {
- role = (CommonRelationshipRole) it.next();
- opposite = role.getOppositeAsCommonRole();
- if (opposite != null) oppositeRoles.add(opposite);
- }
- return oppositeRoles;
- }
-
- /**
- * Insert the method's description here. Creation date: (11/28/2000 7:15:37
- * PM)
- *
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalOppositeRelationshipRoleFilter
- */
- public static LocalOppositeRelationshipRoleFilter singleton() {
- if (singleton == null) singleton = new LocalOppositeRelationshipRoleFilter();
- return singleton;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalPersistentAttributeFilter.java
deleted file mode 100644
index b1c55bab2..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalPersistentAttributeFilter.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import java.util.ArrayList;
-
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-
-/**
- * This filter will return a subset of the persistentAttributes from the
- * ContainerManagedEntityExtension that is passed as an argument to the filter method.
- * It will remove any persistentAttributes that are inherited by any supertypes.
- * That means the returned list of CMPAttributes will be attributes that were defined locally
- * for the ContainerManagedEntity held by the ContainerManagedEntityExtension plus attributes
- * that were added from EjbRelationshipRoles that are held by the ContainerManagedEntityExtension.
- * Creation date: (11/28/2000 5:35:03 PM)
- * @author: Administrator
- */
-public class LocalPersistentAttributeFilter extends SupertypeCMPAttributeFilter {
- private static LocalPersistentAttributeFilter singleton;
-/**
- * Return the proper list of attributes from cmpExt.
- */
-protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) {
- return new ArrayList(cmp.getPersistentAttributes());
-}
-/**
- * Return a boolean indicating whether anAttribute also exists in the superEntity.
- * For this filter, only the name has to be the same.
- */
-protected boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) {
- CMPAttribute found = superEntity.getPersistentAttribute(anAttribute.getName());
- return found != null;
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/28/2000 5:36:00 PM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalPersistentAttributeFilter
- */
-public static LocalPersistentAttributeFilter singleton() {
- if (singleton == null)
- singleton = new LocalPersistentAttributeFilter();
- return singleton;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalRelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalRelationshipRoleAttributeFilter.java
deleted file mode 100644
index 79ee21431..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalRelationshipRoleAttributeFilter.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-/**
- * This filter will return a subset of the persistentAttributes from the
- * ContainerManagedEntityExtension that is passed as an argument to the filter method.
- * It will remove any attribute that is not pointed to by an EjbRelationshipRole and
- * it will further remove attributes pointed to by inherited EjbRelationshipRoles.
- * Thus, the returned list will contain attributes that only belong to local
- * EjbRelationshipRoles (not including iherited roles).
- * Creation date: (11/28/2000 6:46:08 PM)
- * @author: Administrator
- */
-public class LocalRelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter {
- private static LocalRelationshipRoleAttributeFilter singleton;
-/**
- * Return the proper list of roles from cmpExt.
- */
-protected java.util.List getSourceRoles(ContainerManagedEntity cmp) {
- return getRelationshipRoles(cmp);
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/28/2000 5:36:00 PM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.LocalRelationshipRoleAttributeFilter
- */
-public static LocalRelationshipRoleAttributeFilter singleton() {
- if (singleton == null)
- singleton = new LocalRelationshipRoleAttributeFilter();
- return singleton;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalRelationshipRoleKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalRelationshipRoleKeyAttributeFilter.java
deleted file mode 100644
index b9a5b7d94..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/LocalRelationshipRoleKeyAttributeFilter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-
-/**
- * @author jlanuti
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class LocalRelationshipRoleKeyAttributeFilter extends LocalRelationshipRoleAttributeFilter {
-
- private static LocalRelationshipRoleKeyAttributeFilter singleton;
-
-public static LocalRelationshipRoleAttributeFilter singleton() {
- if (singleton == null)
- singleton = new LocalRelationshipRoleKeyAttributeFilter();
- return singleton;
-}
-
-/**
- * filter method comment.
- */
-public List filter(ContainerManagedEntity cmp) {
- List attributes = new ArrayList();
- Iterator it = getSourceRoles(cmp).iterator();
- CommonRelationshipRole role;
- while (it.hasNext()) {
- role = (CommonRelationshipRole) it.next();
- if (role.isKey())
- attributes.addAll(role.getAttributes());
- }
- return attributes;
-}
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MessageDrivenDestinationImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MessageDrivenDestinationImpl.java
deleted file mode 100644
index 6a9679909..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MessageDrivenDestinationImpl.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.DestinationType;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination;
-import org.eclipse.jst.j2ee.ejb.SubscriptionDurabilityKind;
-
-/**
- * The message-driven-destination element provides advice to the Deployer as to whether a message-driven bean is intended for a Queue or a Topic. The declaration consists of: the type of the message-driven bean's intended destination and an optional declaration of whether a durable or non-durable subscription should be used if the destination-type is javax.jms.Topic.
- * @generated
- */
-public class MessageDrivenDestinationImpl extends J2EEEObjectImpl implements MessageDrivenDestination {
-
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final DestinationType TYPE_EDEFAULT = DestinationType.QUEUE_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected DestinationType type = TYPE_EDEFAULT;
- /**
- * This is true if the Type attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean typeESet = false;
-
- /**
- * The default value of the '{@link #getSubscriptionDurability() <em>Subscription Durability</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSubscriptionDurability()
- * @generated
- * @ordered
- */
- protected static final SubscriptionDurabilityKind SUBSCRIPTION_DURABILITY_EDEFAULT = SubscriptionDurabilityKind.DURABLE_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected SubscriptionDurabilityKind subscriptionDurability = SUBSCRIPTION_DURABILITY_EDEFAULT;
- /**
- * This is true if the Subscription Durability attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean subscriptionDurabilityESet = false;
-
- public MessageDrivenDestinationImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.MESSAGE_DRIVEN_DESTINATION;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The destination-type element specifies the type of the JMS destination. The type is specified by the Java interface expected to be implemented by the destination.
- *
- * The destination-type element must be one of the two following: javax.jms.Queue, javax.jms.Topic
- */
- public DestinationType getType() {
- return type;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setType(DestinationType newType) {
- DestinationType oldType = type;
- type = newType == null ? TYPE_EDEFAULT : newType;
- boolean oldTypeESet = typeESet;
- typeESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE, oldType, type, !oldTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetType() {
- DestinationType oldType = type;
- boolean oldTypeESet = typeESet;
- type = TYPE_EDEFAULT;
- typeESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetType() {
- return typeESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The subscription-durability element specifies whether a JMS topic subscription is intended to be durable or nondurable.
- *
- * The subscription-durability element must be one of the two following: Durable, NonDurable
-
- */
- public SubscriptionDurabilityKind getSubscriptionDurability() {
- return subscriptionDurability;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public void setSubscriptionDurability(SubscriptionDurabilityKind newSubscriptionDurability) {
- SubscriptionDurabilityKind oldSubscriptionDurability = subscriptionDurability;
- subscriptionDurability = newSubscriptionDurability == null ? null : newSubscriptionDurability;
- boolean oldSubscriptionDurabilityESet = subscriptionDurabilityESet;
- subscriptionDurabilityESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY, oldSubscriptionDurability, subscriptionDurability, !oldSubscriptionDurabilityESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetSubscriptionDurability() {
- SubscriptionDurabilityKind oldSubscriptionDurability = subscriptionDurability;
- boolean oldSubscriptionDurabilityESet = subscriptionDurabilityESet;
- subscriptionDurability = SUBSCRIPTION_DURABILITY_EDEFAULT;
- subscriptionDurabilityESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY, oldSubscriptionDurability, SUBSCRIPTION_DURABILITY_EDEFAULT, oldSubscriptionDurabilityESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetSubscriptionDurability() {
- return subscriptionDurabilityESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public MessageDriven getBean() {
- if (eContainerFeatureID != EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN) return null;
- return (MessageDriven)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetBean(MessageDriven newBean, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newBean, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setBean(MessageDriven newBean) {
- if (newBean != eInternalContainer() || (eContainerFeatureID != EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN && newBean != null)) {
- if (EcoreUtil.isAncestor(this, newBean))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newBean != null)
- msgs = ((InternalEObject)newBean).eInverseAdd(this, EjbPackage.MESSAGE_DRIVEN__DESTINATION, MessageDriven.class, msgs);
- msgs = basicSetBean(newBean, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, newBean, newBean));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetBean((MessageDriven)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN:
- return basicSetBean(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN:
- return eInternalContainer().eInverseRemove(this, EjbPackage.MESSAGE_DRIVEN__DESTINATION, MessageDriven.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE:
- return getType();
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY:
- return getSubscriptionDurability();
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN:
- return getBean();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE:
- setType((DestinationType)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY:
- setSubscriptionDurability((SubscriptionDurabilityKind)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN:
- setBean((MessageDriven)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE:
- unsetType();
- return;
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY:
- unsetSubscriptionDurability();
- return;
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN:
- setBean((MessageDriven)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__TYPE:
- return isSetType();
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__SUBSCRIPTION_DURABILITY:
- return isSetSubscriptionDurability();
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN:
- return getBean() != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (type: ");
- if (typeESet) result.append(type); else result.append("<unset>");
- result.append(", subscriptionDurability: ");
- if (subscriptionDurabilityESet) result.append(subscriptionDurability); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MessageDrivenImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MessageDrivenImpl.java
deleted file mode 100644
index 4af0f2369..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MessageDrivenImpl.java
+++ /dev/null
@@ -1,679 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.AcknowledgeMode;
-import org.eclipse.jst.j2ee.ejb.ActivationConfig;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination;
-import org.eclipse.jst.j2ee.ejb.TransactionType;
-
-/**
- * @generated
- */
-public class MessageDrivenImpl extends EnterpriseBeanImpl implements MessageDriven {
-
- /**
- * The default value of the '{@link #getTransactionType() <em>Transaction Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTransactionType()
- * @generated
- * @ordered
- */
- protected static final TransactionType TRANSACTION_TYPE_EDEFAULT = TransactionType.BEAN_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected TransactionType transactionType = TRANSACTION_TYPE_EDEFAULT;
- /**
- * This is true if the Transaction Type attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean transactionTypeESet = false;
-
- /**
- * The default value of the '{@link #getMessageSelector() <em>Message Selector</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMessageSelector()
- * @generated
- * @ordered
- */
- protected static final String MESSAGE_SELECTOR_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String messageSelector = MESSAGE_SELECTOR_EDEFAULT;
- /**
- * The default value of the '{@link #getAcknowledgeMode() <em>Acknowledge Mode</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAcknowledgeMode()
- * @generated
- * @ordered
- */
- protected static final AcknowledgeMode ACKNOWLEDGE_MODE_EDEFAULT = AcknowledgeMode.AUTO_ACKNOWLEDGE_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected AcknowledgeMode acknowledgeMode = ACKNOWLEDGE_MODE_EDEFAULT;
- /**
- * This is true if the Acknowledge Mode attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean acknowledgeModeESet = false;
-
- /**
- * The default value of the '{@link #getLink() <em>Link</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLink()
- * @generated
- * @ordered
- */
- protected static final String LINK_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getLink() <em>Link</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getLink()
- * @generated
- * @ordered
- */
- protected String link = LINK_EDEFAULT;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected MessageDrivenDestination destination = null;
- /**
- * The cached value of the '{@link #getActivationConfig() <em>Activation Config</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getActivationConfig()
- * @generated
- * @ordered
- */
- protected ActivationConfig activationConfig = null;
-
- /**
- * The cached value of the '{@link #getMessageDestination() <em>Message Destination</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMessageDestination()
- * @generated
- * @ordered
- */
- protected JavaClass messageDestination = null;
-
- /**
- * The cached value of the '{@link #getMessagingType() <em>Messaging Type</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMessagingType()
- * @generated
- * @ordered
- */
- protected JavaClass messagingType = null;
-
- public MessageDrivenImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.MESSAGE_DRIVEN;
- }
-
-public boolean isMessageDriven() {
- return true;
-}
- /**
- * @generated This field/method will be replaced during code generation
- * The transaction-type element specifies an enterprise bean's transaction management type.
- *
- * The transaction-type element must be one of the two following: Bean, Container
- */
- public TransactionType getTransactionType() {
- return transactionType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTransactionType(TransactionType newTransactionType) {
- TransactionType oldTransactionType = transactionType;
- transactionType = newTransactionType == null ? TRANSACTION_TYPE_EDEFAULT : newTransactionType;
- boolean oldTransactionTypeESet = transactionTypeESet;
- transactionTypeESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE, oldTransactionType, transactionType, !oldTransactionTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetTransactionType() {
- TransactionType oldTransactionType = transactionType;
- boolean oldTransactionTypeESet = transactionTypeESet;
- transactionType = TRANSACTION_TYPE_EDEFAULT;
- transactionTypeESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE, oldTransactionType, TRANSACTION_TYPE_EDEFAULT, oldTransactionTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetTransactionType() {
- return transactionTypeESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The message-selector element is used to specify the JMS message
- * selector to be used in determining which messages a message-driven
- * bean is to receive.
- *
- * Example value:
- * JMSType = `car' AND color = `blue' AND weight > 2500
-
- */
- public String getMessageSelector() {
- return messageSelector;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setMessageSelector(String newMessageSelector) {
- String oldMessageSelector = messageSelector;
- messageSelector = newMessageSelector;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR, oldMessageSelector, messageSelector));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * an optional declaration of the acknowledgment mode for the message-driven bean if bean-managed transaction demarcation is used (ie. self.transactionType = Bean)
- *
- * The acknowledge-mode specifies whether JMS AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE message acknowledgment semantics should be used for the onMessage message of a message-driven bean that uses bean managed transaction demarcation.
- *
- * The acknowledge-mode must be one of the two following: Auto-acknowledge, Dups-ok-acknowledge
-
- */
- public AcknowledgeMode getAcknowledgeMode() {
- return acknowledgeMode;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAcknowledgeMode(AcknowledgeMode newAcknowledgeMode) {
- AcknowledgeMode oldAcknowledgeMode = acknowledgeMode;
- acknowledgeMode = newAcknowledgeMode == null ? ACKNOWLEDGE_MODE_EDEFAULT : newAcknowledgeMode;
- boolean oldAcknowledgeModeESet = acknowledgeModeESet;
- acknowledgeModeESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE, oldAcknowledgeMode, acknowledgeMode, !oldAcknowledgeModeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetAcknowledgeMode() {
- AcknowledgeMode oldAcknowledgeMode = acknowledgeMode;
- boolean oldAcknowledgeModeESet = acknowledgeModeESet;
- acknowledgeMode = ACKNOWLEDGE_MODE_EDEFAULT;
- acknowledgeModeESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE, oldAcknowledgeMode, ACKNOWLEDGE_MODE_EDEFAULT, oldAcknowledgeModeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetAcknowledgeMode() {
- return acknowledgeModeESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * An optional declaration of the intended destination type of the message-driven bean
- */
- public MessageDrivenDestination getDestination() {
- return destination;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetDestination(MessageDrivenDestination newDestination, NotificationChain msgs) {
- MessageDrivenDestination oldDestination = destination;
- destination = newDestination;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__DESTINATION, oldDestination, newDestination);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDestination(MessageDrivenDestination newDestination) {
- if (newDestination != destination) {
- NotificationChain msgs = null;
- if (destination != null)
- msgs = ((InternalEObject)destination).eInverseRemove(this, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, MessageDrivenDestination.class, msgs);
- if (newDestination != null)
- msgs = ((InternalEObject)newDestination).eInverseAdd(this, EjbPackage.MESSAGE_DRIVEN_DESTINATION__BEAN, MessageDrivenDestination.class, msgs);
- msgs = basicSetDestination(newDestination, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__DESTINATION, newDestination, newDestination));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ActivationConfig getActivationConfig() {
- return activationConfig;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetActivationConfig(ActivationConfig newActivationConfig, NotificationChain msgs) {
- ActivationConfig oldActivationConfig = activationConfig;
- activationConfig = newActivationConfig;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, oldActivationConfig, newActivationConfig);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setActivationConfig(ActivationConfig newActivationConfig) {
- if (newActivationConfig != activationConfig) {
- NotificationChain msgs = null;
- if (activationConfig != null)
- msgs = ((InternalEObject)activationConfig).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, null, msgs);
- if (newActivationConfig != null)
- msgs = ((InternalEObject)newActivationConfig).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, null, msgs);
- msgs = basicSetActivationConfig(newActivationConfig, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG, newActivationConfig, newActivationConfig));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass getMessageDestination() {
- if (messageDestination != null && messageDestination.eIsProxy()) {
- InternalEObject oldMessageDestination = (InternalEObject)messageDestination;
- messageDestination = (JavaClass)eResolveProxy(oldMessageDestination);
- if (messageDestination != oldMessageDestination) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION, oldMessageDestination, messageDestination));
- }
- }
- return messageDestination;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetMessageDestination() {
- return messageDestination;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setMessageDestination(JavaClass newMessageDestination) {
- JavaClass oldMessageDestination = messageDestination;
- messageDestination = newMessageDestination;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION, oldMessageDestination, messageDestination));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getLink() {
- return link;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setLink(String newLink) {
- String oldLink = link;
- link = newLink;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__LINK, oldLink, link));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass getMessagingType() {
- if (messagingType != null && messagingType.eIsProxy()) {
- InternalEObject oldMessagingType = (InternalEObject)messagingType;
- messagingType = (JavaClass)eResolveProxy(oldMessagingType);
- if (messagingType != oldMessagingType) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE, oldMessagingType, messagingType));
- }
- }
- return messagingType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetMessagingType() {
- return messagingType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setMessagingType(JavaClass newMessagingType) {
- JavaClass oldMessagingType = messagingType;
- messagingType = newMessagingType;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE, oldMessagingType, messagingType));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN__DESTINATION:
- if (destination != null)
- msgs = ((InternalEObject)destination).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.MESSAGE_DRIVEN__DESTINATION, null, msgs);
- return basicSetDestination((MessageDrivenDestination)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN__DESTINATION:
- return basicSetDestination(null, msgs);
- case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG:
- return basicSetActivationConfig(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE:
- return getTransactionType();
- case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR:
- return getMessageSelector();
- case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE:
- return getAcknowledgeMode();
- case EjbPackage.MESSAGE_DRIVEN__LINK:
- return getLink();
- case EjbPackage.MESSAGE_DRIVEN__DESTINATION:
- return getDestination();
- case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG:
- return getActivationConfig();
- case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION:
- if (resolve) return getMessageDestination();
- return basicGetMessageDestination();
- case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE:
- if (resolve) return getMessagingType();
- return basicGetMessagingType();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE:
- setTransactionType((TransactionType)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR:
- setMessageSelector((String)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE:
- setAcknowledgeMode((AcknowledgeMode)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN__LINK:
- setLink((String)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN__DESTINATION:
- setDestination((MessageDrivenDestination)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG:
- setActivationConfig((ActivationConfig)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION:
- setMessageDestination((JavaClass)newValue);
- return;
- case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE:
- setMessagingType((JavaClass)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE:
- unsetTransactionType();
- return;
- case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR:
- setMessageSelector(MESSAGE_SELECTOR_EDEFAULT);
- return;
- case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE:
- unsetAcknowledgeMode();
- return;
- case EjbPackage.MESSAGE_DRIVEN__LINK:
- setLink(LINK_EDEFAULT);
- return;
- case EjbPackage.MESSAGE_DRIVEN__DESTINATION:
- setDestination((MessageDrivenDestination)null);
- return;
- case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG:
- setActivationConfig((ActivationConfig)null);
- return;
- case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION:
- setMessageDestination((JavaClass)null);
- return;
- case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE:
- setMessagingType((JavaClass)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.MESSAGE_DRIVEN__TRANSACTION_TYPE:
- return isSetTransactionType();
- case EjbPackage.MESSAGE_DRIVEN__MESSAGE_SELECTOR:
- return MESSAGE_SELECTOR_EDEFAULT == null ? messageSelector != null : !MESSAGE_SELECTOR_EDEFAULT.equals(messageSelector);
- case EjbPackage.MESSAGE_DRIVEN__ACKNOWLEDGE_MODE:
- return isSetAcknowledgeMode();
- case EjbPackage.MESSAGE_DRIVEN__LINK:
- return LINK_EDEFAULT == null ? link != null : !LINK_EDEFAULT.equals(link);
- case EjbPackage.MESSAGE_DRIVEN__DESTINATION:
- return destination != null;
- case EjbPackage.MESSAGE_DRIVEN__ACTIVATION_CONFIG:
- return activationConfig != null;
- case EjbPackage.MESSAGE_DRIVEN__MESSAGE_DESTINATION:
- return messageDestination != null;
- case EjbPackage.MESSAGE_DRIVEN__MESSAGING_TYPE:
- return messagingType != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (transactionType: ");
- if (transactionTypeESet) result.append(transactionType); else result.append("<unset>");
- result.append(", messageSelector: ");
- result.append(messageSelector);
- result.append(", acknowledgeMode: ");
- if (acknowledgeModeESet) result.append(acknowledgeMode); else result.append("<unset>");
- result.append(", link: ");
- result.append(link);
- result.append(')');
- return result.toString();
- }
-
- /*
- * @see EnterpriseBean#getAvailableLocalHomeMethodElements()
- */
- public List getAvailableLocalHomeMethodElements() {
- return Collections.EMPTY_LIST;
- }
-
- /*
- * @see EnterpriseBean#getAvailableLocalMethodElements()
- */
- public List getAvailableLocalMethodElements() {
- return Collections.EMPTY_LIST;
- }
-
- /*
- * @see EnterpriseBean#getAvailableRemoteMethodElements()
- */
- public List getAvailableRemoteMethodElements() {
- return Collections.EMPTY_LIST;
- }
-
- /*
- * @see EnterpriseBeanImpl#getAvailableUnspecifiedMethodElementSignatures()
- */
- public List getAvailableUnspecifiedMethodElementSignatures() {
- //There is only the onMessage method
- List sigs = new ArrayList(1);
- sigs.add("onMessage(javax.jms.Message)"); //$NON-NLS-1$
- return sigs;
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodElementImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodElementImpl.java
deleted file mode 100644
index f89b2b6b8..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodElementImpl.java
+++ /dev/null
@@ -1,1041 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaHelpers;
-import org.eclipse.jem.java.JavaParameter;
-import org.eclipse.jem.java.Method;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodElementKind;
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.ejb.internal.util.MethodElementHelper;
-
-import com.ibm.icu.util.StringTokenizer;
-
-
-/**
- * The method element is used to denote a method of an enterprise bean's
- * home or remote interface, or a set of methods. The ejb-name element
- * must be the name of one of the enterprise beans in declared in the
- * deployment descriptor; the optional method-intf element allows to
- * distinguish between a method with the same signature that is defined in
- * both the home and remote interface; the method-name element specifies
- * the method name; and the optional method-params elements identify a
- * single method among multiple methods with an overloaded method name.
- *
- * There are three possible styles of the method element syntax:
- *
- * 1. <method>
- * <ejb-name>EJBNAME<//ejb-name>
- * <method-name>*<//method-name>
- * <//method>
- *
- * This style is used to refer to all the methods of the specified
- * enterprise bean's home and remote interfaces.
- *
- * 2. <method>
- * <ejb-name>EJBNAME<//ejb-name>
- * <method-name>METHOD<//method-name>
- * <//method>>
- *
- * This style is used to refer to the specified method of the
- * specified enterprise bean. If there are multiple methods with
- * the same overloaded name, the element of this style refers to
- * all the methods with the overloaded name.
- *
- *
- *
- *
- *
- * 3. <method>
- * <ejb-name>EJBNAME<//ejb-name>
- * <method-name>METHOD<//method-name>
- * <method-params>
- * <method-param>PARAM-1<//method-param>
- * <method-param>PARAM-2<//method-param>
- * ...
- * <method-param>PARAM-n<//method-param>
- * <//method-params>
- * <method>
- *
- * This style is used to refer to a single method within a set of
- * methods with an overloaded name. PARAM-1 through PARAM-n are the
- * fully-qualified Java types of the method's input parameters (if
- * the method has no input arguments, the method-params element
- * contains no method-param elements). Arrays are specified by the
- * array element's type, followed by one or more pair of square
- * brackets (e.g. int[][]).
- *
- *
- * Used in: method-permission and container-transaction
- *
- * Examples:
- *
- * Style 1: The following method element refers to all the methods of
- * the EmployeeService bean's home and remote interfaces:
- *
- * <method>
- * <ejb-name>EmployeeService<//ejb-name>
- * <method-name>*<//method-name>
- * <//method>
- *
- * Style 2: The following method element refers to all the create
- * methods of the EmployeeService bean's home interface:
- *
- * <method>
- * <ejb-name>EmployeeService<//ejb-name>
- * <method-name>create<//method-name>
- * <//method>
- *
- * Style 3: The following method element refers to the
- * create(String firstName, String LastName) method of the
- * EmployeeService bean's home interface.
- *
- * <method>
- * <ejb-name>EmployeeService<//ejb-name>
- * <method-name>create<//method-name>
- * <method-params>
- * <method-param>java.lang.String<//method-param>
- * <method-param>java.lang.String<//method-param>
- * <//method-params>
- * <//method>
- *
- *
- * The following example illustrates a Style 3 element with
- * more complex parameter types. The method
- * foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
- * mypackage.MyClass[][] myclaar)
- * would be specified as:
- *
- * <method>
- * <ejb-name>EmployeeService<//ejb-name>
- * <method-name>foobar<//method-name>
- * <method-params>
- * <method-param>char<//method-param>
- * <method-param>int<//method-param>
- * <method-param>int[]<//method-param>
- * <method-param>mypackage.MyClass<//method-param>
- * <method-param>mypackage.MyClass[][]<//method-param>
- * <//method-params>
- * <//method>
- *
- * The optional method-intf element can be used when it becomes
- * necessary to differentiate between a method defined in the home
- * interface and a method with the same name and signature that is
- * defined in the remote interface.
- *
- * For example, the method element
- *
- * <method>
- * <ejb-name>EmployeeService<//ejb-name>
- * <method-intf>Remote<//method-intf>
- * <method-name>create<//method-name>
- * <method-params>
- * <method-param>java.lang.String<//method-param>
- * <method-param>java.lang.String<//method-param>
- * <//method-params>
- * <//method>
- *
- * can be used to differentiate the create(String, String) method
- * defined in the remote interface from the create(String, String)
- * method defined in the home interface, which would be defined as
- *
- * <method>
- * <ejb-name>EmployeeService<//ejb-name>
- * <method-intf>Home<//method-intf>
- * <method-name>create<//method-name>
- * <method-params>
- * <method-param>java.lang.String<//method-param>
- * <method-param>java.lang.String<//method-param>
- * <//method-params>
- * <//method>
- * @generated
- */
-public class MethodElementImpl extends J2EEEObjectImpl implements MethodElement {
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String name = NAME_EDEFAULT;
- /**
- * The default value of the '{@link #getParms() <em>Parms</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getParms()
- * @generated
- * @ordered
- */
- protected static final String PARMS_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String parms = PARMS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getType() <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getType()
- * @generated
- * @ordered
- */
- protected static final MethodElementKind TYPE_EDEFAULT = MethodElementKind.UNSPECIFIED_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected MethodElementKind type = TYPE_EDEFAULT;
- /**
- * This is true if the Type attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean typeESet = false;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EnterpriseBean enterpriseBean = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- public MethodElementImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.METHOD_ELEMENT;
- }
-
-public void addMethodParams(String param) {
- String oldParms = getParms();
- if (oldParms == null) {
- setParms(param);
- } else {
- setParms(oldParms.concat(" ").concat(param)); //$NON-NLS-1$
- }
-}
-/**
- * Set the params for this method element to an empty array, as opposed
- * to null.
- */
-public void applyZeroParams() {
- setParms(""); //$NON-NLS-1$
-}
-public boolean equalSignature(MethodElement anotherMethodElement) {
- boolean equal = getName().equals(anotherMethodElement.getName());
- if (equal) {
- equal = parmsEqual(anotherMethodElement);
- if (equal) {
- if (getType() == null)
- equal = anotherMethodElement.getType() == null;
- else
- equal = getType().equals(anotherMethodElement.getType());
- }
- }
- return equal;
-}
-public java.util.List getMethodParams() {
- StringTokenizer tok = getMethodParamsTokenizer();
- java.util.List v = new ArrayList();
- java.util.List paramsList = new ArrayList();
- String current = null;
- if (tok != null) {
- while (current != null || tok.hasMoreTokens()) {
- String peek = null;
- if (current == null)
- current = tok.nextToken();
- if (tok.hasMoreTokens()) {
- peek = tok.nextToken();
- if (peek.startsWith("[")) { //$NON-NLS-1$
- current += peek;
- peek = null;
- }
- }
- v.add(current);
- if (peek != null)
- current = peek;
- else
- current = null;
- }
-
- }
-
- /*
- * This is a hack to make sure that for old XMI generated files, that ven if there was ',' separated
- * params, it parses them back out right. To support 4.0.X AAT generated XMI files with runAs roles
- * for methods.
- */
- for (int i = 0; i < v.size(); i++)
- {
- tok = new StringTokenizer((String)v.get(i),","); //$NON-NLS-1$
- if (tok != null)
- {
- while (tok.hasMoreTokens())
- {
- paramsList.add(tok.nextToken());
- }
- }
- }
- return paramsList;
-}
-private StringTokenizer getMethodParamsTokenizer() {
- //This method is a hack for now; the cardinality is wrong for the params
- String aParms = getParms();
- if (aParms == null || aParms.length() == 0) {
- return null;
- }
- return new StringTokenizer(getParms());
-}
-/**
- * Answer a list of all the methods for which this method element applies. The following rules are used:
- *
- * 1) If the method element type is unspecified, the methods are obtained from the remote interface of the ejb;
- * If it is specified, then the appropriate interface is used
- *
- * 2) If the method name = "*", then all the PUBLIC methods for that interface are returned
- *
- * 3) If the method name is specified, and no method params are specified, then all public methods for the interface
- * having the same name are returned.
- *
- * 4) If the method name and params are specified, then a zero or one element array is returned, containing the one and only method
- * on the interface with the appropriate signature, if it exists
- */
-public Method[] getMethods() {
- EnterpriseBean ejb = getEnterpriseBean();
- if(ejb == null)
- return new Method[0];
- List result = null;
- switch (getType().getValue()) {
- case MethodElementKind.HOME :
- {
- result = getMethods(ejb.getHomeInterface());
- break;
- }
- case MethodElementKind.REMOTE :
- {
- result = getMethods(ejb.getRemoteInterface());
- break;
- }
- case MethodElementKind.LOCAL_HOME :
- {
- result = getMethods(ejb.getLocalHomeInterface());
- break;
- }
- case MethodElementKind.LOCAL :
- {
- result = getMethods(ejb.getLocalInterface());
- break;
- }
- case MethodElementKind.SERVICE_ENDPOINT :
- {
- if(ejb.isSession()) {
- result = getMethods(((Session)ejb).getServiceEndpoint());
- break;
- }
- }
- case MethodElementKind.UNSPECIFIED :
- {
- if (ejb.isMessageDriven())
- result = getMethods(ejb.getEjbClass());
- else {
- result = new ArrayList();
- result.addAll(getMethods(ejb.getHomeInterface()));
- result.addAll(getMethods(ejb.getRemoteInterface()));
- result.addAll(getMethods(ejb.getLocalHomeInterface()));
- result.addAll(getMethods(ejb.getLocalInterface()));
- }
- break;
- }
- }
- return (Method[]) result.toArray(new Method[result.size()]);
-}
-/**
- * Answer a list of all the methods for which this method element applies. The following rules are used:
- *
- * 1) If the method element type is unspecified, the methods are obtained from the remote interface of the ejb;
- * If it is specified, then the appropriate interface is used
- *
- * 2) If the method name = "*", then all the PUBLIC methods for that interface are returned
- *
- * 3) If the method name is specified, and no method params are specified, then all public methods for the interface
- * having the same name are returned.
- *
- * 4) If the method name and params are specified, then a zero or one element array is returned, containing the one and only method
- * on the interface with the appropriate signature, if it exists
- */
-private List getMethods(JavaClass javaClass) {
- if (javaClass == null) return Collections.EMPTY_LIST;
- List result = null;
- String methodName = getName().trim();
- if (name.equals("*")) //$NON-NLS-1$
- result = javaClass.getPublicMethodsExtended();
- else if (hasMethodParams()) {
- result = new ArrayList();
- Method method = javaClass.getPublicMethodExtended(name, getMethodParams());
- if (method != null)
- result.add(method);
- } else
- result = javaClass.getPublicMethodsExtendedNamed(methodName);
-
- return result;
-}
-/**
- * Return the MethodElement that is most specific.
- */
-public MethodElement getMostSpecific(MethodElement aMethodElement, JavaClass aClass) {
- if (aMethodElement == null) return this;
- if (aMethodElement.isDefault() && !isDefault())
- return this;
- if (!aMethodElement.isDefault() && isDefault())
- return aMethodElement;
- if (aMethodElement.hasMethodParams() && !hasMethodParams())
- return aMethodElement;
- if (!aMethodElement.hasMethodParams() && hasMethodParams())
- return this;
- if (isUnspecified() && !aMethodElement.isUnspecified())
- return aMethodElement;
- return this;
-}
-public static MethodElement getMostSpecificMethodElement(List methodElements, Method aMethod) {
- MethodElement specificME = null;
- if (aMethod != null) {
- Iterator it = methodElements.iterator();
- MethodElement me;
- while (it.hasNext()) {
- me = (MethodElement) it.next();
- if (me.represents(aMethod)) {
- if (me.uniquelyIdentifies(aMethod))
- return me;
- else if (specificME == null)
- specificME = me;
- else
- specificME = specificME.getMostSpecific(me, aMethod.getJavaClass());
- }
- }
- }
- return specificME;
-}
-protected String getParmsString() {
- String parmString = getParms();
- if (parmString == null)
- parmString = ""; //$NON-NLS-1$
- return parmString;
-}
-/**
- * Return a String array for the possible MethodElement type names.
- */
-public static String[] getPossibleTypeNames() {
- EjbPackage pack = EjbFactoryImpl.getPackage();
- List literals = pack.getMethodElementKind().getELiterals();
- String[] names = new String[literals.size()];
- for (int i = 0; i < literals.size(); i++)
- names[i] = literals.get(i).toString();
- return names;
-}
-/**
- * Return the signature.
- * For example: setTwoParamMethod(java.lang.String, java.lang.String)
- */
-public String getSignature() {
- if (isDefault())
- return getName();
- StringBuffer buf = new StringBuffer();
- buf.append(getName());
- if (hasMethodParams()){
- buf.append(RIGHT_PAREN);
- StringTokenizer tok = getMethodParamsTokenizer();
- if (tok != null) {
- while (tok.hasMoreTokens()) {
- buf.append(tok.nextToken());
- if (tok.hasMoreTokens())
- buf.append(COMMA);
- }
- }
- buf.append(LEFT_PAREN);
- }
- return buf.toString();
-}
-// Returns null if the EEnum is UNSPECIFIED
-// unless it is a MessageDriven bean.
-public JavaClass getTypeJavaClass() {
- if (isHome())
- return getEnterpriseBean().getHomeInterface();
- else if (isRemote())
- return getEnterpriseBean().getRemoteInterface();
- else if (isLocalHome())
- return getEnterpriseBean().getLocalHomeInterface();
- else if (isLocal())
- return getEnterpriseBean().getLocalInterface();
- else if (isUnspecified() && getEnterpriseBean().isMessageDriven())
- return getEnterpriseBean().getEjbClass();
- else
- return null;
-}
- /**
- * Answer whether method params apply to this method, e.g., it is specific to one
- * overloaded method, even if the method is a zero parameter method. Answer false if no
- * parameters apply, that is, the method element applies to all overloaded methods with this name
- */
-public boolean hasMethodParams() {
- return getParms() != null;
-}
-/**
- * Parse @aSignature setting the name and the params.
- * A signature example: setTwoParamMethod(java.lang.String, java.lang.String)
- */
-public void initializeFromSignature(String aSignature) {
- parseSignature(aSignature);
-}
-public boolean isDefault() {
- return JavaClass.DEFAULT_METHOD_NAME.equals(getName());
-}
-/**
- * Return true if this MethodElement and @anotherMethodElement
- * represent the same exact methods.
- */
-public boolean isEquivalent(MethodElement anotherMethodElement) {
- boolean equal = equalSignature(anotherMethodElement);
- if (equal)
- equal = getEnterpriseBean() == anotherMethodElement.getEnterpriseBean();
- return equal;
-}
-public boolean isHome() {
- return getType().getValue() == MethodElementKind.HOME;
-}
-public boolean isRemote() {
- return getType().getValue() == MethodElementKind.REMOTE;
-}
-public boolean isUnspecified() {
- return getType().getValue() == MethodElementKind.UNSPECIFIED;
-}
-public boolean isLocalHome() {
- return getType().getValue() == MethodElementKind.LOCAL_HOME;
-}
-public boolean isLocal() {
- return getType().getValue() == MethodElementKind.LOCAL;
-}
-/**
- * Return true if this MethodElement represents one or more
- * methods.
- */
-public boolean isValid() {
- return getMethods().length > 0;
-}
-/**
- * Return true only if all the parameters for @aMethod
- * matches the names in the list of parameters.
- */
-public boolean matchesParams(Method aMethod) {
- if (aMethod == null) return false;
- List params = getMethodParams();
- JavaParameter[] methodParams = aMethod.listParametersWithoutReturn();
- if (params.size() != methodParams.length)
- return false;
- for (int i = 0; i < methodParams.length; i++){
- String parameterType = ((JavaHelpers)methodParams[i].getEType()).getQualifiedName();
- if (!params.get(i).equals(parameterType))
- return false;
- }
- return true;
-}
-/**
- * Return true if this MethodElement has the same basic signature as
- * @aMethod, ignoring the return type, thrown exceptions, and declaring class of
- * this instance or @aMethod. Return false, if params is null
- */
-public boolean nameAndParamsEquals(Method aMethod) {
- if (aMethod != null) {
- if (getName().equals(aMethod.getName())) {
- if (hasMethodParams())
- return matchesParams(aMethod);
- return false;
- }
- }
- return false;
-}
-protected boolean parmsEqual(MethodElement me) {
- if (me == null) return false;
- List myParms, otherParms;
- myParms = getMethodParams();
- otherParms = me.getMethodParams();
- if (myParms.size() != otherParms.size()) return false;
- for (int i = 0; i < myParms.size(); i++){
- if (!myParms.get(i).equals(otherParms.get(i)))
- return false;
- }
- return true;
-}
-/**
- * Parse @aSignature setting the name and the params.
- * A signature example: setTwoParamMethod(java.lang.String, java.lang.String)
- */
-protected void parseSignature(String aSignature) {
- int index = aSignature.indexOf(RIGHT_PAREN);
-
- int endIndex = aSignature.indexOf(LEFT_PAREN);
- if (endIndex < 0)
- {
- endIndex = aSignature.length() - 1;
- }
-
- if (index < 0){
- setName(aSignature);
- setParms(null); //There are no parameters in the sig so set to null
- }
- else {
- String sigName = aSignature.substring(0, index);
-
- setName(sigName);
- String sigParms = aSignature.substring(index + 1, endIndex);
-
- if (sigParms.length() > 0) {
- char commaChar = COMMA.charAt(0);
- char[] sigParmsChars = sigParms.toCharArray();
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < sigParmsChars.length; i++) {
- if (sigParmsChars[i] != commaChar) {
- buf.append(sigParmsChars[i]);
- } else {
- addMethodParams(buf.toString());
- buf = new StringBuffer();
- }
- }
- addMethodParams(buf.toString());
- } else
- applyZeroParams();
- }
-}
-public void removeMethodParams(String param) {
- String myParams = getParms();
- if (myParams == null || myParams.length() == 0) {
- return;
- }
- StringTokenizer tok = new StringTokenizer(myParams);
- StringBuffer newParms = new StringBuffer();
- while (tok.hasMoreElements()) {
- String token = tok.nextToken();
- if (!token.equals(param)) {
- newParms.append(token);
- newParms.append(" "); //$NON-NLS-1$
- }
- }
- setParms(newParms.toString().trim());
-}
-/**
- * represents method comment.
- */
-public boolean represents(Method aMethod) {
- if (aMethod != null) {
- if (isUnspecified() || typeClassImplementsInterface(aMethod.getJavaClass())) {
- if (isDefault())
- return true;
- else
- if (getName().equals(aMethod.getName())) {
- if (hasMethodParams())
- return matchesParams(aMethod);
- return true;
- }
- }
- }
- return false;
-}
-/**
- * Sets the id to be [MethodTransactionID| MethodPermissionID]_EJBNAME_MethodName,
- * or [MethodTransactionID| MethodPermissionID]_EJBNAME_MethodName_Parms, if parms exist
- */
-public void setIdToReadableString() {
- String aParms = getParms() == null ? "" : "_"+getParms().replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$
- String prefix = ""; //$NON-NLS-1$
- switch (MethodElementHelper.getContainedType(this)) {
- case MethodElementHelper.METHOD_PERMISSION :
- prefix = ((XMIResource)eContainer.eResource()).getID(eContainer);
- break;
- case MethodElementHelper.METHOD_TRANSACTION :
- prefix = ((XMIResource)eContainer.eResource()).getID(eContainer);
- break;
- }
- ((XMIResource)eResource()).setID(this,prefix + "_" + getEnterpriseBean().getName() + "_" + getName() + aParms); //$NON-NLS-1$ //$NON-NLS-2$
-}
-protected boolean typeClassImplementsInterface(JavaClass anInterface) {
- if (getTypeJavaClass() == null || anInterface == null) return false;
- return getTypeJavaClass().implementsInterface(anInterface);
-}
-/**
- * Return true if this MethodElement uniquely identifies
- * @aMethod. Return false, even if the MethodElement represents
- * @aMethod (i.e., @aMethod is contained in its list of methods).
- */
-public boolean uniquelyIdentifies(Method aMethod) {
- if (aMethod != null) {
- if (getTypeJavaClass() != null &&
- typeClassImplementsInterface(aMethod.getJavaClass()) &&
- getName().equals(aMethod.getName())) {
- if (hasMethodParams())
- return matchesParams(aMethod);
- return aMethod.listParametersWithoutReturn().length==0;
- }
- }
- return false;
-}
- /**
- * @generated This field/method will be replaced during code generation
- * The method-name element contains a name of an enterprise bean method,
- * or the asterisk (*) character. The asterisk is used when the element
- * denotes all the methods of an enterprise bean's remote and home
- * interfaces.
-
- */
- public String getName() {
- return name;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__NAME, oldName, name));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getParms() {
- return parms;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setParms(String newParms) {
- String oldParms = parms;
- parms = newParms;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__PARMS, oldParms, parms));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public MethodElementKind getType() {
- return type;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setType(MethodElementKind newType) {
- MethodElementKind oldType = type;
- type = newType == null ? TYPE_EDEFAULT : newType;
- boolean oldTypeESet = typeESet;
- typeESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__TYPE, oldType, type, !oldTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetType() {
- MethodElementKind oldType = type;
- boolean oldTypeESet = typeESet;
- type = TYPE_EDEFAULT;
- typeESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_ELEMENT__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetType() {
- return typeESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EnterpriseBean getEnterpriseBean() {
- if (enterpriseBean != null && enterpriseBean.eIsProxy()) {
- InternalEObject oldEnterpriseBean = (InternalEObject)enterpriseBean;
- enterpriseBean = (EnterpriseBean)eResolveProxy(oldEnterpriseBean);
- if (enterpriseBean != oldEnterpriseBean) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN, oldEnterpriseBean, enterpriseBean));
- }
- }
- return enterpriseBean;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EnterpriseBean basicGetEnterpriseBean() {
- return enterpriseBean;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setEnterpriseBean(EnterpriseBean newEnterpriseBean) {
- EnterpriseBean oldEnterpriseBean = enterpriseBean;
- enterpriseBean = newEnterpriseBean;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN, oldEnterpriseBean, enterpriseBean));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_ELEMENT__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.METHOD_ELEMENT__NAME:
- return getName();
- case EjbPackage.METHOD_ELEMENT__PARMS:
- return getParms();
- case EjbPackage.METHOD_ELEMENT__TYPE:
- return getType();
- case EjbPackage.METHOD_ELEMENT__DESCRIPTION:
- return getDescription();
- case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN:
- if (resolve) return getEnterpriseBean();
- return basicGetEnterpriseBean();
- case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.METHOD_ELEMENT__NAME:
- setName((String)newValue);
- return;
- case EjbPackage.METHOD_ELEMENT__PARMS:
- setParms((String)newValue);
- return;
- case EjbPackage.METHOD_ELEMENT__TYPE:
- setType((MethodElementKind)newValue);
- return;
- case EjbPackage.METHOD_ELEMENT__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN:
- setEnterpriseBean((EnterpriseBean)newValue);
- return;
- case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.METHOD_ELEMENT__NAME:
- setName(NAME_EDEFAULT);
- return;
- case EjbPackage.METHOD_ELEMENT__PARMS:
- setParms(PARMS_EDEFAULT);
- return;
- case EjbPackage.METHOD_ELEMENT__TYPE:
- unsetType();
- return;
- case EjbPackage.METHOD_ELEMENT__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN:
- setEnterpriseBean((EnterpriseBean)null);
- return;
- case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.METHOD_ELEMENT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case EjbPackage.METHOD_ELEMENT__PARMS:
- return PARMS_EDEFAULT == null ? parms != null : !PARMS_EDEFAULT.equals(parms);
- case EjbPackage.METHOD_ELEMENT__TYPE:
- return isSetType();
- case EjbPackage.METHOD_ELEMENT__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.METHOD_ELEMENT__ENTERPRISE_BEAN:
- return enterpriseBean != null;
- case EjbPackage.METHOD_ELEMENT__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(", parms: ");
- result.append(parms);
- result.append(", type: ");
- if (typeESet) result.append(type); else result.append("<unset>");
- result.append(", description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
-}
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodPermissionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodPermissionImpl.java
deleted file mode 100644
index 8f6963aef..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodPermissionImpl.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.SecurityRole;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-
-/**
- * The method-permission element specifies that one or more security roles are allowed to invoke one or more enterprise bean methods. The method-permission element consists of an optional description, a list of security role names, and a list of method elements. The security roles used in the method-permission element must be defined in the security-role element of the deployment descriptor, and the methods must be methods defined in the enterprise bean's remote and//or home interfaces.
- * @generated
- */
-public class MethodPermissionImpl extends J2EEEObjectImpl implements MethodPermission {
-
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * The default value of the '{@link #isUnchecked() <em>Unchecked</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isUnchecked()
- * @generated
- * @ordered
- */
- protected static final boolean UNCHECKED_EDEFAULT = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected boolean unchecked = UNCHECKED_EDEFAULT;
- /**
- * This is true if the Unchecked attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean uncheckedESet = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList roles = null;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList methodElements = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- public MethodPermissionImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.METHOD_PERMISSION;
- }
-
-public List getMethodElements(EnterpriseBean anEJB) {
- if (anEJB == null) return Collections.EMPTY_LIST;
- List result = new ArrayList();
- List elements = getMethodElements();
- MethodElement me;
- for (int i = 0; i < elements.size(); i++){
- me = (MethodElement) elements.get(i);
- if (anEJB.equals(me.getEnterpriseBean()))
- result.add(me);
- }
- return result;
-}
-public SecurityRole getSecurityRole(String aRoleName) {
- if (aRoleName == null) return null;
- List myRoles = getRoles();
- int size = myRoles.size();
- SecurityRole role;
- for (int i = 0; i < size; i++){
- role = (SecurityRole) myRoles.get(i);
- if (aRoleName.equals(role.getRoleName()))
- return role;
- }
- return null;
-}
-/**
- * Return true if this permission contains @aSecurityRole
- */
-public boolean hasSecurityRole(SecurityRole aSecurityRole) {
- if (aSecurityRole == null)
- return false;
- List myRoles = getRoles();
- int size = myRoles.size();
- for (int i = 0; i < size; i++) {
- if (aSecurityRole == myRoles.get(i))
- return true;
- }
- return false;
-}
-public boolean hasSecurityRole(String aRoleName) {
- return getSecurityRole(aRoleName) != null;
-}
-/**
- * Return true if this MethodPermission and @anotherMethodPermission
- * have the same roles.
- */
-public boolean isEquivalent(MethodPermission anotherMethodPermission) {
- if (anotherMethodPermission == null) return false;
- return getRoles().size() == anotherMethodPermission.getRoles().size() &&
- getRoles().containsAll(anotherMethodPermission.getRoles());
-}
- /**
- * @generated This field/method will be replaced during code generation
- * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public boolean isUnchecked() {
- return unchecked;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setUnchecked(boolean newUnchecked) {
- boolean oldUnchecked = unchecked;
- unchecked = newUnchecked;
- boolean oldUncheckedESet = uncheckedESet;
- uncheckedESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__UNCHECKED, oldUnchecked, unchecked, !oldUncheckedESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetUnchecked() {
- boolean oldUnchecked = unchecked;
- boolean oldUncheckedESet = uncheckedESet;
- unchecked = UNCHECKED_EDEFAULT;
- uncheckedESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_PERMISSION__UNCHECKED, oldUnchecked, UNCHECKED_EDEFAULT, oldUncheckedESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetUnchecked() {
- return uncheckedESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public AssemblyDescriptor getAssemblyDescriptor() {
- if (eContainerFeatureID != EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR) return null;
- return (AssemblyDescriptor)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newAssemblyDescriptor, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) {
- if (newAssemblyDescriptor != eInternalContainer() || (eContainerFeatureID != EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR && newAssemblyDescriptor != null)) {
- if (EcoreUtil.isAncestor(this, newAssemblyDescriptor))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newAssemblyDescriptor != null)
- msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, AssemblyDescriptor.class, msgs);
- msgs = basicSetAssemblyDescriptor(newAssemblyDescriptor, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getRoles() {
- if (roles == null) {
- roles = new EObjectResolvingEList(SecurityRole.class, this, EjbPackage.METHOD_PERMISSION__ROLES);
- }
- return roles;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getMethodElements() {
- if (methodElements == null) {
- methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS);
- }
- return methodElements;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_PERMISSION__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetAssemblyDescriptor((AssemblyDescriptor)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR:
- return basicSetAssemblyDescriptor(null, msgs);
- case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS:
- return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs);
- case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR:
- return eInternalContainer().eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_PERMISSIONS, AssemblyDescriptor.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.METHOD_PERMISSION__DESCRIPTION:
- return getDescription();
- case EjbPackage.METHOD_PERMISSION__UNCHECKED:
- return isUnchecked() ? Boolean.TRUE : Boolean.FALSE;
- case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR:
- return getAssemblyDescriptor();
- case EjbPackage.METHOD_PERMISSION__ROLES:
- return getRoles();
- case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS:
- return getMethodElements();
- case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.METHOD_PERMISSION__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.METHOD_PERMISSION__UNCHECKED:
- setUnchecked(((Boolean)newValue).booleanValue());
- return;
- case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR:
- setAssemblyDescriptor((AssemblyDescriptor)newValue);
- return;
- case EjbPackage.METHOD_PERMISSION__ROLES:
- getRoles().clear();
- getRoles().addAll((Collection)newValue);
- return;
- case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS:
- getMethodElements().clear();
- getMethodElements().addAll((Collection)newValue);
- return;
- case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.METHOD_PERMISSION__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.METHOD_PERMISSION__UNCHECKED:
- unsetUnchecked();
- return;
- case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR:
- setAssemblyDescriptor((AssemblyDescriptor)null);
- return;
- case EjbPackage.METHOD_PERMISSION__ROLES:
- getRoles().clear();
- return;
- case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS:
- getMethodElements().clear();
- return;
- case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.METHOD_PERMISSION__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.METHOD_PERMISSION__UNCHECKED:
- return isSetUnchecked();
- case EjbPackage.METHOD_PERMISSION__ASSEMBLY_DESCRIPTOR:
- return getAssemblyDescriptor() != null;
- case EjbPackage.METHOD_PERMISSION__ROLES:
- return roles != null && !roles.isEmpty();
- case EjbPackage.METHOD_PERMISSION__METHOD_ELEMENTS:
- return methodElements != null && !methodElements.isEmpty();
- case EjbPackage.METHOD_PERMISSION__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", unchecked: ");
- if (uncheckedESet) result.append(unchecked); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodTransactionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodTransactionImpl.java
deleted file mode 100644
index ef5dd292f..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/MethodTransactionImpl.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-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.EEnumLiteral;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jem.java.Method;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.jst.j2ee.ejb.TransactionAttributeType;
-
-/**
- * Specifies how the container must manage transaction scopes for the enterprise bean's method invocations. It consists of an optional description, a list of method elements, and a transaction attribute.The transaction attribute is to be applied to all the specified methods.
- * @generated
- */
-public class MethodTransactionImpl extends J2EEEObjectImpl implements MethodTransaction {
-
- /**
- * The default value of the '{@link #getTransactionAttribute() <em>Transaction Attribute</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTransactionAttribute()
- * @generated
- * @ordered
- */
- protected static final TransactionAttributeType TRANSACTION_ATTRIBUTE_EDEFAULT = TransactionAttributeType.NOT_SUPPORTED_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected TransactionAttributeType transactionAttribute = TRANSACTION_ATTRIBUTE_EDEFAULT;
- /**
- * This is true if the Transaction Attribute attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean transactionAttributeESet = false;
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList methodElements = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- public MethodTransactionImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.METHOD_TRANSACTION;
- }
-
-/**
- * Return an array of Strings for all the EEnumLiteral values
- * for the transactionAttribute enumeration.
- */
-public static String[] getAvailableTransactionAttributeNames() {
- List l = getAvailableTransactionAttributes();
- String[] names = new String[l.size()];
- for (int i = 0; i < l.size(); i++)
- names[i] = ((EEnumLiteral)l.get(i)).toString();
- return names;
-}
-/**
- * Return a List of the all the EEnumLiteral values
- * for the transactionAttribute enumeration.
- * The toString() method for a EEnumLiteral will display
- * the String value for the enumeration value.
- */
-public static List getAvailableTransactionAttributes() {
- EjbPackage pack = (EjbPackage)EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI);
- return pack.getTransactionAttributeType().getELiterals();
-}
-public List getMethodElements(EnterpriseBean anEJB) {
- List result = new ArrayList();
- List elements = getMethodElements();
- MethodElement me;
- for (int i = 0; i < elements.size(); i++){
- me = (MethodElement) elements.get(i);
- if (me.getEnterpriseBean() != null && me.getEnterpriseBean().equals(anEJB))
- result.add(me);
- }
- return result;
-}
-public MethodElement getMostSpecificMethodElement(Method aMethod) {
- return MethodElementImpl.getMostSpecificMethodElement(getMethodElements(), aMethod);
-}
-public boolean isEquivalent(MethodTransaction anotherMethodTransaction) {
- return getTransactionAttribute() == anotherMethodTransaction.getTransactionAttribute();
-}
- /**
- * @generated This field/method will be replaced during code generation
- * The trans-attribute element specifies how the container must manage the transaction boundaries when delegating a method invocation to an enterprise bean's business method.
-
- */
- public TransactionAttributeType getTransactionAttribute() {
- return transactionAttribute;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTransactionAttribute(TransactionAttributeType newTransactionAttribute) {
- TransactionAttributeType oldTransactionAttribute = transactionAttribute;
- transactionAttribute = newTransactionAttribute == null ? TRANSACTION_ATTRIBUTE_EDEFAULT : newTransactionAttribute;
- boolean oldTransactionAttributeESet = transactionAttributeESet;
- transactionAttributeESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE, oldTransactionAttribute, transactionAttribute, !oldTransactionAttributeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetTransactionAttribute() {
- TransactionAttributeType oldTransactionAttribute = transactionAttribute;
- boolean oldTransactionAttributeESet = transactionAttributeESet;
- transactionAttribute = TRANSACTION_ATTRIBUTE_EDEFAULT;
- transactionAttributeESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE, oldTransactionAttribute, TRANSACTION_ATTRIBUTE_EDEFAULT, oldTransactionAttributeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetTransactionAttribute() {
- return transactionAttributeESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The description element is used by the ejb-jar file producer to provide text describing the parent element. The description element should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the parent element.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public AssemblyDescriptor getAssemblyDescriptor() {
- if (eContainerFeatureID != EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR) return null;
- return (AssemblyDescriptor)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newAssemblyDescriptor, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setAssemblyDescriptor(AssemblyDescriptor newAssemblyDescriptor) {
- if (newAssemblyDescriptor != eInternalContainer() || (eContainerFeatureID != EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR && newAssemblyDescriptor != null)) {
- if (EcoreUtil.isAncestor(this, newAssemblyDescriptor))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newAssemblyDescriptor != null)
- msgs = ((InternalEObject)newAssemblyDescriptor).eInverseAdd(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, AssemblyDescriptor.class, msgs);
- msgs = basicSetAssemblyDescriptor(newAssemblyDescriptor, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR, newAssemblyDescriptor, newAssemblyDescriptor));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EList getMethodElements() {
- if (methodElements == null) {
- methodElements = new EObjectContainmentEList(MethodElement.class, this, EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS);
- }
- return methodElements;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetAssemblyDescriptor((AssemblyDescriptor)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR:
- return basicSetAssemblyDescriptor(null, msgs);
- case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS:
- return ((InternalEList)getMethodElements()).basicRemove(otherEnd, msgs);
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR:
- return eInternalContainer().eInverseRemove(this, EjbPackage.ASSEMBLY_DESCRIPTOR__METHOD_TRANSACTIONS, AssemblyDescriptor.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE:
- return getTransactionAttribute();
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTION:
- return getDescription();
- case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR:
- return getAssemblyDescriptor();
- case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS:
- return getMethodElements();
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE:
- setTransactionAttribute((TransactionAttributeType)newValue);
- return;
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR:
- setAssemblyDescriptor((AssemblyDescriptor)newValue);
- return;
- case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS:
- getMethodElements().clear();
- getMethodElements().addAll((Collection)newValue);
- return;
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE:
- unsetTransactionAttribute();
- return;
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR:
- setAssemblyDescriptor((AssemblyDescriptor)null);
- return;
- case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS:
- getMethodElements().clear();
- return;
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.METHOD_TRANSACTION__TRANSACTION_ATTRIBUTE:
- return isSetTransactionAttribute();
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.METHOD_TRANSACTION__ASSEMBLY_DESCRIPTOR:
- return getAssemblyDescriptor() != null;
- case EjbPackage.METHOD_TRANSACTION__METHOD_ELEMENTS:
- return methodElements != null && !methodElements.isEmpty();
- case EjbPackage.METHOD_TRANSACTION__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (transactionAttribute: ");
- if (transactionAttributeESet) result.append(transactionAttribute); else result.append("<unset>");
- result.append(", description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ModelledKeyAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ModelledKeyAttributeFilter.java
deleted file mode 100644
index aef838df3..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ModelledKeyAttributeFilter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-/**
- * This filter will return a subset of the keyAttributes from the
- * ContainerManagedEntityExtension that is passed as an argument to the filter method.
- * It will remove any keyAttributes that are held by EjbRelationshipRole objects (including
- * inherited EjbRelationshipRole attributes).
- * That means the returned list of CMPAttributes will be key attributes that were defined locally
- * and all inherited key attributes minus any key attributes pointed to by EjbRelationshipRoles, thus the
- * key attributes will only be key attributes that were defined by the user.
- * Creation date: (11/28/2000 8:09:10 PM)
- * @author: Administrator
- */
-public class ModelledKeyAttributeFilter extends ContainerManagedEntityFilter {
- private static ModelledKeyAttributeFilter singleton;
-/**
- * filter method comment.
- */
-public List filter(ContainerManagedEntity cmp) {
- return getSourceAttributes(cmp);
-}
-/**
- * Return the proper list of attributes from cmpExt.
- * Return all attributes minus those added due to Relationship Roles.
- */
-protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) {
- java.util.List all, localRoleKeyAttributes;
- all = new java.util.ArrayList(cmp.getKeyAttributes());
- localRoleKeyAttributes = cmp.getFilteredFeatures(KeyRelationshipRoleAttributeFilter.singleton());
- filterRoleAttributesByName(all, localRoleKeyAttributes);
- return all;
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/28/2000 5:36:00 PM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.ModelledKeyAttributeFilter
- */
-public static ModelledKeyAttributeFilter singleton() {
- if (singleton == null)
- singleton = new ModelledKeyAttributeFilter();
- return singleton;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ModelledPersistentAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ModelledPersistentAttributeFilter.java
deleted file mode 100644
index e68e8d0cb..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/ModelledPersistentAttributeFilter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-/**
- * This filter will return a subset of the persistentAttributes from the
- * ContainerManagedEntityExtension that is passed as an argument to the filter method.
- * It will remove any persistentAttributes that are held by EjbRelationshipRole objects (including
- * inherited EjbRelationshipRole attributes).
- * That means the returned list of CMPAttributes will be attributes that were defined locally
- * and all inherited attributes minus any attributes pointed to by EjbRelationshipRoles, thus the
- * attributes will only be attributes that were defined by the user.
- * Creation date: (11/28/2000 7:31:42 PM)
- * @author: Administrator
- */
-public class ModelledPersistentAttributeFilter extends ContainerManagedEntityFilter {
- private static ModelledPersistentAttributeFilter singleton;
-/**
- * filter method comment.
- */
-public List filter(ContainerManagedEntity cmp) {
- return getSourceAttributes(cmp);
-}
-/**
- * Return the proper list of attributes from cmpExt.
- * Return all attributes minus those added due to Relationship Roles.
- */
-protected java.util.List getSourceAttributes(ContainerManagedEntity cmp) {
- java.util.List all, roleAttributes;
- all = new java.util.ArrayList(cmp.getPersistentAttributes());
- roleAttributes = cmp.getFilteredFeatures(RelationshipRoleAttributeFilter.singleton());
- filterRoleAttributesByName(all, roleAttributes);
- return all;
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/28/2000 5:36:00 PM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.ModelledPersistentAttributeFilter
- */
-public static ModelledPersistentAttributeFilter singleton() {
- if (singleton == null)
- singleton = new ModelledPersistentAttributeFilter();
- return singleton;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/NonKeyRequiredRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/NonKeyRequiredRoleFilter.java
deleted file mode 100644
index e31f73c08..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/NonKeyRequiredRoleFilter.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-/*
- * Created on May 5, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.ejb.internal.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class NonKeyRequiredRoleFilter extends ContainerManagedEntityFilter {
-
- private static NonKeyRequiredRoleFilter singleton;
-
- /**
- * filter method comment.
- */
- public List filter(ContainerManagedEntity cmp) {
- List roles = new ArrayList();
- Iterator it = getRelationshipRoles(cmp).iterator();
- CommonRelationshipRole role;
- while (it.hasNext()) {
- role = (CommonRelationshipRole) it.next();
- if (!role.isKey() && role.isRequired()) roles.add(role);
- }
- return roles;
- }
-
- /**
- * Insert the method's description here. Creation date: (11/28/2000 7:15:37
- * PM)
- *
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.KeyRelationshipRoleFilter
- */
- public static NonKeyRequiredRoleFilter singleton() {
- if (singleton == null) singleton = new NonKeyRequiredRoleFilter();
- return singleton;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/QueryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/QueryImpl.java
deleted file mode 100644
index 199f4e013..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/QueryImpl.java
+++ /dev/null
@@ -1,513 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.Query;
-import org.eclipse.jst.j2ee.ejb.QueryMethod;
-import org.eclipse.jst.j2ee.ejb.ReturnTypeMapping;
-
-/**
- * The query element is used to specify a finder or select query. It contains an optional description of the query; the specification of the finder or select method it is used by; a specification of the return type mapping, if any, if the query is for a select method; and the EJB QL query string that defines the query. Queries that are expressible in EJB QL must use the ejb-ql element to specify the query. If a query
- * is not expressible in EJB QL, the description element should be used to describe the semantics of the query and the ejb-ql element should be empty.
- * @generated
- */
-public class QueryImpl extends J2EEEObjectImpl implements Query {
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * The default value of the '{@link #getEjbQL() <em>Ejb QL</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEjbQL()
- * @generated
- * @ordered
- */
- protected static final String EJB_QL_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String ejbQL = EJB_QL_EDEFAULT;
- /**
- * The default value of the '{@link #getReturnTypeMapping() <em>Return Type Mapping</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getReturnTypeMapping()
- * @generated
- * @ordered
- */
- protected static final ReturnTypeMapping RETURN_TYPE_MAPPING_EDEFAULT = ReturnTypeMapping.LOCAL_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected ReturnTypeMapping returnTypeMapping = RETURN_TYPE_MAPPING_EDEFAULT;
- /**
- * This is true if the Return Type Mapping attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean returnTypeMappingESet = false;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected QueryMethod queryMethod = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- public QueryImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.QUERY;
- }
-
-public boolean isLocalResultMapping() {
- // override bug in the model which made Remote the default
- return getReturnTypeMapping().getValue() == ReturnTypeMapping.LOCAL;
-}
-public boolean isRemoteResultMapping() {
- return getReturnTypeMapping().getValue() == ReturnTypeMapping.REMOTE;
-}
- /**
- * @generated This field/method will be replaced during code generation
- * The description is used by the ejb-jar file producer to provide text describing the query.
- *
- * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * Contains the EJB QL query string that defines a finder or select query. This element is defined within the scope of a query element whose contents specify the finder or the select method that uses the query. The content must be a valid EJB QL query string for the entity bean for which the query is specified. The ejb-ql element must be specified for all queries that are expressible in EJB QL.
- *
- * @invariant The value must be a valid EJB QL query string for the entity bean or dependent object class for which the query is specified.
- * @invariant The ejb-ql element must be specified for all queries that are expressible in EJB QL.
- *
- * Example:
- * <query>
- * <query-method>
- * <method-name>ejbSelectPendingLineitems<//method-name>
- * <method-params//>
- * <//query-method>
- * <ejb-ql>SELECT ENTITY(l)
- * FROM LineItems l
- * WHERE l.shipped is FALSE
- * <//ejb-ql>
- * <//query>
- */
- public String getEjbQL() {
- return ejbQL;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setEjbQL(String newEjbQL) {
- String oldEjbQL = ejbQL;
- ejbQL = newEjbQL;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__EJB_QL, oldEjbQL, ejbQL));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The return-type-mapping element is used in the query element to specify whether an abstract schema type that is returned by a query for a select method is to be mapped to an EJBLocalObject or EJBObject type. The value of the return-type-mapping element, if specified must be one of the following.
- */
- public ReturnTypeMapping getReturnTypeMapping() {
- return returnTypeMapping;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setReturnTypeMapping(ReturnTypeMapping newReturnTypeMapping) {
- ReturnTypeMapping oldReturnTypeMapping = returnTypeMapping;
- returnTypeMapping = newReturnTypeMapping == null ? RETURN_TYPE_MAPPING_EDEFAULT : newReturnTypeMapping;
- boolean oldReturnTypeMappingESet = returnTypeMappingESet;
- returnTypeMappingESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__RETURN_TYPE_MAPPING, oldReturnTypeMapping, returnTypeMapping, !oldReturnTypeMappingESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetReturnTypeMapping() {
- ReturnTypeMapping oldReturnTypeMapping = returnTypeMapping;
- boolean oldReturnTypeMappingESet = returnTypeMappingESet;
- returnTypeMapping = RETURN_TYPE_MAPPING_EDEFAULT;
- returnTypeMappingESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.QUERY__RETURN_TYPE_MAPPING, oldReturnTypeMapping, RETURN_TYPE_MAPPING_EDEFAULT, oldReturnTypeMappingESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetReturnTypeMapping() {
- return returnTypeMappingESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The query-method element is used to specify the method (DB//SR//CM-"on the home") for a finder or
- * select query.
- *
- * The method-name element specifies the name of a finder or select
- * method in the entity bean's implementation class or a select method in
- * the dependent object class.
- *
- * Each method-param must be defined for a query-method using the
- * method-params element.
- *
- * Used in: query
- *
- * Example:
- *
- * Example:
- * <query>
- * <description>Method finds large orders<//description>
- * <query-method>
- * <method-name>findLargeOrders<//method-name>
- * <method-params><//method-params>
- * <//query-method>
- * <ejb-ql>SELECT ENTITY(o) FROM Order o WHERE o.amount &gt; 1000<//ejb-ql>
- * <//query>
- */
- public QueryMethod getQueryMethod() {
- return queryMethod;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetQueryMethod(QueryMethod newQueryMethod, NotificationChain msgs) {
- QueryMethod oldQueryMethod = queryMethod;
- queryMethod = newQueryMethod;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__QUERY_METHOD, oldQueryMethod, newQueryMethod);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setQueryMethod(QueryMethod newQueryMethod) {
- if (newQueryMethod != queryMethod) {
- NotificationChain msgs = null;
- if (queryMethod != null)
- msgs = ((InternalEObject)queryMethod).eInverseRemove(this, EjbPackage.QUERY_METHOD__QUERY, QueryMethod.class, msgs);
- if (newQueryMethod != null)
- msgs = ((InternalEObject)newQueryMethod).eInverseAdd(this, EjbPackage.QUERY_METHOD__QUERY, QueryMethod.class, msgs);
- msgs = basicSetQueryMethod(newQueryMethod, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__QUERY_METHOD, newQueryMethod, newQueryMethod));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public ContainerManagedEntity getEntity() {
- if (eContainerFeatureID != EjbPackage.QUERY__ENTITY) return null;
- return (ContainerManagedEntity)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetEntity(ContainerManagedEntity newEntity, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newEntity, EjbPackage.QUERY__ENTITY, msgs);
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setEntity(ContainerManagedEntity newEntity) {
- if (newEntity != eInternalContainer() || (eContainerFeatureID != EjbPackage.QUERY__ENTITY && newEntity != null)) {
- if (EcoreUtil.isAncestor(this, newEntity))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newEntity != null)
- msgs = ((InternalEObject)newEntity).eInverseAdd(this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, ContainerManagedEntity.class, msgs);
- msgs = basicSetEntity(newEntity, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY__ENTITY, newEntity, newEntity));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.QUERY__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.QUERY__QUERY_METHOD:
- if (queryMethod != null)
- msgs = ((InternalEObject)queryMethod).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EjbPackage.QUERY__QUERY_METHOD, null, msgs);
- return basicSetQueryMethod((QueryMethod)otherEnd, msgs);
- case EjbPackage.QUERY__ENTITY:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetEntity((ContainerManagedEntity)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.QUERY__QUERY_METHOD:
- return basicSetQueryMethod(null, msgs);
- case EjbPackage.QUERY__ENTITY:
- return basicSetEntity(null, msgs);
- case EjbPackage.QUERY__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.QUERY__ENTITY:
- return eInternalContainer().eInverseRemove(this, EjbPackage.CONTAINER_MANAGED_ENTITY__QUERIES, ContainerManagedEntity.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.QUERY__DESCRIPTION:
- return getDescription();
- case EjbPackage.QUERY__EJB_QL:
- return getEjbQL();
- case EjbPackage.QUERY__RETURN_TYPE_MAPPING:
- return getReturnTypeMapping();
- case EjbPackage.QUERY__QUERY_METHOD:
- return getQueryMethod();
- case EjbPackage.QUERY__ENTITY:
- return getEntity();
- case EjbPackage.QUERY__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.QUERY__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.QUERY__EJB_QL:
- setEjbQL((String)newValue);
- return;
- case EjbPackage.QUERY__RETURN_TYPE_MAPPING:
- setReturnTypeMapping((ReturnTypeMapping)newValue);
- return;
- case EjbPackage.QUERY__QUERY_METHOD:
- setQueryMethod((QueryMethod)newValue);
- return;
- case EjbPackage.QUERY__ENTITY:
- setEntity((ContainerManagedEntity)newValue);
- return;
- case EjbPackage.QUERY__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.QUERY__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.QUERY__EJB_QL:
- setEjbQL(EJB_QL_EDEFAULT);
- return;
- case EjbPackage.QUERY__RETURN_TYPE_MAPPING:
- unsetReturnTypeMapping();
- return;
- case EjbPackage.QUERY__QUERY_METHOD:
- setQueryMethod((QueryMethod)null);
- return;
- case EjbPackage.QUERY__ENTITY:
- setEntity((ContainerManagedEntity)null);
- return;
- case EjbPackage.QUERY__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.QUERY__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.QUERY__EJB_QL:
- return EJB_QL_EDEFAULT == null ? ejbQL != null : !EJB_QL_EDEFAULT.equals(ejbQL);
- case EjbPackage.QUERY__RETURN_TYPE_MAPPING:
- return isSetReturnTypeMapping();
- case EjbPackage.QUERY__QUERY_METHOD:
- return queryMethod != null;
- case EjbPackage.QUERY__ENTITY:
- return getEntity() != null;
- case EjbPackage.QUERY__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(", ejbQL: ");
- result.append(ejbQL);
- result.append(", returnTypeMapping: ");
- if (returnTypeMappingESet) result.append(returnTypeMapping); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/QueryMethodImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/QueryMethodImpl.java
deleted file mode 100644
index c4bd93497..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/QueryMethodImpl.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.Method;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Query;
-import org.eclipse.jst.j2ee.ejb.QueryMethod;
-
-/**
- * @generated
- */
-public class QueryMethodImpl extends MethodElementImpl implements QueryMethod {
-
- public QueryMethodImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.QUERY_METHOD;
- }
-
-/**
- * For Query methods, their enterprise bean must be derived.
- * It is the Entity which contains the Query.
- */
-public EnterpriseBean getEnterpriseBean() {
- if (enterpriseBean == null) {
- if (getQuery() != null)
- enterpriseBean = getQuery().getEntity();
- }
- return enterpriseBean;
-}
-/**
- * Answer the method for which this method element applies in the HOME INTERFACE.
- */
-protected Method getHomeMethod() {
- Method result = null;
- JavaClass javaClass = getEnterpriseBean().getHomeInterface();
- if (javaClass != null) {
- String methodName = getName().trim();
- if (hasMethodParams())
- result = javaClass.getPublicMethodExtended(methodName, getMethodParams());
- else {
- List methods = javaClass.getPublicMethodsExtendedNamed(methodName);
- if (!methods.isEmpty())
- result = (Method) methods.get(0);
- }
- }
- return result;
-}
-/**
- * Answer the method for which this method element applies in the LOCAL HOME INTERFACE.
- */
-protected Method getLocalHomeMethod() {
- Method result = null;
- JavaClass javaClass = getEnterpriseBean().getLocalHomeInterface();
- if (javaClass != null) {
- String methodName = getName().trim();
- if (hasMethodParams())
- result = javaClass.getPublicMethodExtended(methodName, getMethodParams());
- else {
- List methods = javaClass.getPublicMethodsExtendedNamed(methodName);
- if (!methods.isEmpty())
- result = (Method) methods.get(0);
- }
- }
- return result;
-}
-
-
-
-protected void addMethodIfNotNull(List aList, Method aMethod) {
- if (aMethod != null)
- aList.add(aMethod);
-}
-/**
- * This method will return a zero-length Method[] if there is no matching method
- * on the home, local home, or bean class. It will return exactly one method
- * for ejbSelect, and one or two methods for finders. The two method case occurs
- * when the same method with the same signature exists on both the home and
- * local home.
- */
-public Method[] getMethods() {
- List result = new ArrayList(2);
- if (getName().startsWith("ejbSelect")) { //$NON-NLS-1$
- addMethodIfNotNull(result, getSelectMethod());
- } else {
- addMethodIfNotNull(result, getHomeMethod());
- addMethodIfNotNull(result, getLocalHomeMethod());
- }
- return (Method[])result.toArray(new Method[result.size()]);
-}
-/**
- * Answer the method for which this method element applies in the HOME INTERFACE.
- */
-protected Method getSelectMethod() {
- Method result = null;
- JavaClass javaClass = getEnterpriseBean().getEjbClass();
- String methodName = getName().trim();
- if (hasMethodParams())
- result = javaClass.getPublicMethodExtended(name, getMethodParams());
- else {
- List methods = javaClass.getPublicMethodsExtendedNamed(methodName);
- if (!methods.isEmpty())
- result = (Method) methods.iterator().next();
- }
- return result;
-}
- /**
- * @generated This field/method will be replaced during code generation
- */
- public Query getQuery() {
- if (eContainerFeatureID != EjbPackage.QUERY_METHOD__QUERY) return null;
- return (Query)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetQuery(Query newQuery, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newQuery, EjbPackage.QUERY_METHOD__QUERY, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setQuery(Query newQuery) {
- if (newQuery != eInternalContainer() || (eContainerFeatureID != EjbPackage.QUERY_METHOD__QUERY && newQuery != null)) {
- if (EcoreUtil.isAncestor(this, newQuery))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newQuery != null)
- msgs = ((InternalEObject)newQuery).eInverseAdd(this, EjbPackage.QUERY__QUERY_METHOD, Query.class, msgs);
- msgs = basicSetQuery(newQuery, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.QUERY_METHOD__QUERY, newQuery, newQuery));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.QUERY_METHOD__QUERY:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetQuery((Query)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.QUERY_METHOD__QUERY:
- return basicSetQuery(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.QUERY_METHOD__QUERY:
- return eInternalContainer().eInverseRemove(this, EjbPackage.QUERY__QUERY_METHOD, Query.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.QUERY_METHOD__QUERY:
- return getQuery();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.QUERY_METHOD__QUERY:
- setQuery((Query)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.QUERY_METHOD__QUERY:
- setQuery((Query)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.QUERY_METHOD__QUERY:
- return getQuery() != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * You should use getClientTypeJavaClasses to ensure you pick up both home interfaces
- * if they exist.
- */
- public JavaClass getTypeJavaClass() {
- JavaClass[] result = getClientTypeJavaClasses();
- if (result != null && result.length > 0)
- return result[0];
- return null;
- }
-
- /**
- * Return an array of JavaClasses of all the interfaces or bean class that this method is presented
- * to a client. If it is an ejbSelect... on the bean class will be returned and if
- * it if a find both home interfaces will be returned if they exist.
- *
- * May return null.
- */
- public JavaClass[] getClientTypeJavaClasses() {
- if (getName() == null || getEnterpriseBean() == null) return null;
- EnterpriseBean ejb = getEnterpriseBean();
- if (getName().startsWith(SELECT_PREFIX))
- return new JavaClass[]{ejb.getEjbClass()};
- //Next case is tougher since you could have both a remove and local client
- //We want to return the home interface in this case.
- if (getName().startsWith(FIND_PREFIX)) {
- if (ejb.hasLocalClient() && !ejb.hasRemoteClient())
- return new JavaClass[]{getEnterpriseBean().getLocalHomeInterface()};
- if (ejb.hasRemoteClient() && !ejb.hasLocalClient())
- return new JavaClass[]{ejb.getHomeInterface()};
- if (ejb.hasRemoteClient() && ejb.hasLocalClient())
- return new JavaClass[]{ejb.getLocalHomeInterface(), ejb.getHomeInterface()};
- }
- return null;
- }
-}
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RelationshipRoleAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RelationshipRoleAttributeFilter.java
deleted file mode 100644
index c6fb84d29..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RelationshipRoleAttributeFilter.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-/**
- * This filter will return a subset of the persistentAttributes (this includes inherited
- * attributes) from the ContainerManagedEntityExtension that is passed as an
- * argument to the filter method.
- * It will remove any attribute that is not pointed to by an EjbRelationshipRole.
- * Thus, the returned list will contain attributes (including inherited attributes) that only
- * belong to roles.
- * Creation date: (11/28/2000 6:46:08 PM)
- * @author: Administrator
- */
-public class RelationshipRoleAttributeFilter extends AbstractRelationshipRoleAttributeFilter {
- private static RelationshipRoleAttributeFilter singleton;
-/**
- * Return the proper list of roles from cmpExt.
- */
-protected java.util.List getSourceRoles(ContainerManagedEntity cmp) {
- return getRelationshipRoles(cmp);
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/28/2000 5:36:00 PM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RelationshipRoleAttributeFilter
- */
-public static RelationshipRoleAttributeFilter singleton() {
- if (singleton == null)
- singleton = new RelationshipRoleAttributeFilter();
- return singleton;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RelationshipsImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RelationshipsImpl.java
deleted file mode 100644
index 3467eecb8..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RelationshipsImpl.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.Relationships;
-
-/**
- * The relationships describes the relationships in which entity beans with container managed persistence participate. The relationships element contains an optional description; and a list of ejb-relation elements, which specify the container managed relationships.
- * @generated
- */
-public class RelationshipsImpl extends J2EEEObjectImpl implements Relationships {
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected EList ejbRelations = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- public RelationshipsImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.RELATIONSHIPS;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * The description is used by the ejb-jar file producer to provide text describing the collection of relationships.
- *
- * The description should include any information that the ejb-jar file producer wants to provide to the consumer of the ejb-jar file (i.e. to the Deployer). Typically, the tools used by the ejb-jar file consumer will display the description when processing the list of dependents.
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.RELATIONSHIPS__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EJBJar getEjbJar() {
- if (eContainerFeatureID != EjbPackage.RELATIONSHIPS__EJB_JAR) return null;
- return (EJBJar)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetEjbJar(EJBJar newEjbJar, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newEjbJar, EjbPackage.RELATIONSHIPS__EJB_JAR, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setEjbJar(EJBJar newEjbJar) {
- if (newEjbJar != eInternalContainer() || (eContainerFeatureID != EjbPackage.RELATIONSHIPS__EJB_JAR && newEjbJar != null)) {
- if (EcoreUtil.isAncestor(this, newEjbJar))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newEjbJar != null)
- msgs = ((InternalEObject)newEjbJar).eInverseAdd(this, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, EJBJar.class, msgs);
- msgs = basicSetEjbJar(newEjbJar, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.RELATIONSHIPS__EJB_JAR, newEjbJar, newEjbJar));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- * A list of ejb-relation elements, which specify the container managed
- * relationships.
- */
- public EList getEjbRelations() {
- if (ejbRelations == null) {
- ejbRelations = new EObjectContainmentWithInverseEList(EJBRelation.class, this, EjbPackage.RELATIONSHIPS__EJB_RELATIONS, EjbPackage.EJB_RELATION__RELATIONSHIP_LIST);
- }
- return ejbRelations;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.RELATIONSHIPS__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.RELATIONSHIPS__EJB_JAR:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetEjbJar((EJBJar)otherEnd, msgs);
- case EjbPackage.RELATIONSHIPS__EJB_RELATIONS:
- return ((InternalEList)getEjbRelations()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.RELATIONSHIPS__EJB_JAR:
- return basicSetEjbJar(null, msgs);
- case EjbPackage.RELATIONSHIPS__EJB_RELATIONS:
- return ((InternalEList)getEjbRelations()).basicRemove(otherEnd, msgs);
- case EjbPackage.RELATIONSHIPS__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.RELATIONSHIPS__EJB_JAR:
- return eInternalContainer().eInverseRemove(this, EjbPackage.EJB_JAR__RELATIONSHIP_LIST, EJBJar.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.RELATIONSHIPS__DESCRIPTION:
- return getDescription();
- case EjbPackage.RELATIONSHIPS__EJB_JAR:
- return getEjbJar();
- case EjbPackage.RELATIONSHIPS__EJB_RELATIONS:
- return getEjbRelations();
- case EjbPackage.RELATIONSHIPS__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.RELATIONSHIPS__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.RELATIONSHIPS__EJB_JAR:
- setEjbJar((EJBJar)newValue);
- return;
- case EjbPackage.RELATIONSHIPS__EJB_RELATIONS:
- getEjbRelations().clear();
- getEjbRelations().addAll((Collection)newValue);
- return;
- case EjbPackage.RELATIONSHIPS__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.RELATIONSHIPS__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.RELATIONSHIPS__EJB_JAR:
- setEjbJar((EJBJar)null);
- return;
- case EjbPackage.RELATIONSHIPS__EJB_RELATIONS:
- getEjbRelations().clear();
- return;
- case EjbPackage.RELATIONSHIPS__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.RELATIONSHIPS__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.RELATIONSHIPS__EJB_JAR:
- return getEjbJar() != null;
- case EjbPackage.RELATIONSHIPS__EJB_RELATIONS:
- return ejbRelations != null && !ejbRelations.isEmpty();
- case EjbPackage.RELATIONSHIPS__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RequiredLocalRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RequiredLocalRelationshipRoleFilter.java
deleted file mode 100644
index f67cb999b..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RequiredLocalRelationshipRoleFilter.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.Collections;
-
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper;
-
-
-/**
- * Insert the type's description here.
- * Creation date: (10/15/2001 11:35:00 AM)
- * @author: Administrator
- */
-public class RequiredLocalRelationshipRoleFilter extends AbstractRequiredRelationshipRoleFilter {
- private static RequiredLocalRelationshipRoleFilter singleton;
-protected java.util.List getRolesToFilter(ContainerManagedEntity cmp) {
- EjbModuleExtensionHelper modHelper = getEjbModuleExtHelper(cmp);
- if(modHelper != null)
- return modHelper.getLocalRelationshipRoles_cmp11(cmp);
- return Collections.EMPTY_LIST;
-}
-/**
- * Insert the method's description here.
- * Creation date: (8/6/2001 11:27:25 AM)
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RequiredLocalRelationshipRoleFilter
- */
-public static RequiredLocalRelationshipRoleFilter singleton() {
- if (singleton == null)
- singleton = new RequiredLocalRelationshipRoleFilter();
- return singleton;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RequiredRelationshipRoleFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RequiredRelationshipRoleFilter.java
deleted file mode 100644
index 1404f3c75..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RequiredRelationshipRoleFilter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-
-
-/**
- * Insert the type's description here. Creation date: (8/6/2001 11:26:10 AM)
- * @author: Administrator
- */
-public class RequiredRelationshipRoleFilter extends ContainerManagedEntityFilter {
-
- private static RequiredRelationshipRoleFilter singleton;
-
- /**
- * filter method comment.
- */
- public List filter(ContainerManagedEntity cmp) {
- List roles = new ArrayList();
- Iterator it = getRelationshipRoles(cmp).iterator();
- CommonRelationshipRole role;
- while (it.hasNext()) {
- role = (CommonRelationshipRole) it.next();
- if (shouldAddFilteredResult(role)) roles.add(role);
- }
- return roles;
- }
-
- /**
- * Return true if the multiplicity for @aRole is required.
- */
- protected boolean shouldAddFilteredResult(CommonRelationshipRole aRole) {
- return aRole.isRequired();
- }
-
- /**
- * Insert the method's description here. Creation date: (8/6/2001 11:27:25
- * AM)
- *
- * @return com.ibm.ejs.models.base.extensions.ejbext.impl.RequiredRelationshipRoleFilter
- */
- public static RequiredRelationshipRoleFilter singleton() {
- if (singleton == null) singleton = new RequiredRelationshipRoleFilter();
- return singleton;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RoleShapeStrategy.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RoleShapeStrategy.java
deleted file mode 100644
index 4195c1c30..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RoleShapeStrategy.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.IRoleShapeStrategy;
-
-
-/**
- * Insert the type's description here.
- * Creation date: (11/6/2000 11:41:33 AM)
- * @author: Administrator
- */
-public abstract class RoleShapeStrategy implements IRoleShapeStrategy {
- protected boolean busy = false;
- protected CommonRelationshipRole role;
- protected ArrayList visitedKeyTypes = new ArrayList(5);
-/**
- * FlattenedRoleShapeStrategy constructor comment.
- */
-public RoleShapeStrategy(CommonRelationshipRole aRole) {
- super();
- setRole(aRole);
-}
-protected String appendName(String fullName, String additionalName) {
- return fullName + ATTRIBUTE_NAME_JOINER + additionalName;
-}
-protected boolean canContinue() {
- return !busy && role.isForward() && role.getName() != null;
-}
-protected boolean canComputeNames() {
- //return getRole().getOpposite() != null;
- return true;
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/16/00 9:19:27 PM)
- * @return CommonRelationshipRole
- */
-public CommonRelationshipRole getRole() {
- return role;
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/16/00 9:19:27 PM)
- * @return CommonRelationshipRole
- */
-
-public boolean isFlat () {
- return false;
-}
-public boolean isRound () {
- return false;
-}
-/**
- * Creates an appended name while uppercasing the first letter of the secondName.
- */
-public static String makeJavaName(String firstName, String secondName) {
- StringBuffer nameBuffer = new StringBuffer(firstName);
- nameBuffer.append(Character.toUpperCase(secondName.charAt(0)));
- for (int i = 1; i < secondName.length(); i++)
- nameBuffer.append(secondName.charAt(i));
- return nameBuffer.toString();
-}
-public void reconcileAttributes(List roleAttributes) {
- if (canContinue()) {
- busy = true;
- String attributeName = getRole().getName();
- List computedNames = new ArrayList();
- if (canComputeNames()){
- visitedKeyTypes.clear();
- reconcileAttributes(getRole(), attributeName, roleAttributes, computedNames);
- }
- removeExtraAttributes(computedNames);
- busy = false;
- }
-}
-/**
- * getFields method comment.
- */
-protected abstract void reconcileAttributes(CommonRelationshipRole aRole, String attributeName, List aList, List computedNames);
-/**
- * Remove attributes from our role whose name is not contained in the list of
- * @computedNames. Also, remove from the role's source EJB.
- */
-protected void removeExtraAttributes(List computedNames) {
- if (!getRole().getAttributes().isEmpty()) {
- java.util.Iterator it = getRole().getAttributes().iterator();
- ContainerManagedEntity cmp = getRole().getSourceEntity();
- CMPAttribute attribute;
- while (it.hasNext()) {
- attribute = (CMPAttribute) it.next();
- if (computedNames.contains(attribute.getName()))
- continue;
- it.remove();
- cmp.getKeyAttributes().remove(attribute);
- cmp.getPersistentAttributes().remove(attribute);
- }
- }
-}
-/**
- * Insert the method's description here.
- * Creation date: (11/16/00 9:19:27 PM)
- * @param newRole com.ibm.ejs.models.base.extensions.ejbext.EjbRelationshipRole
- */
-public void setRole(CommonRelationshipRole newRole) {
- role = newRole;
-}
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RoleSourceImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RoleSourceImpl.java
deleted file mode 100644
index 8885bfe32..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/RoleSourceImpl.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-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.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.RoleSource;
-
-/**
- * Designates the source of a role that participates in a relationship. A relationship-role-source element uniquely identifies an entity bean.
- * @invariant The content of each role-source element shall refer to an existing entity bean, entity bean reference.
- * @generated
- */
-public class RoleSourceImpl extends J2EEEObjectImpl implements RoleSource {
-
- /**
- * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescription()
- * @generated
- * @ordered
- */
- protected static final String DESCRIPTION_EDEFAULT = null;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected String description = DESCRIPTION_EDEFAULT;
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected ContainerManagedEntity entityBean = null;
- /**
- * The cached value of the '{@link #getDescriptions() <em>Descriptions</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getDescriptions()
- * @generated
- * @ordered
- */
- protected EList descriptions = null;
-
- public RoleSourceImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.ROLE_SOURCE;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setDescription(String newDescription) {
- String oldDescription = description;
- description = newDescription;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__DESCRIPTION, oldDescription, description));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public EJBRelationshipRole getRole() {
- if (eContainerFeatureID != EjbPackage.ROLE_SOURCE__ROLE) return null;
- return (EJBRelationshipRole)eContainer();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetRole(EJBRelationshipRole newRole, NotificationChain msgs) {
- msgs = eBasicSetContainer((InternalEObject)newRole, EjbPackage.ROLE_SOURCE__ROLE, msgs);
- return msgs;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public void setRole(EJBRelationshipRole newRole) {
- if (newRole != eInternalContainer() || (eContainerFeatureID != EjbPackage.ROLE_SOURCE__ROLE && newRole != null)) {
- if (EcoreUtil.isAncestor(this, newRole))
- throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
- NotificationChain msgs = null;
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- if (newRole != null)
- msgs = ((InternalEObject)newRole).eInverseAdd(this, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, EJBRelationshipRole.class, msgs);
- msgs = basicSetRole(newRole, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__ROLE, newRole, newRole));
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public ContainerManagedEntity getEntityBean() {
- if (entityBean != null && entityBean.eIsProxy()) {
- InternalEObject oldEntityBean = (InternalEObject)entityBean;
- entityBean = (ContainerManagedEntity)eResolveProxy(oldEntityBean);
- if (entityBean != oldEntityBean) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.ROLE_SOURCE__ENTITY_BEAN, oldEntityBean, entityBean));
- }
- }
- return entityBean;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ContainerManagedEntity basicGetEntityBean() {
- return entityBean;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setEntityBean(ContainerManagedEntity newEntityBean) {
- ContainerManagedEntity oldEntityBean = entityBean;
- entityBean = newEntityBean;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.ROLE_SOURCE__ENTITY_BEAN, oldEntityBean, entityBean));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList getDescriptions() {
- if (descriptions == null) {
- descriptions = new EObjectContainmentEList(Description.class, this, EjbPackage.ROLE_SOURCE__DESCRIPTIONS);
- }
- return descriptions;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.ROLE_SOURCE__ROLE:
- if (eInternalContainer() != null)
- msgs = eBasicRemoveFromContainer(msgs);
- return basicSetRole((EJBRelationshipRole)otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case EjbPackage.ROLE_SOURCE__ROLE:
- return basicSetRole(null, msgs);
- case EjbPackage.ROLE_SOURCE__DESCRIPTIONS:
- return ((InternalEList)getDescriptions()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
- switch (eContainerFeatureID) {
- case EjbPackage.ROLE_SOURCE__ROLE:
- return eInternalContainer().eInverseRemove(this, EjbPackage.EJB_RELATIONSHIP_ROLE__SOURCE, EJBRelationshipRole.class, msgs);
- }
- return super.eBasicRemoveFromContainerFeature(msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.ROLE_SOURCE__DESCRIPTION:
- return getDescription();
- case EjbPackage.ROLE_SOURCE__ROLE:
- return getRole();
- case EjbPackage.ROLE_SOURCE__ENTITY_BEAN:
- if (resolve) return getEntityBean();
- return basicGetEntityBean();
- case EjbPackage.ROLE_SOURCE__DESCRIPTIONS:
- return getDescriptions();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.ROLE_SOURCE__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case EjbPackage.ROLE_SOURCE__ROLE:
- setRole((EJBRelationshipRole)newValue);
- return;
- case EjbPackage.ROLE_SOURCE__ENTITY_BEAN:
- setEntityBean((ContainerManagedEntity)newValue);
- return;
- case EjbPackage.ROLE_SOURCE__DESCRIPTIONS:
- getDescriptions().clear();
- getDescriptions().addAll((Collection)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.ROLE_SOURCE__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case EjbPackage.ROLE_SOURCE__ROLE:
- setRole((EJBRelationshipRole)null);
- return;
- case EjbPackage.ROLE_SOURCE__ENTITY_BEAN:
- setEntityBean((ContainerManagedEntity)null);
- return;
- case EjbPackage.ROLE_SOURCE__DESCRIPTIONS:
- getDescriptions().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.ROLE_SOURCE__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case EjbPackage.ROLE_SOURCE__ROLE:
- return getRole() != null;
- case EjbPackage.ROLE_SOURCE__ENTITY_BEAN:
- return entityBean != null;
- case EjbPackage.ROLE_SOURCE__DESCRIPTIONS:
- return descriptions != null && !descriptions.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (description: ");
- result.append(description);
- result.append(')');
- return result.toString();
- }
-
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SessionImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SessionImpl.java
deleted file mode 100644
index 7845d9ad4..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SessionImpl.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.ejb.SessionType;
-import org.eclipse.jst.j2ee.ejb.TransactionType;
-
-/**
- * The session element declares an session bean. The declaration consists of: an optional description; optional display name; optional small icon file name; optional large icon file name; a name assigned
- * to the enterprise bean in the deployment description; the names of the session bean's home and remote interfaces, if any; the names of the session bean's local home and local interfaces, if any; the session bean's implementation class; the session bean's state management type; the session bean's transaction management type; an optional declaration of the bean's environment entries; an optional declaration of the bean's EJB references; an optional declaration of the bean's local EJB references; an optional declaration of the security role references; an optional declaration of the security identity to be used for the execution of the bean's methods; an optional declaration of the bean's resource manager connection factory references; and an optional declaration of the bean's resource environment references. The elements that are optional are "optional" in the sense that they are omitted when if lists represented by them are empty.
- */
-public class SessionImpl extends EnterpriseBeanImpl implements Session, EnterpriseBean {
-
- /**
- * The default value of the '{@link #getTransactionType() <em>Transaction Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTransactionType()
- * @generated
- * @ordered
- */
- protected static final TransactionType TRANSACTION_TYPE_EDEFAULT = TransactionType.BEAN_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected TransactionType transactionType = TRANSACTION_TYPE_EDEFAULT;
- /**
- * This is true if the Transaction Type attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean transactionTypeESet = false;
-
- /**
- * The default value of the '{@link #getSessionType() <em>Session Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSessionType()
- * @generated
- * @ordered
- */
- protected static final SessionType SESSION_TYPE_EDEFAULT = SessionType.STATEFUL_LITERAL;
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- protected SessionType sessionType = SESSION_TYPE_EDEFAULT;
- /**
- * This is true if the Session Type attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean sessionTypeESet = false;
-
- /**
- * The cached value of the '{@link #getServiceEndpoint() <em>Service Endpoint</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getServiceEndpoint()
- * @generated
- * @ordered
- */
- protected JavaClass serviceEndpoint = null;
-
- public SessionImpl() {
- super();
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EClass eStaticClass() {
- return EjbPackage.Literals.SESSION;
- }
-
- public boolean isSession() {
- return true;
- }
- /**
- * @generated This field/method will be replaced during code generation
- * The transaction-type element specifies an enterprise bean's transaction management type.
- *
-
- */
- public TransactionType getTransactionType() {
- return transactionType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTransactionType(TransactionType newTransactionType) {
- TransactionType oldTransactionType = transactionType;
- transactionType = newTransactionType == null ? TRANSACTION_TYPE_EDEFAULT : newTransactionType;
- boolean oldTransactionTypeESet = transactionTypeESet;
- transactionTypeESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__TRANSACTION_TYPE, oldTransactionType, transactionType, !oldTransactionTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetTransactionType() {
- TransactionType oldTransactionType = transactionType;
- boolean oldTransactionTypeESet = transactionTypeESet;
- transactionType = TRANSACTION_TYPE_EDEFAULT;
- transactionTypeESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.SESSION__TRANSACTION_TYPE, oldTransactionType, TRANSACTION_TYPE_EDEFAULT, oldTransactionTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetTransactionType() {
- return transactionTypeESet;
- }
-
- /**
- * @generated This field/method will be replaced during code generation
- */
- public SessionType getSessionType() {
- return sessionType;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSessionType(SessionType newSessionType) {
- SessionType oldSessionType = sessionType;
- sessionType = newSessionType == null ? SESSION_TYPE_EDEFAULT : newSessionType;
- boolean oldSessionTypeESet = sessionTypeESet;
- sessionTypeESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__SESSION_TYPE, oldSessionType, sessionType, !oldSessionTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetSessionType() {
- SessionType oldSessionType = sessionType;
- boolean oldSessionTypeESet = sessionTypeESet;
- sessionType = SESSION_TYPE_EDEFAULT;
- sessionTypeESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, EjbPackage.SESSION__SESSION_TYPE, oldSessionType, SESSION_TYPE_EDEFAULT, oldSessionTypeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetSessionType() {
- return sessionTypeESet;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass getServiceEndpoint() {
- if (serviceEndpoint != null && serviceEndpoint.eIsProxy()) {
- InternalEObject oldServiceEndpoint = (InternalEObject)serviceEndpoint;
- serviceEndpoint = (JavaClass)eResolveProxy(oldServiceEndpoint);
- if (serviceEndpoint != oldServiceEndpoint) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EjbPackage.SESSION__SERVICE_ENDPOINT, oldServiceEndpoint, serviceEndpoint));
- }
- }
- return serviceEndpoint;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public JavaClass basicGetServiceEndpoint() {
- return serviceEndpoint;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setServiceEndpoint(JavaClass newServiceEndpoint) {
- JavaClass oldServiceEndpoint = serviceEndpoint;
- serviceEndpoint = newServiceEndpoint;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EjbPackage.SESSION__SERVICE_ENDPOINT, oldServiceEndpoint, serviceEndpoint));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case EjbPackage.SESSION__TRANSACTION_TYPE:
- return getTransactionType();
- case EjbPackage.SESSION__SESSION_TYPE:
- return getSessionType();
- case EjbPackage.SESSION__SERVICE_ENDPOINT:
- if (resolve) return getServiceEndpoint();
- return basicGetServiceEndpoint();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case EjbPackage.SESSION__TRANSACTION_TYPE:
- setTransactionType((TransactionType)newValue);
- return;
- case EjbPackage.SESSION__SESSION_TYPE:
- setSessionType((SessionType)newValue);
- return;
- case EjbPackage.SESSION__SERVICE_ENDPOINT:
- setServiceEndpoint((JavaClass)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void eUnset(int featureID) {
- switch (featureID) {
- case EjbPackage.SESSION__TRANSACTION_TYPE:
- unsetTransactionType();
- return;
- case EjbPackage.SESSION__SESSION_TYPE:
- unsetSessionType();
- return;
- case EjbPackage.SESSION__SERVICE_ENDPOINT:
- setServiceEndpoint((JavaClass)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case EjbPackage.SESSION__TRANSACTION_TYPE:
- return isSetTransactionType();
- case EjbPackage.SESSION__SESSION_TYPE:
- return isSetSessionType();
- case EjbPackage.SESSION__SERVICE_ENDPOINT:
- return serviceEndpoint != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (transactionType: ");
- if (transactionTypeESet) result.append(transactionType); else result.append("<unset>");
- result.append(", sessionType: ");
- if (sessionTypeESet) result.append(sessionType); else result.append("<unset>");
- result.append(')');
- return result.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ejb.Session#setServiceEndpointName(java.lang.String)
- */
- public void setServiceEndpointName(String serviceEndpointName) {
- eSet(EjbPackage.eINSTANCE.getSession_ServiceEndpoint(), createClassRef(serviceEndpointName));
- }
- /*
- * @see EnterpriseBean#hasLocalClient()
- */
- public boolean hasServiceEndpoint() {
- return getServiceEndpoint() != null;
- }
- public String getServiceEndpointName() {
- getServiceEndpoint();
- return serviceEndpoint == null ? null : serviceEndpoint.getQualifiedName();
- }
-}
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SupertypeCMPAttributeFilter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SupertypeCMPAttributeFilter.java
deleted file mode 100644
index 7e203cdfa..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SupertypeCMPAttributeFilter.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * 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.impl;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper;
-
-
-/**
- * Insert the type's description here.
- * Creation date: (11/28/2000 6:54:26 PM)
- * @author: Administrator
- */
-public abstract class SupertypeCMPAttributeFilter extends ContainerManagedEntityFilter {
-/**
- * SupertypeCMPAttributeFilter constructor comment.
- */
-public SupertypeCMPAttributeFilter() {
- super();
-}
-/**
- * filter method comment.
- */
-public List filter(ContainerManagedEntity cmp) {
- ContainerManagedEntity supertype = null;
- EjbModuleExtensionHelper extensionHelper = getEjbModuleExtHelper(cmp);
- if(extensionHelper != null)
- supertype = (ContainerManagedEntity)extensionHelper.getSuperType(cmp);
- if (supertype == null)
- return getSourceAttributes(cmp);
- return filterUsingSupertype(cmp, supertype);
-}
-/**
- * filter method comment.
- */
-protected java.util.List filterUsingSupertype(ContainerManagedEntity cmp, ContainerManagedEntity supertype) {
- ContainerManagedEntity superEntity = supertype;
- List result = new ArrayList();
- Iterator it = getSourceAttributes(cmp).iterator();
- CMPAttribute attribute;
- while (it.hasNext()) {
- attribute = (CMPAttribute) it.next();
- if (!isSupertypeAttribute(superEntity, attribute))
- result.add(attribute);
- }
- return result;
-}
-/**
- * Return the proper list of attributes from cmpExt.
- */
-protected abstract java.util.List getSourceAttributes(ContainerManagedEntity cmp) ;
-/**
- * Return a boolean indicating whether anAttribute also exists in the superEntity.
- */
-protected abstract boolean isSupertypeAttribute(ContainerManagedEntity superEntity, CMPAttribute anAttribute) ;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPFieldDescriptor.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPFieldDescriptor.java
deleted file mode 100644
index 8c6d067de..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPFieldDescriptor.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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;
-
-/**
- * A parameter descriptor is used to describe a method parameter.
- * It holds the parameter name and type. The type is held in
- * Java readable form (not a signature).
- */
-public class CMPFieldDescriptor {
- private String fType = null;
- private String fName = null;
-/**
- * JavaParameterDescriptor default constructor.
- */
-public CMPFieldDescriptor() {
- super();
-}
-/**
- * @return the parameter name.
- */
-public String getName() {
- return fName;
-}
-/**
- * Returns the parameter type.
- * @return The parameter type in Java readable form (not a signature)
- */
-public String getType() {
- return fType;
-}
-/**
- * Sets the parameter name.
- */
-public void setName(String newName) {
- fName = (newName == null) ? null : newName.trim();
-}
-/**
- * Sets the parameter type.
- * @param newType The parameter name in Java readable form (not a signature)
- */
-public void setType(String newType) {
- fType = (newType == null) ? null : newType.trim();
-}
-/**
- * Returns "type name". The {@link JavaParameterDescriptor#getType()}
- * and {@link JavaParameterDescriptor#getName()} methods are used
- * to build the result.
- */
-public String toString() {
- StringBuffer sb = new StringBuffer(100);
- sb.append(getType());
- sb.append(' ');
- sb.append(getName());
- return sb.toString();
-}
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPHelper.java
deleted file mode 100644
index 06c45af2e..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPHelper.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * 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 java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jem.java.Field;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaHelpers;
-import org.eclipse.jem.java.JavaParameter;
-import org.eclipse.jem.java.JavaVisibilityKind;
-import org.eclipse.jem.java.Method;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-
-
-public class CMPHelper {
-
- public static final String GET = "get"; //$NON-NLS-1$
- public static final String SET = "set"; //$NON-NLS-1$
- protected static Comparator methodComparator = new Comparator() {
- /**
- * @see Comparator#compare(Object, Object)
- */
- public int compare(Object o1, Object o2) {
- Method m1 = (Method) o1;
- Method m2 = (Method) o2;
- String s1 = m1.getName();
- String s2 = m2.getName();
- if (s1 == null)
- return "".compareTo(s2); //$NON-NLS-1$
- return s1.compareTo(s2);
- }
- };
-
- public interface CMPFieldExistTester {
- boolean isExisting(Field aField);
- boolean isExisting(Method aMethod);
- }
-
- protected CMPHelper() {
- super();
- }
-
- /**
- * For CMP 2.0 beans, the bean class is abstract and
- * contains abstract get/set methods for the fields
- * This infers the those fields based on the get/set methods
- *
- * @return java.util.List of {@link CMPFieldDescriptor}
- */
- public static List getAvailableCMP20FieldDescriptors(JavaClass beanClass) {
- return getAvailableCMP20FieldDescriptors(beanClass, null);
- }
-
- /**
- * For CMP 2.0 beans, the bean class is abstract and
- * contains abstract get/set methods for the fields
- * This infers the those fields based on the get/set methods
- *
- * @return java.util.List of {@link CMPFieldDescriptor}
- */
- public static List getAvailableCMP20FieldDescriptors(JavaClass beanClass, CMPHelper.CMPFieldExistTester fieldTester) {
- if (beanClass == null)
- return Collections.EMPTY_LIST;
- List result = new ArrayList();
- Map getters = new HashMap();
- List methods = beanClass.getPublicMethodsExtended();
- Collections.sort(methods, methodComparator);
- for (int i = 0; i < methods.size(); i++) {
- Method aMethod = (Method) methods.get(i);
- if (isGetter(aMethod) && aMethod.isAbstract() && !aMethod.isStatic() &&
- (fieldTester == null || fieldTester.isExisting(aMethod)))
- getters.put(getFieldName(aMethod), aMethod);
- else if (isSetter(aMethod) && aMethod.isAbstract() && !aMethod.isStatic()) {
- String fieldName = getFieldName(aMethod);
- Method getter = (Method) getters.get(fieldName);
- if (typesAgree(getter, aMethod)) {
- String typeName = getReturnTypeName(getter);
- if (typeName != null && (fieldTester == null || fieldTester.isExisting(getter)))
- result.add(createFieldDescriptor(fieldName, typeName));
- }
- }
- }
- return result;
- }
-
- /**
- * For CMP 1.1 beans, the list is simply the fields, extended,
- * on the bean class
- *
- * @return java.util.List of {@link CMPFieldDescriptor}
- */
- public static List getAvailableCMP11FieldDescriptors(JavaClass beanClass) {
- return getAvailableCMP11FieldDescriptors(beanClass, null);
- }
-
- /**
- * For CMP 1.1 beans, the list is simply the fields, extended,
- * on the bean class
- *
- * @return java.util.List of {@link CMPFieldDescriptor}
- */
- public static List getAvailableCMP11FieldDescriptors(JavaClass beanClass, CMPHelper.CMPFieldExistTester fieldTester) {
- if (beanClass == null)
- return Collections.EMPTY_LIST;
- List fields = beanClass.getFieldsExtended();
- List result = new ArrayList();
- for (int i = 0; i < fields.size(); i++) {
- Field aField = (Field) fields.get(i);
- if (!isPublic(aField) || aField.isStatic() || aField.isTransient() ||
- (fieldTester != null && !fieldTester.isExisting(aField)))
- continue;
- String name = aField.getName();
- String typeName = getTypeName(aField);
- if (typeName != null && name != null)
- result.add(createFieldDescriptor(name, typeName));
- }
- return result;
- }
-
- /**
- * Get a list of available cmp fields for the CMP bean; if the bean
- * is v1.1, this is the fields on the bean class; if it is 2.0, this
- * is defined by the abstract get/set methods on the bean class
- *
- * @return java.util.List of {@link CMPFieldDescriptor}
- */
- public static List getAvailableCMPFieldDescriptors(ContainerManagedEntity cmpBean) {
- return getAvailableCMPFieldDescriptors(cmpBean, null);
- }
-
- /**
- * Get a list of available cmp fields for the CMP bean; if the bean
- * is v1.1, this is the fields on the bean class; if it is 2.0, this
- * is defined by the abstract get/set methods on the bean class
- *
- * @return java.util.List of {@link CMPFieldDescriptor}
- */
- public static List getAvailableCMPFieldDescriptors(ContainerManagedEntity cmpBean, CMPHelper.CMPFieldExistTester fieldTester) {
- JavaClass beanClass = cmpBean.getEjbClass();
- if (beanClass == null)
- return Collections.EMPTY_LIST;
- switch(cmpBean.getVersionID()) {
- case J2EEVersionConstants.EJB_1_0_ID:
- case J2EEVersionConstants.EJB_1_1_ID:
- return getAvailableCMP11FieldDescriptors(beanClass, fieldTester);
- case J2EEVersionConstants.EJB_2_0_ID:
- case J2EEVersionConstants.EJB_2_1_ID: default:
- return getAvailableCMP20FieldDescriptors(beanClass, fieldTester);
- }
- }
-
- /**
- * Does the method name start with "get", and is the method a zero arg
- * method, that does not return void?
- */
- protected static boolean isGetter(Method aMethod) {
- String name = aMethod.getName();
- return name != null &&
- name.startsWith(GET) &&
- name.length() > 3 &&
- aMethod.listParametersWithoutReturn().length==0 &&
- !aMethod.isVoid();
- }
-
-
- /**
- * Does the method name start with "get", and is the method a one arg
- * method, that is void
- */
- protected static boolean isSetter(Method aMethod) {
- String name = aMethod.getName();
- return name != null &&
- name.startsWith(SET) &&
- name.length() > 3 &&
- aMethod.listParametersWithoutReturn().length == 1 &&
- aMethod.isVoid();
- }
-
- protected static String getFieldName(Method aMethod) {
- if (aMethod == null)
- return null;
-
- return getFieldName(aMethod.getName());
- }
-
- public static String getFieldName(String methodName) {
- if (methodName == null)
- return null;
- StringBuffer sb = new StringBuffer(methodName);
- sb.delete(0, 3);
- char lower = Character.toLowerCase(sb.charAt(0));
- sb.setCharAt(0, lower);
- return sb.toString();
- }
-
- protected static String getReturnTypeName(Method getter) {
- if (getter == null)
- return null;
- JavaHelpers retType = getter.getReturnType();
- return getTypeName(retType);
- }
-
- protected static String getTypeName(Field aField) {
- if (aField == null)
- return null;
- JavaHelpers type = (JavaHelpers)aField.getEType();
- return getTypeName(type);
- }
-
- protected static String getTypeName(JavaHelpers helpers) {
- if (helpers == null)
- return null;
- return helpers.getQualifiedName();
- }
- /**
- * Precondition: setter must take one parameter, and getter must return
- * a type, not void
- */
- protected static boolean typesAgree(Method getter, Method setter) {
- if (getter == null || getter.isVoid() || setter == null)
- return false;
-
- JavaParameter[] parameters = setter.listParametersWithoutReturn();
- if (parameters.length != 1)
- return false;
-
- JavaParameter param = parameters[0];
- return param.getEType() != null &&
- param.getEType() == getter.getReturnType();
- }
-
- protected static CMPFieldDescriptor createFieldDescriptor(String name, String typeName) {
- CMPFieldDescriptor desc = new CMPFieldDescriptor();
- desc.setName(name);
- desc.setType(typeName);
- return desc;
- }
-
- protected static boolean isPublic(Field field) {
- if (field == null)
- return false;
- return (JavaVisibilityKind.PUBLIC_LITERAL.getValue() == field.getJavaVisibility().getValue());
- }
-
-
-
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPKeySynchronizationAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPKeySynchronizationAdapter.java
deleted file mode 100644
index 8332dde68..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CMPKeySynchronizationAdapter.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-/*
- * Created on Oct 24, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.ejb.internal.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jem.java.Field;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaVisibilityKind;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EjbFactory;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.internal.impl.ContainerManagedEntityImpl;
-
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class CMPKeySynchronizationAdapter extends AdapterImpl {
-
- public static final String ADAPTER_TYPE = CMPKeySynchronizationAdapter.class.getName();
-
- private boolean initialized = false;
-
- protected ContainerManagedEntity cmp = null;
- private boolean isUpdating = false;
- private boolean isEnabled = true;
-
- /**
- * Default constructor
- */
- public CMPKeySynchronizationAdapter(ContainerManagedEntity cmp) {
- super();
- this.cmp = cmp;
- }
-
- /**
- * If the keyAttributes list is empty, try to reflect
- * the keyAttributes from the fields of the primaryKey class.
- */
- public void initializeKeyAttributes() {
- if(cmp == null || initialized)
- return;
- //Disable notifications while we initialize
- cmp.eSetDeliver(false);
- try {
- Resource res = cmp.eResource();
- if(res == null)
- return;
- boolean cachedIsModified = res.isModified();
- try {
- // Handle primkeyfield scenario
- if (cmp.getPrimKeyField()!=null)
- initializeForPrimKey();
- // Handle compound key scenario
- else
- initializeForCompoundKey();
- } finally {
- res.setModified(cachedIsModified);
- }
- } finally {
- cmp.eSetDeliver(true);
- initialized = true;
- }
- }
-
- protected void initializeForPrimKey() {
- // Ensure the key attributes list contains only the primKeyField attribute
- if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(cmp.getPrimKeyField())))
- primKeyFieldChanged(cmp.getPrimKeyField());
- }
-
- protected void initializeForCompoundKey() {
- List keys = getKeyAttributes();
- // clear key list
- keys.clear();
- //ensure the key class is not null
- JavaClass keyClass = cmp.getPrimaryKey();
- if (keyClass == null)
- return;
- keyClass.eAdapters().add(this);
-
- // reflect key fields into key attributes list
- List keyFields = keyClass.getFieldsExtended();
- for (int i = 0; i < keyFields.size(); i++) {
- Field field = (Field) keyFields.get(i);
- if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) { //only public fields
- CMPAttribute keyAttribute = cmp.getPersistentAttribute(field.getName());
- if (keyAttribute != null)
- keys.add(keyAttribute);
- }
- }
- }
-
- public void notifyChanged(Notification notification) {
- if (isUpdating || !isEnabled) return; //we don't want to react to our own changes
- try {
- isUpdating = true;
- EClass featureClass = ((EObject)notification.getNotifier()).eClass();
- if (EjbPackage.eINSTANCE.getContainerManagedEntity().equals(featureClass)) {
- switch (notification.getFeatureID(ContainerManagedEntity.class)) {
- // handle if cmp attribute is updated, added, removed
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PERSISTENT_ATTRIBUTES : {
- handleCMPAttributeEvent(notification);
- break;
- }
- // handle the key attributes list is updated programatically
- case EjbPackage.CONTAINER_MANAGED_ENTITY__KEY_ATTRIBUTES : {
- handleCMPAttributeEvent(notification);
- break;
- }
- // handle if the key class is changed,added, removed
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIMARY_KEY : {
- handleKeyClassEvent(notification);
- break;
- }
- // handle prim key field sets, adds, removes
- case EjbPackage.CONTAINER_MANAGED_ENTITY__PRIM_KEY_FIELD : {
- handlePrimKeyFieldEvent(notification);
- break;
- }
- }
- } else if (EjbPackage.eINSTANCE.getCMPAttribute().equals(featureClass)) {
- switch (notification.getFeatureID(CMPAttribute.class)) {
- // handle a set or change of an attribute name
- case (EjbPackage.CMP_ATTRIBUTE__NAME) : {
- handleCMPAttributeRenameEvent((CMPAttribute)notification.getNotifier(), notification.getOldValue());
- break;
- }
- }
- }
- } finally {
- // restore initial notification state
- isUpdating = false;
- }
- }
-
- /**
- * @param attribute
- */
- private void handleCMPAttributeRenameEvent(CMPAttribute attribute, Object oldValue) {
- // if renamed attribute was in key and is not anymore, remove it from key list
- if (getKeyAttributes().contains(attribute)) {
- if (!isAttributeKeyClassField(attribute.getName()))
- removeKeyAttribute(attribute,(String)oldValue);
- }
- // if renamed attribute is now part of the key, add it to the key list
- else
- attributeAdded(attribute);
- }
-
- /**
- * @param notification
- */
- private void handlePrimKeyFieldEvent(Notification notification) {
- EObject newPrimKeyField = (EObject)notification.getNewValue();
- cmp.setPrimKeyField((CMPAttribute)newPrimKeyField);
- // if primKeyField is removed or a proxy, recompute key attributes based on key class
- if (newPrimKeyField == null || newPrimKeyField.eIsProxy()) {
- CMPAttribute primField = (CMPAttribute)newPrimKeyField;
- if (primField!=null && primField.getName() == null) {
- primField.setName(((InternalEObject)primField).eProxyURI().toString());
- makePrimKeyFieldProxy(primField.getName());
- }
- removeAllKeyAttributes();
- initialized = false;
- initializeKeyAttributes();
- }
- // Ensure the key attributes list contains only the primKeyField attribute
- else if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(newPrimKeyField))) {
- primKeyFieldChanged(newPrimKeyField);
- }
-
- }
-
- /**
- * @param notification
- */
- private void handleKeyClassEvent(Notification notification) {
- // if primkey null or proxy, clear key fields and reinitialize if key class not null
- if (cmp.getPrimKeyField()==null || cmp.getPrimKeyField().eIsProxy()) {
- keyClassChanged();
- }
- // if primkey is not null, then do nothing
-
- }
-
- /**
- * @param notification
- */
- private void handleCMPAttributeEvent(Notification notification) {
- int eventType = notification.getEventType();
- // handle a CMPAttribute added
- if (eventType == Notification.ADD) {
- attributeAdded((CMPAttribute)notification.getNewValue());
- }
- // handle a CMPAttribute removed
- else if (eventType == Notification.REMOVE) {
- CMPAttribute attribute = (CMPAttribute)notification.getOldValue();
- // remove this adapter from the deleted attribute
- attribute.eAdapters().remove(this);
- removeKeyAttribute(attribute, attribute.getName());
-
- }
- }
-
- protected void removeKeyAttribute(CMPAttribute attribute, String oldName) {
-
- // if attribute was a key attribute it will be removed, otherwise do nothing
- getKeyAttributes().remove(attribute);
-
- // if it is the prim key attribute, then make the prim key attribute a proxy
- if (cmp.getPrimKeyField()!=null && cmp.getPrimKeyField().equals(attribute)) {
- makePrimKeyFieldProxy(oldName);
- }
-
- }
-
- public void makePrimKeyFieldProxy(String oldName) {
- if (cmp.getPrimKeyField() == null) return;
- cmp.setPrimKeyField(EjbFactory.eINSTANCE.createCMPAttribute());
- cmp.getPrimKeyField().setName(oldName);
- ((InternalEObject)cmp.getPrimKeyField()).eSetProxyURI(URI.createURI(oldName));
-
- }
-
- protected void removeAllKeyAttributes() {
- // clear key attributes list on cmp
- getKeyAttributes().clear();
- }
-
- protected void addKeyAttribute(CMPAttribute attribute) {
-
- CMPAttribute primKeyField = cmp.getPrimKeyField();
- // if prim key is null add attribute to key list
- if (primKeyField==null || primKeyField.eIsProxy()) {
- if (!getKeyAttributes().contains(attribute))
- getKeyAttributes().add(attribute);
- // if att is only key att, and type is the key class type, set the prim key field
- if (getKeyAttributes().size()==1 && attribute.getType().equals(cmp.getPrimaryKey()))
- cmp.setPrimKeyField(attribute);
- }
- // if primkey set + primkeyfield is the new attribute ensure its the only one
- else if (primKeyField.equals(attribute)) {
- if (!(getKeyAttributes().size()==1 && getKeyAttributes().contains(attribute))) {
- getKeyAttributes().clear();
- getKeyAttributes().add(attribute);
- }
- }
- // if primkey set,new attribute not prim key, key atts > 1, remove primkey field
- else {
- cmp.setPrimKeyField(null);
- if (!getKeyAttributes().contains(attribute))
- getKeyAttributes().add(attribute);
- }
- }
-
- protected void attributeAdded(CMPAttribute attribute) {
- //Make sure cmp key adapters are initialized if needed
- cmp.getKeyAttributes();
-
- // add this as a listener to name changes on this attribute
- if (!attribute.eAdapters().contains(this))
- attribute.eAdapters().add(this);
-
- if (attribute.getName() ==null) return;
- // add it to the key list if applicable and sort the key list
- if (isAttributeKeyClassField(attribute.getName())) {
- addKeyAttribute(attribute);
- sortKeyAttributeList();
- }
- // if new attribute name is now prim key name, fix up prim key field
- else if (cmp.getPrimKeyField()!=null && cmp.getPrimKeyField().eIsProxy() && attribute.getName().equals(cmp.getPrimKeyField().getName())) {
- cmp.setPrimKeyField(attribute);
- primKeyFieldChanged(attribute);
- }
- }
-
-
- /**
- * Is the cmp attribute also a field in the key class?
- */
- protected boolean isAttributeKeyClassField(String attributeName) {
- // ensure key class is not null
- JavaClass keyClass = cmp.getPrimaryKey();
- if (keyClass == null)
- return false;
- // see if the attribute name matchs any of the reflected key class public field names
- List keyFields = keyClass.getFieldsExtended();
- for (int i = 0; i < keyFields.size(); i++) {
- Field field = (Field) keyFields.get(i);
- if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) {
- if (field.getName().equals(attributeName))
- return true;
- }
- }
- return false;
- }
-
- /**
- * Sort the list of the key attributes to match the order of the key class
- */
- private void sortKeyAttributeList() {
-
- List result = new ArrayList();
- JavaClass keyClass = cmp.getPrimaryKey();
- if (keyClass == null) return;
- List keyFields = keyClass.getFieldsExtended();
- List currentKeys = getKeyAttributes();
-
- // create a new list of the attributes in order of key class fields.
- for (int i = 0; i < keyFields.size(); i++) {
- Field field = (Field) keyFields.get(i);
- if (field.getJavaVisibility() == JavaVisibilityKind.PUBLIC_LITERAL) { //only public fields
- for (int j=0; j<currentKeys.size(); j++) {
- CMPAttribute attribute = (CMPAttribute) currentKeys.get(j);
- if (field.getName().equals(attribute.getName()))
- result.add(attribute);
- }
- }
- }
- //clear list and set the new key attribute order on the cmp
- getKeyAttributes().clear();
- getKeyAttributes().addAll(result);
- }
-
- protected void keyClassChanged() {
- JavaClass key = cmp.getPrimaryKey();
- if (key !=null)
- key.eAdapters().remove(this);
- // if not prim key class, clear key attribute list
- removeAllKeyAttributes();
- initialized = false;
- initializeKeyAttributes();
- }
-
- protected void primKeyFieldChanged(EObject primKeyField) {
- // if a primKeyField is added, do a remove all and an add
- removeAllKeyAttributes();
-
- if (primKeyField != null && !primKeyField.eIsProxy()) {
- if (!primKeyField.eAdapters().contains(this))
- primKeyField.eAdapters().add(this);
- getKeyAttributes().add(primKeyField);
- }
- }
-
- private EList getKeyAttributes() {
- return ((ContainerManagedEntityImpl)cmp).getKeyAttributesGen();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#setTarget(org.eclipse.emf.common.notify.Notifier)
- */
- public void setTarget(Notifier newTarget) {
- super.setTarget(newTarget);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#isAdapterForType(java.lang.Object)
- */
- public boolean isAdapterForType(Object type) {
- return ADAPTER_TYPE.equals(type);
- }
- //To turn sync on or off
- public void setEnabled(boolean enabled){
- isEnabled = enabled;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CommonRelationshipAttributeMaintenanceAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CommonRelationshipAttributeMaintenanceAdapter.java
deleted file mode 100644
index 4ad56a3bb..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/CommonRelationshipAttributeMaintenanceAdapter.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * 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 java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CommonRelationship;
-import org.eclipse.jst.j2ee.ejb.CommonRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.internal.impl.EjbFactoryImpl;
-
-public abstract class CommonRelationshipAttributeMaintenanceAdapter extends AdapterImpl {
- protected static EjbPackage EJB_PACK = EjbFactoryImpl.getPackage();
- /**
- * Constructor for CommonRelationshipAttributeMaintenanceAdapter.
- */
- public CommonRelationshipAttributeMaintenanceAdapter() {
- super();
- }
- /**
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(Notification)
- */
- public void notifyChanged(Notification msg) {
- switch (msg.getEventType()) {
- case Notification.ADD :
- addedNotification(msg);
- break;
- case Notification.REMOVE :
- removedNotification(msg);
- break;
- }
- }
- protected void addedNotification(Notification msg) {
- if ((EStructuralFeature)msg.getFeature() == EJB_PACK.getContainerManagedEntity_KeyAttributes())
- addedKeyAttribute((ContainerManagedEntity) msg.getNotifier(), (CMPAttribute) msg.getNewValue());
- else if (isRelationshipsSF((EStructuralFeature)msg.getFeature()))
- added();
- else if (isRelationshipRolesSF((EStructuralFeature)msg.getFeature()))
- addedRole((CommonRelationshipRole) msg.getNewValue());
- }
- protected void removedNotification(Notification msg) {
- if ((EStructuralFeature)msg.getFeature() == EJB_PACK.getContainerManagedEntity_KeyAttributes())
- removedKeyAttribute((ContainerManagedEntity) msg.getNotifier(), (CMPAttribute) msg.getOldValue());
- else if (isRelationshipsSF((EStructuralFeature)msg.getFeature()))
- removed();
- else if (isRelationshipRolesSF((EStructuralFeature)msg.getFeature()))
- removedRole((CommonRelationshipRole) msg.getOldValue());
- }
- protected abstract boolean isRelationshipRolesSF(EObject sf);
- protected abstract boolean isRelationshipsSF(EObject sf);
- //Same as the add
- private void removedKeyAttribute(ContainerManagedEntity aCMPEntity, CMPAttribute cmpAttribute) {
- addedKeyAttribute(aCMPEntity, cmpAttribute);
- }
- protected void addedKeyAttribute(ContainerManagedEntity aCMPEntity, CMPAttribute newAttribute) {
- CommonRelationshipRole role, inverse;
- role = getRole(aCMPEntity);
- if (role != null && !role.isForward()) {
- inverse = role.getOppositeAsCommonRole();
- if (inverse != null)
- inverse.reconcileAttributes();
- }
- }
- protected CommonRelationshipRole getRole(ContainerManagedEntity aCMPEntity) {
- CommonRelationship relation = getRelationship();
- if (relation == null) return null;
- List roles = relation.getCommonRoles();
- if (roles.isEmpty())
- return null;
- CommonRelationshipRole role = null;
- for (int i = 0; i < roles.size(); i++) {
- role = (CommonRelationshipRole) roles.get(i);
- if (role.getSourceEntity() == aCMPEntity)
- return role;
- }
- return role;
- }
- protected CommonRelationship getRelationship() {
- return (CommonRelationship) getTarget();
- }
- protected void reconcileRoleAttributes() {
- List roles = getRelationship().getCommonRoles();
- if (roles.isEmpty())
- return;
- CommonRelationshipRole role = null;
- for (int i = 0; i < roles.size(); i++) {
- role = (CommonRelationshipRole) roles.get(i);
- role.reconcileAttributes();
- }
- }
- protected void added() {
- reconcileRoleAttributes();
- }
- protected void removed() {
- if (getRelationship().getCommonRoles().size() > 1) {
- //remove one force a disconnect
- getRelationship().getCommonRoles().remove(0);
- }
- }
- /**
- * Add this Adapter to @aRole and the ContainerManagedEntity
- * that the ContainerManagedEntityExtension container is pointing to.
- * This only works if @aRole is contained.
- */
- protected void addAdaptors(CommonRelationshipRole aRole) {
- removeAdaptors(aRole); //to ensure this adapter is not added twice
- aRole.eAdapters().add(this);
- ContainerManagedEntity cmp = aRole.getSourceEntity();
- if (cmp != null)
- cmp.eAdapters().add(this);
- }
- /**
- * Remove this Adapter from @aRole and the ContainerManagedEntity
- * that the ContainerManagedEntityExtension container is pointing to.
- * This only works if @aRole is contained.
- */
- protected void removeAdaptors(CommonRelationshipRole aRole) {
- aRole.eAdapters().remove(this);
- ContainerManagedEntity cmp = aRole.getSourceEntity();
- if (cmp != null)
- cmp.eAdapters().remove(this);
- }
- protected void addedRole(CommonRelationshipRole aRole) {
- addAdaptors(aRole);
- if ((getRelationship().eContainer() != null) && rolesFullyReflected())
- reconcileRoleAttributes();
- }
- protected boolean rolesFullyReflected() {
- List roles = getRelationship().getCommonRoles();
- if (roles.isEmpty())
- return false;
- CommonRelationshipRole role = null;
- for (int i = 0; i < roles.size(); i++) {
- role = (CommonRelationshipRole) roles.get(i);
- if (role.getSourceEntity() == null)
- return false;
- }
- return true;
- }
-
- protected void removedRole(CommonRelationshipRole aRole) {
- removeAdaptors(aRole);
- if (getRelationship().eContainer() != null) {
- aRole.reconcileAttributes();
- reconcileRoleAttributes();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#setTarget(org.eclipse.emf.common.notify.Notifier)
- */
- public void setTarget(Notifier notifier) {
- //Only set the target if it is a CommonRelationship
- if (notifier == null || notifier instanceof CommonRelationship)
- super.setTarget(notifier);
- }
-
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/ConvertedEJBAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/ConvertedEJBAdapter.java
deleted file mode 100644
index d2ac77f2f..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/ConvertedEJBAdapter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * 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.impl.AdapterImpl;
-
-public class ConvertedEJBAdapter extends AdapterImpl {
-
- public static final String ADAPTER_KEY = "ConvertedEJBAdpater"; //$NON-NLS-1$
- public static final int VERSION_1_0 = 1;
-
- protected int version = -1;
- protected boolean readOnly = false;
-
-
- /**
- * Constructor for ConvertedEJBAdapter.
- */
- public ConvertedEJBAdapter() {
- super();
- }
-
- /**
- * Gets the version. This will be one of the static constants.
- * @return Returns a int
- */
- public int getVersion() {
- return version;
- }
-
- /**
- * Sets the version. This should be one of the static constants.
- * @param version The version to set
- */
- public void setVersion(int version) {
- this.version = version;
- }
-
- /**
- * Gets the readOnly.
- * @return Returns a boolean
- */
- public boolean isReadOnly() {
- return readOnly;
- }
-
- /**
- * Sets the readOnly.
- * @param readOnly The readOnly to set
- */
- public void setReadOnly(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
- public boolean isFromVersion1_0() {
- return version == VERSION_1_0;
- }
-
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EJBAttributeMaintenanceFactoryImpl.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EJBAttributeMaintenanceFactoryImpl.java
deleted file mode 100644
index ca5559108..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EJBAttributeMaintenanceFactoryImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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)
- */
- public Adapter createAdapter(Notifier target) {
- Adapter targetAdapter = (Adapter) modelSwitch.doSwitch((EObject)target);
- return ExtendedEcoreUtil.createAdapterForLoading(targetAdapter, (EObject) target);
- }
-
-
- public Adapter createEJBRelationAdapter() {
- return new EJBRelationAttributeMaintenanceAdapter();
- }
-
- public Adapter createRelationshipsAdapter() {
- return new RelationshipsAttributeMaintenanceAdapter();
- }
-
- public boolean isFactoryForType(Object type) {
- return ADAPTER_KEY == type;
- }
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EJBRelationAttributeMaintenanceAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EJBRelationAttributeMaintenanceAdapter.java
deleted file mode 100644
index ebcf71844..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EJBRelationAttributeMaintenanceAdapter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * 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.ecore.EObject;
-
-public class EJBRelationAttributeMaintenanceAdapter extends CommonRelationshipAttributeMaintenanceAdapter {
- /**
- * Constructor for EJBRelationAttributeMaintenanceAdapter.
- * @param aRelationship
- */
- public EJBRelationAttributeMaintenanceAdapter() {
- super();
- }
-
- /**
- * @see org.eclipse.jst.j2ee.ejb.internal.util.CommonRelationshipAttributeMaintenanceAdapter#isRelationshipRolesSF(EObject)
- */
- protected boolean isRelationshipRolesSF(EObject sf) {
- return sf == EJB_PACK.getEJBRelation_RelationshipRoles();
- }
-
- /**
- * @see org.eclipse.jst.j2ee.ejb.internal.util.CommonRelationshipAttributeMaintenanceAdapter#isRelationshipsSF(EObject)
- */
- protected boolean isRelationshipsSF(EObject sf) {
- return sf == EJB_PACK.getRelationships_EjbRelations();
- }
-
- /**
- * @see org.eclipse.emf.common.notify.Adapter#isAdapterForType(Object)
- */
- public boolean isAdapterForType(Object type) {
- return EJBAttributeMaintenanceFactoryImpl.ADAPTER_KEY == type;
- }
-
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EjbAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EjbAdapterFactory.java
deleted file mode 100644
index 412ac027f..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EjbAdapterFactory.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/*******************************************************************************
- * 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.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.ETypedElement;
-import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup;
-import org.eclipse.jst.j2ee.common.DescriptionGroup;
-import org.eclipse.jst.j2ee.common.J2EEEAttribute;
-import org.eclipse.jst.j2ee.common.J2EEEObject;
-import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup;
-import org.eclipse.jst.j2ee.ejb.ActivationConfig;
-import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CMRField;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EJBMethodCategory;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.jst.j2ee.ejb.Query;
-import org.eclipse.jst.j2ee.ejb.QueryMethod;
-import org.eclipse.jst.j2ee.ejb.Relationships;
-import org.eclipse.jst.j2ee.ejb.RoleSource;
-import org.eclipse.jst.j2ee.ejb.Session;
-
-public class EjbAdapterFactory extends AdapterFactoryImpl {
- protected static EjbPackage modelPackage;
- public EjbAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = (EjbPackage) EPackage.Registry.INSTANCE.getEPackage(EjbPackage.eNS_URI);
- }
- }
- public boolean isFactoryForType(Object type) {
- if (type == modelPackage) {
- return true;
- }
- if (type instanceof EObject) {
- return ((EObject) type).eClass().eContainer() == modelPackage;
- }
- return false;
- }
- protected EjbSwitch sw = new EjbSwitch() {
- public Object caseMethodPermission(MethodPermission object) {
- return createMethodPermissionAdapter();
- }
- public Object caseAssemblyDescriptor(AssemblyDescriptor object) {
- return createAssemblyDescriptorAdapter();
- }
- public Object caseMethodTransaction(MethodTransaction object) {
- return createMethodTransactionAdapter();
- }
- public Object caseEnterpriseBean(EnterpriseBean object) {
- return createEnterpriseBeanAdapter();
- }
- public Object caseEntity(Entity object) {
- return createEntityAdapter();
- }
- public Object caseContainerManagedEntity(ContainerManagedEntity object) {
- return createContainerManagedEntityAdapter();
- }
- public Object caseCMPAttribute(CMPAttribute object) {
- return createCMPAttributeAdapter();
- }
- public Object caseCMRField(CMRField object) {
- return createCMRFieldAdapter();
- }
- public Object caseEJBRelationshipRole(EJBRelationshipRole object) {
- return createEJBRelationshipRoleAdapter();
- }
- public Object caseEJBRelation(EJBRelation object) {
- return createEJBRelationAdapter();
- }
- public Object caseRelationships(Relationships object) {
- return createRelationshipsAdapter();
- }
- public Object caseEJBJar(EJBJar object) {
- return createEJBJarAdapter();
- }
- public Object caseRoleSource(RoleSource object) {
- return createRoleSourceAdapter();
- }
- public Object caseQuery(Query object) {
- return createQueryAdapter();
- }
- public Object caseQueryMethod(QueryMethod object) {
- return createQueryMethodAdapter();
- }
- public Object caseMethodElement(MethodElement object) {
- return createMethodElementAdapter();
- }
- public Object caseExcludeList(ExcludeList object) {
- return createExcludeListAdapter();
- }
- public Object caseSession(Session object) {
- return createSessionAdapter();
- }
- public Object caseMessageDriven(MessageDriven object) {
- return createMessageDrivenAdapter();
- }
- public Object caseMessageDrivenDestination(MessageDrivenDestination object) {
- return createMessageDrivenDestinationAdapter();
- }
- public Object caseActivationConfig(ActivationConfig object) {
- return createActivationConfigAdapter();
- }
- public Object caseActivationConfigProperty(ActivationConfigProperty object) {
- return createActivationConfigPropertyAdapter();
- }
- public Object caseEJBMethodCategory(EJBMethodCategory object) {
- return createEJBMethodCategoryAdapter();
- }
- public Object caseEAttribute(EAttribute object) {
- return createEAttributeAdapter();
- }
- public Object caseEStructuralFeature(EStructuralFeature object) {
- return createEStructuralFeatureAdapter();
- }
- public Object caseEModelElement(EModelElement object) {
- return createEModelElementAdapter();
- }
- public Object caseENamedElement(ENamedElement object) {
- return createENamedElementAdapter();
- }
- };
- public Adapter createAdapter(Notifier target) {
- return (Adapter) sw.doSwitch((EObject) target);
- }
- /**
- * By default create methods return null so that we can easily ignore cases.
- * It's useful to ignore a case when inheritance will catch all the cases
- * anyway.
- */
- public Adapter createMethodPermissionAdapter() {
- return null;
- }
- public Adapter createAssemblyDescriptorAdapter() {
- return null;
- }
- public Adapter createMethodTransactionAdapter() {
- return null;
- }
- public Adapter createEnterpriseBeanAdapter() {
- return null;
- }
- public Adapter createEntityAdapter() {
- return null;
- }
- public Adapter createContainerManagedEntityAdapter() {
- return null;
- }
- public Adapter createCMPAttributeAdapter() {
- return null;
- }
- public Adapter createCMRFieldAdapter() {
- return null;
- }
- public Adapter createEJBRelationshipRoleAdapter() {
- return null;
- }
- public Adapter createEJBRelationAdapter() {
- return null;
- }
- public Adapter createRelationshipsAdapter() {
- return null;
- }
- public Adapter createEJBJarAdapter() {
- return null;
- }
- public Adapter createRoleSourceAdapter() {
- return null;
- }
- public Adapter createQueryAdapter() {
- return null;
- }
- public Adapter createQueryMethodAdapter() {
- return null;
- }
- public Adapter createMethodElementAdapter() {
- return null;
- }
- public Adapter createExcludeListAdapter() {
- return null;
- }
- public Adapter createSessionAdapter() {
- return null;
- }
- public Adapter createMessageDrivenAdapter() {
- return null;
- }
- public Adapter createMessageDrivenDestinationAdapter() {
- return null;
- }
- public Adapter createEJBMethodCategoryAdapter() {
- return null;
- }
- public Adapter createEClassAdapter() {
- return null;
- }
- public Adapter createEAttributeAdapter() {
- return null;
- }
- public Adapter createEStructuralFeatureAdapter() {
- return null;
- }
- public Adapter createEClassifierAdapter() {
- return null;
- }
- public Adapter createEModelElementAdapter() {
- return null;
- }
- public Adapter createENamedElementAdapter() {
- return null;
- }
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public boolean isFactoryForTypeGen(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch the delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected EjbSwitch modelSwitch =
- new EjbSwitch() {
- public Object caseContainerManagedEntity(ContainerManagedEntity object) {
- return createContainerManagedEntityAdapter();
- }
- public Object caseMethodPermission(MethodPermission object) {
- return createMethodPermissionAdapter();
- }
- public Object caseAssemblyDescriptor(AssemblyDescriptor object) {
- return createAssemblyDescriptorAdapter();
- }
- public Object caseMethodTransaction(MethodTransaction object) {
- return createMethodTransactionAdapter();
- }
- public Object caseSession(Session object) {
- return createSessionAdapter();
- }
- public Object caseEntity(Entity object) {
- return createEntityAdapter();
- }
- public Object caseEnterpriseBean(EnterpriseBean object) {
- return createEnterpriseBeanAdapter();
- }
- public Object caseEJBMethodCategory(EJBMethodCategory object) {
- return createEJBMethodCategoryAdapter();
- }
- public Object caseEJBJar(EJBJar object) {
- return createEJBJarAdapter();
- }
- public Object caseMethodElement(MethodElement object) {
- return createMethodElementAdapter();
- }
- public Object caseCMPAttribute(CMPAttribute object) {
- return createCMPAttributeAdapter();
- }
- public Object caseRelationships(Relationships object) {
- return createRelationshipsAdapter();
- }
- public Object caseQuery(Query object) {
- return createQueryAdapter();
- }
- public Object caseEJBRelation(EJBRelation object) {
- return createEJBRelationAdapter();
- }
- public Object caseEJBRelationshipRole(EJBRelationshipRole object) {
- return createEJBRelationshipRoleAdapter();
- }
- public Object caseRoleSource(RoleSource object) {
- return createRoleSourceAdapter();
- }
- public Object caseCMRField(CMRField object) {
- return createCMRFieldAdapter();
- }
- public Object caseMessageDriven(MessageDriven object) {
- return createMessageDrivenAdapter();
- }
- public Object caseMessageDrivenDestination(MessageDrivenDestination object) {
- return createMessageDrivenDestinationAdapter();
- }
- public Object caseExcludeList(ExcludeList object) {
- return createExcludeListAdapter();
- }
- public Object caseQueryMethod(QueryMethod object) {
- return createQueryMethodAdapter();
- }
- public Object caseActivationConfigProperty(ActivationConfigProperty object) {
- return createActivationConfigPropertyAdapter();
- }
- public Object caseActivationConfig(ActivationConfig object) {
- return createActivationConfigAdapter();
- }
- public Object caseJ2EEEObject(J2EEEObject object) {
- return createJ2EEEObjectAdapter();
- }
- public Object caseDescriptionGroup(DescriptionGroup object) {
- return createDescriptionGroupAdapter();
- }
- public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) {
- return createCompatibilityDescriptionGroupAdapter();
- }
- public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) {
- return createJNDIEnvRefsGroupAdapter();
- }
- public Object caseEModelElement(EModelElement object) {
- return createEModelElementAdapter();
- }
- public Object caseENamedElement(ENamedElement object) {
- return createENamedElementAdapter();
- }
- public Object caseETypedElement(ETypedElement object) {
- return createETypedElementAdapter();
- }
- public Object caseEStructuralFeature(EStructuralFeature object) {
- return createEStructuralFeatureAdapter();
- }
- public Object caseEAttribute(EAttribute object) {
- return createEAttributeAdapter();
- }
- public Object caseJ2EEEAttribute(J2EEEAttribute object) {
- return createJ2EEEAttributeAdapter();
- }
- public Object defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createAdapterGen(Notifier target) {
- return (Adapter)modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * By default create methods return null so that we can easily ignore cases.
- * It's useful to ignore a case when inheritance will catch all the cases
- * anyway.
- */
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createMethodPermissionAdapterGen() {
- return null;
- }
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createAssemblyDescriptorAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createMethodTransactionAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEnterpriseBeanAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEntityAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createContainerManagedEntityAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createCMPAttributeAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createCMRFieldAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEJBRelationshipRoleAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEJBRelationAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createRelationshipsAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEJBJarAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createRoleSourceAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createQueryAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createQueryMethodAdapterGen() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.ejb.ActivationConfigProperty <em>Activation Config Property</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.j2ee.ejb.ActivationConfigProperty
- * @generated
- */
- public Adapter createActivationConfigPropertyAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.ejb.ActivationConfig <em>Activation Config</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.j2ee.ejb.ActivationConfig
- * @generated
- */
- public Adapter createActivationConfigAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.common.J2EEEObject <em>J2EEE Object</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.j2ee.common.J2EEEObject
- * @generated
- */
- public Adapter createJ2EEEObjectAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.common.DescriptionGroup <em>Description Group</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.j2ee.common.DescriptionGroup
- * @generated
- */
- public Adapter createDescriptionGroupAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup <em>Compatibility Description Group</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup
- * @generated
- */
- public Adapter createCompatibilityDescriptionGroupAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup <em>JNDI Env Refs Group</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup
- * @generated
- */
- public Adapter createJNDIEnvRefsGroupAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createMethodElementAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createExcludeListAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createSessionAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createMessageDrivenAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createMessageDrivenDestinationAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEJBMethodCategoryAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEAttributeAdapterGen() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.jst.j2ee.common.J2EEEAttribute <em>J2EEE Attribute</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.jst.j2ee.common.J2EEEAttribute
- * @generated
- */
- public Adapter createJ2EEEAttributeAdapter() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEStructuralFeatureAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createEModelElementAdapterGen() {
- return null;
- }
-
- /**
- * @generated This field/method will be replaced during code generation.
- */
- public Adapter createENamedElementAdapterGen() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ETypedElement <em>ETyped Element</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.ecore.ETypedElement
- * @generated
- */
- public Adapter createETypedElementAdapter() {
- return null;
- }
-
-} //EjbAdapterFactory
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EjbSwitch.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EjbSwitch.java
deleted file mode 100644
index cfa6c182f..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/EjbSwitch.java
+++ /dev/null
@@ -1,836 +0,0 @@
-/*******************************************************************************
- * 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 java.util.List;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.ETypedElement;
-import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup;
-import org.eclipse.jst.j2ee.common.DescriptionGroup;
-import org.eclipse.jst.j2ee.common.J2EEEAttribute;
-import org.eclipse.jst.j2ee.common.J2EEEObject;
-import org.eclipse.jst.j2ee.common.JNDIEnvRefsGroup;
-import org.eclipse.jst.j2ee.ejb.ActivationConfig;
-import org.eclipse.jst.j2ee.ejb.ActivationConfigProperty;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.CMRField;
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EJBMethodCategory;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.EJBRelationshipRole;
-import org.eclipse.jst.j2ee.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-import org.eclipse.jst.j2ee.ejb.MessageDrivenDestination;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.jst.j2ee.ejb.Query;
-import org.eclipse.jst.j2ee.ejb.QueryMethod;
-import org.eclipse.jst.j2ee.ejb.Relationships;
-import org.eclipse.jst.j2ee.ejb.RoleSource;
-import org.eclipse.jst.j2ee.ejb.Session;
-
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.eclipse.jst.j2ee.ejb.EjbPackage
- * @generated
- */
-public class EjbSwitch {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static EjbPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EjbSwitch() {
- if (modelPackage == null) {
- modelPackage = EjbPackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public Object doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected Object doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch((EClass)eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected Object doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case EjbPackage.CONTAINER_MANAGED_ENTITY: {
- ContainerManagedEntity containerManagedEntity = (ContainerManagedEntity)theEObject;
- Object result = caseContainerManagedEntity(containerManagedEntity);
- if (result == null) result = caseEntity(containerManagedEntity);
- if (result == null) result = caseEnterpriseBean(containerManagedEntity);
- if (result == null) result = caseJNDIEnvRefsGroup(containerManagedEntity);
- if (result == null) result = caseCompatibilityDescriptionGroup(containerManagedEntity);
- if (result == null) result = caseDescriptionGroup(containerManagedEntity);
- if (result == null) result = caseJ2EEEObject(containerManagedEntity);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.METHOD_PERMISSION: {
- MethodPermission methodPermission = (MethodPermission)theEObject;
- Object result = caseMethodPermission(methodPermission);
- if (result == null) result = caseJ2EEEObject(methodPermission);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.ASSEMBLY_DESCRIPTOR: {
- AssemblyDescriptor assemblyDescriptor = (AssemblyDescriptor)theEObject;
- Object result = caseAssemblyDescriptor(assemblyDescriptor);
- if (result == null) result = caseJ2EEEObject(assemblyDescriptor);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.METHOD_TRANSACTION: {
- MethodTransaction methodTransaction = (MethodTransaction)theEObject;
- Object result = caseMethodTransaction(methodTransaction);
- if (result == null) result = caseJ2EEEObject(methodTransaction);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.SESSION: {
- Session session = (Session)theEObject;
- Object result = caseSession(session);
- if (result == null) result = caseEnterpriseBean(session);
- if (result == null) result = caseJNDIEnvRefsGroup(session);
- if (result == null) result = caseCompatibilityDescriptionGroup(session);
- if (result == null) result = caseDescriptionGroup(session);
- if (result == null) result = caseJ2EEEObject(session);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.ENTITY: {
- Entity entity = (Entity)theEObject;
- Object result = caseEntity(entity);
- if (result == null) result = caseEnterpriseBean(entity);
- if (result == null) result = caseJNDIEnvRefsGroup(entity);
- if (result == null) result = caseCompatibilityDescriptionGroup(entity);
- if (result == null) result = caseDescriptionGroup(entity);
- if (result == null) result = caseJ2EEEObject(entity);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.ENTERPRISE_BEAN: {
- EnterpriseBean enterpriseBean = (EnterpriseBean)theEObject;
- Object result = caseEnterpriseBean(enterpriseBean);
- if (result == null) result = caseJNDIEnvRefsGroup(enterpriseBean);
- if (result == null) result = caseCompatibilityDescriptionGroup(enterpriseBean);
- if (result == null) result = caseDescriptionGroup(enterpriseBean);
- if (result == null) result = caseJ2EEEObject(enterpriseBean);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.EJB_METHOD_CATEGORY: {
- EJBMethodCategory ejbMethodCategory = (EJBMethodCategory)theEObject;
- Object result = caseEJBMethodCategory(ejbMethodCategory);
- if (result == null) result = caseJ2EEEObject(ejbMethodCategory);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.EJB_JAR: {
- EJBJar ejbJar = (EJBJar)theEObject;
- Object result = caseEJBJar(ejbJar);
- if (result == null) result = caseCompatibilityDescriptionGroup(ejbJar);
- if (result == null) result = caseDescriptionGroup(ejbJar);
- if (result == null) result = caseJ2EEEObject(ejbJar);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.METHOD_ELEMENT: {
- MethodElement methodElement = (MethodElement)theEObject;
- Object result = caseMethodElement(methodElement);
- if (result == null) result = caseJ2EEEObject(methodElement);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.CMP_ATTRIBUTE: {
- CMPAttribute cmpAttribute = (CMPAttribute)theEObject;
- Object result = caseCMPAttribute(cmpAttribute);
- if (result == null) result = caseJ2EEEAttribute(cmpAttribute);
- if (result == null) result = caseEAttribute(cmpAttribute);
- if (result == null) result = caseEStructuralFeature(cmpAttribute);
- if (result == null) result = caseETypedElement(cmpAttribute);
- if (result == null) result = caseENamedElement(cmpAttribute);
- if (result == null) result = caseEModelElement(cmpAttribute);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.RELATIONSHIPS: {
- Relationships relationships = (Relationships)theEObject;
- Object result = caseRelationships(relationships);
- if (result == null) result = caseJ2EEEObject(relationships);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.QUERY: {
- Query query = (Query)theEObject;
- Object result = caseQuery(query);
- if (result == null) result = caseJ2EEEObject(query);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.EJB_RELATION: {
- EJBRelation ejbRelation = (EJBRelation)theEObject;
- Object result = caseEJBRelation(ejbRelation);
- if (result == null) result = caseJ2EEEObject(ejbRelation);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.EJB_RELATIONSHIP_ROLE: {
- EJBRelationshipRole ejbRelationshipRole = (EJBRelationshipRole)theEObject;
- Object result = caseEJBRelationshipRole(ejbRelationshipRole);
- if (result == null) result = caseJ2EEEObject(ejbRelationshipRole);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.ROLE_SOURCE: {
- RoleSource roleSource = (RoleSource)theEObject;
- Object result = caseRoleSource(roleSource);
- if (result == null) result = caseJ2EEEObject(roleSource);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.CMR_FIELD: {
- CMRField cmrField = (CMRField)theEObject;
- Object result = caseCMRField(cmrField);
- if (result == null) result = caseCMPAttribute(cmrField);
- if (result == null) result = caseJ2EEEAttribute(cmrField);
- if (result == null) result = caseEAttribute(cmrField);
- if (result == null) result = caseEStructuralFeature(cmrField);
- if (result == null) result = caseETypedElement(cmrField);
- if (result == null) result = caseENamedElement(cmrField);
- if (result == null) result = caseEModelElement(cmrField);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.MESSAGE_DRIVEN: {
- MessageDriven messageDriven = (MessageDriven)theEObject;
- Object result = caseMessageDriven(messageDriven);
- if (result == null) result = caseEnterpriseBean(messageDriven);
- if (result == null) result = caseJNDIEnvRefsGroup(messageDriven);
- if (result == null) result = caseCompatibilityDescriptionGroup(messageDriven);
- if (result == null) result = caseDescriptionGroup(messageDriven);
- if (result == null) result = caseJ2EEEObject(messageDriven);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.MESSAGE_DRIVEN_DESTINATION: {
- MessageDrivenDestination messageDrivenDestination = (MessageDrivenDestination)theEObject;
- Object result = caseMessageDrivenDestination(messageDrivenDestination);
- if (result == null) result = caseJ2EEEObject(messageDrivenDestination);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.EXCLUDE_LIST: {
- ExcludeList excludeList = (ExcludeList)theEObject;
- Object result = caseExcludeList(excludeList);
- if (result == null) result = caseJ2EEEObject(excludeList);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.QUERY_METHOD: {
- QueryMethod queryMethod = (QueryMethod)theEObject;
- Object result = caseQueryMethod(queryMethod);
- if (result == null) result = caseMethodElement(queryMethod);
- if (result == null) result = caseJ2EEEObject(queryMethod);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.ACTIVATION_CONFIG_PROPERTY: {
- ActivationConfigProperty activationConfigProperty = (ActivationConfigProperty)theEObject;
- Object result = caseActivationConfigProperty(activationConfigProperty);
- if (result == null) result = caseJ2EEEObject(activationConfigProperty);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case EjbPackage.ACTIVATION_CONFIG: {
- ActivationConfig activationConfig = (ActivationConfig)theEObject;
- Object result = caseActivationConfig(activationConfig);
- if (result == null) result = caseJ2EEEObject(activationConfig);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Container Managed Entity</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Container Managed Entity</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseContainerManagedEntity(ContainerManagedEntity object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Method Permission</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Method Permission</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseMethodPermission(MethodPermission object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Assembly Descriptor</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Assembly Descriptor</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseAssemblyDescriptor(AssemblyDescriptor object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Method Transaction</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Method Transaction</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseMethodTransaction(MethodTransaction object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Session</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Session</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseSession(Session object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Entity</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Entity</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEntity(Entity object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Enterprise Bean</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Enterprise Bean</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEnterpriseBean(EnterpriseBean object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EJB Method Category</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EJB Method Category</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEJBMethodCategory(EJBMethodCategory object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EJB Jar</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EJB Jar</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEJBJar(EJBJar object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Method Element</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Method Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseMethodElement(MethodElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>CMP Attribute</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>CMP Attribute</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseCMPAttribute(CMPAttribute object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Relationships</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Relationships</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseRelationships(Relationships object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Query</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Query</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseQuery(Query object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EJB Relation</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EJB Relation</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEJBRelation(EJBRelation object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EJB Relationship Role</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EJB Relationship Role</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEJBRelationshipRole(EJBRelationshipRole object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Role Source</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Role Source</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseRoleSource(RoleSource object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>CMR Field</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>CMR Field</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseCMRField(CMRField object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Message Driven</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Message Driven</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseMessageDriven(MessageDriven object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Message Driven Destination</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Message Driven Destination</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseMessageDrivenDestination(MessageDrivenDestination object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Exclude List</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Exclude List</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseExcludeList(ExcludeList object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Query Method</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Query Method</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseQueryMethod(QueryMethod object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Activation Config Property</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Activation Config Property</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseActivationConfigProperty(ActivationConfigProperty object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Activation Config</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Activation Config</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseActivationConfig(ActivationConfig object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>J2EEE Object</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>J2EEE Object</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseJ2EEEObject(J2EEEObject object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Description Group</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Description Group</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseDescriptionGroup(DescriptionGroup object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>Compatibility Description Group</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>Compatibility Description Group</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseCompatibilityDescriptionGroup(CompatibilityDescriptionGroup object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>JNDI Env Refs Group</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>JNDI Env Refs Group</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseJNDIEnvRefsGroup(JNDIEnvRefsGroup object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EModel Element</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EModel Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEModelElement(EModelElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ENamed Element</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ENamed Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseENamedElement(ENamedElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>ETyped Element</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>ETyped Element</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseETypedElement(ETypedElement object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EStructural Feature</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EStructural Feature</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEStructuralFeature(EStructuralFeature object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EAttribute</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EAttribute</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseEAttribute(EAttribute object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>J2EEE Attribute</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>J2EEE Attribute</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public Object caseJ2EEEAttribute(J2EEEAttribute object) {
- return null;
- }
-
- /**
- * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public Object defaultCase(EObject object) {
- return null;
- }
-
-} //EjbSwitch
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/MDBActivationConfigModelUtil.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/MDBActivationConfigModelUtil.java
deleted file mode 100644
index 52451520f..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/MDBActivationConfigModelUtil.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Created on Jan 30, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.ejb.internal.util;
-
-import java.util.HashMap;
-
-/**
- * @author vijayb
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class MDBActivationConfigModelUtil {
-
- public static HashMap activationConfigMap;
-
- public static final String ackModeKey = "acknowledgeMode"; //$NON-NLS-1$
-
- public static final String destinationTypeKey = "destinationType";//$NON-NLS-1$
-
- public static final String durabilityKey = "subscriptionDurability";//$NON-NLS-1$
-
- public static final String messageSelectorKey = "messageSelector";//$NON-NLS-1$
-
- public static final String[] ackModeValues = new String[] { "Auto-acknowledge", "Dups-ok-acknowledge" }; //$NON-NLS-1$ //$NON-NLS-2$
-
- public static final String[] destinationTypeValues = new String[] { "javax.jms.Queue", "javax.jms.Topic" };//$NON-NLS-1$ //$NON-NLS-2$
-
- public static final String[] durabilityValue = new String[] { "Durable", "NonDurable" };//$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- *
- */
- public MDBActivationConfigModelUtil() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public static HashMap createStandardActivationConfigMap() {
- activationConfigMap = new HashMap();
- activationConfigMap.put(ackModeKey, ackModeValues);
- activationConfigMap.put(destinationTypeKey, destinationTypeValues);
- activationConfigMap.put(durabilityKey, durabilityValue);
- activationConfigMap.put(messageSelectorKey, ""); //$NON-NLS-1$
- return activationConfigMap;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/MethodElementHelper.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/MethodElementHelper.java
deleted file mode 100644
index 768ec9c5e..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/MethodElementHelper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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.ecore.EObject;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-
-
-/**
- * @author cbridgha
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class MethodElementHelper {
- public static final int NONE = 0;
- public static final int METHOD_PERMISSION = 1;
- public static final int METHOD_TRANSACTION = 2;
- public static final int EXCLUDE_LIST = 3;
- public static int getContainedType(MethodElement me) {
- EObject container = me.eContainer();
- if (container == null)
- return NONE;
- if (container instanceof MethodPermission)
- return METHOD_PERMISSION;
- if (container instanceof MethodTransaction)
- return METHOD_TRANSACTION;
- if (container instanceof ExcludeList)
- return EXCLUDE_LIST;
- return NONE;
- }
- public static MethodPermission getMethodPermission(MethodElement me) {
- if (METHOD_PERMISSION == getContainedType(me))
- return (MethodPermission) me.eContainer();
- return null;
- }
- public static MethodTransaction getMethodTransaction(MethodElement me) {
- if (METHOD_TRANSACTION == getContainedType(me))
- return (MethodTransaction) me.eContainer();
- return null;
- }
- public static ExcludeList getExcludeList(MethodElement me) {
- if (EXCLUDE_LIST == getContainedType(me))
- return (ExcludeList) me.eContainer();
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/RelationshipsAttributeMaintenanceAdapter.java b/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/RelationshipsAttributeMaintenanceAdapter.java
deleted file mode 100644
index 2a0ae8826..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/util/RelationshipsAttributeMaintenanceAdapter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * 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.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jst.j2ee.ejb.EJBRelation;
-import org.eclipse.jst.j2ee.ejb.internal.impl.EjbFactoryImpl;
-
-public class RelationshipsAttributeMaintenanceAdapter extends AdapterImpl {
- /**
- * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(Notification)
- */
- public void notifyChanged(Notification msg) {
- if ((EStructuralFeature)msg.getFeature() == EjbFactoryImpl.getPackage().getRelationships_EjbRelations()) {
- switch (msg.getEventType()) {
- case Notification.ADD :
- addedEJBRelation((EJBRelation) msg.getNewValue(), (EStructuralFeature)msg.getFeature());
- break;
- case Notification.REMOVE :
- removedEJBRelation((EJBRelation) msg.getOldValue(), (EStructuralFeature)msg.getFeature());
- break;
- }
- }
- }
- private void removedEJBRelation(EJBRelation aRelation, EObject sf) {
- Adapter a = getAdapter(aRelation);
- if (a != null) {
- Notification not = new ENotificationImpl((InternalEObject)aRelation, Notification.REMOVE,(EStructuralFeature) sf, aRelation, null, Notification.NO_INDEX);
- a.notifyChanged(not);
- }
- }
- private void addedEJBRelation(EJBRelation aRelation, EObject sf) {
- Adapter a = getAdapter(aRelation);
- if (a != null) {
- Notification not = new ENotificationImpl((InternalEObject)aRelation, Notification.ADD,(EStructuralFeature) sf, null, aRelation, Notification.NO_INDEX);
- a.notifyChanged(not);
- }
- }
- private Adapter getAdapter(EObject anObject) {
- return EcoreUtil.getAdapter(anObject.eAdapters(),EJBAttributeMaintenanceFactoryImpl.ADAPTER_KEY);
- }
-}
-

Back to the top