diff options
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SupertypeCMPAttributeFilter.java')
-rw-r--r-- | plugins/org.eclipse.jst.j2ee.core/mofj2ee/org/eclipse/jst/j2ee/ejb/internal/impl/SupertypeCMPAttributeFilter.java | 117 |
1 files changed, 0 insertions, 117 deletions
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) ; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |