Package org.andromda.metafacades.uml

Examples of org.andromda.metafacades.uml.GeneralizableElementFacade


    public java.util.Collection handleGetAllGeneralizations()
    {
        final Collection generalizations = new ArrayList();
        for (final Iterator iterator = this.getGeneralizations().iterator(); iterator.hasNext();)
        {
            final GeneralizableElementFacade element = (GeneralizableElementFacade)iterator.next();
            generalizations.add(element);
            generalizations.addAll(element.getAllGeneralizations());
        }
        return generalizations;
    }
View Full Code Here


        if (this.getSpecializations() != null)
        {
            allSpecializations.addAll(this.getSpecializations());
            for (final Iterator iterator = this.getSpecializations().iterator(); iterator.hasNext();)
            {
                final GeneralizableElementFacade element = (GeneralizableElementFacade)iterator.next();
                allSpecializations.addAll(element.getAllSpecializations());
            }
        }
        return allSpecializations;
    }
View Full Code Here

        return associatedClasses;
    }

    protected Object handleGetSuperClass()
    {
        final GeneralizableElementFacade superClass = this.getGeneralization();
        return superClass instanceof ClassifierFacade ? superClass : null;
    }
View Full Code Here

        return associatedClasses;
    }

    protected Object handleGetSuperClass()
    {
        final GeneralizableElementFacade superClass = this.getGeneralization();
        return superClass instanceof ClassifierFacade ? superClass : null;
    }
View Full Code Here

    /**
     * @see org.andromda.cartridges.spring.metafacades.SpringEntity#getRoot()
     */
    protected Object handleGetRoot()
    {
        GeneralizableElementFacade generalization = this;
        for (
            ; generalization.getGeneralization() != null && generalization instanceof SpringEntity;
            generalization = generalization.getGeneralization())
            ;
        return generalization;
    }
View Full Code Here

     * @see org.andromda.cartridges.meta.metafacades.MetafacadeGeneralization#getGetterNameVisibility()
     */
    protected String handleGetGetterNameVisibility()
    {
        String visibility = "private";
        GeneralizableElementFacade child = this.getChild();
        if (child != null)
        {
            // if we have more than one generalization for the metafacade
            // then we expose the super facade accessors.
            Collection generalizations = child.getGeneralizations();
            if ((generalizations != null) && (generalizations.size() > 1))
            {
                visibility = "protected";
            }
        }
View Full Code Here

        if (this.getSpecializations() != null)
        {
            allSpecializations.addAll(this.getSpecializations());
            for (final Iterator iterator = this.getSpecializations().iterator(); iterator.hasNext();)
            {
                final GeneralizableElementFacade element = (GeneralizableElementFacade)iterator.next();
                allSpecializations.addAll(element.getAllSpecializations());
            }
        }
        return allSpecializations;
    }
View Full Code Here

    protected java.util.Collection handleGetAllGeneralizations()
    {
        final Collection generalizations = new ArrayList();
        for (final Iterator iterator = this.getGeneralizations().iterator(); iterator.hasNext();)
        {
            final GeneralizableElementFacade element = (GeneralizableElementFacade)iterator.next();
            generalizations.add(element);
            generalizations.addAll(element.getAllGeneralizations());
        }
        return generalizations;
    }
View Full Code Here

        return value;
    }

    protected Object handleGetGeneralizationRoot()
    {
        GeneralizableElementFacade generalizableElement = this;

        while (generalizableElement.getGeneralization() != null)
        {
            generalizableElement = generalizableElement.getGeneralization();
        }

        return generalizableElement;
    }
View Full Code Here

     * If we're using inheritance to build up a value object with all model elements of an entity, we're returning no
     * superclass.
     */
    public GeneralizableElementFacade getGeneralization()
    {
        GeneralizableElementFacade generalization = super.getGeneralization();
        return generalization == null || generalization.hasStereotype(EJBProfile.STEREOTYPE_ENTITY) ? null
                                                                                                    : generalization;
    }
View Full Code Here

TOP

Related Classes of org.andromda.metafacades.uml.GeneralizableElementFacade

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.