Package org.andromda.metafacades.uml

Examples of org.andromda.metafacades.uml.ClassifierFacade


    protected java.lang.String handleGetJdbcType()
    {
        String value = null;
        if (this.getJdbcMappings() != null)
        {
            final ClassifierFacade type = this.getType();
            if (type != null)
            {
                final String typeName = type.getFullyQualifiedName(true);
                value = this.getJdbcMappings().getTo(typeName);
            }
        }

        return value;
View Full Code Here


    protected java.lang.String handleGetJdbcType()
    {
        String value = null;
        if (this.getJdbcMappings() != null)
        {
            final ClassifierFacade type = this.getType();
            if (type != null)
            {
                final String typeName = type.getFullyQualifiedName(true);
                value = this.getJdbcMappings().getTo(typeName);
            }
        }

        return value;
View Full Code Here

    protected java.lang.String handleGetSqlType()
    {
        String value = null;
        if (this.getSqlMappings() != null)
        {
            final ClassifierFacade type = this.getType();
            if (type != null)
            {
                String typeName = type.getFullyQualifiedName(true);

                // if its an enumeration, the sql type is the literal type
                if (type.isEnumeration())
                {
                    ClassifierFacade literalType = ((EnumerationFacade)type).getLiteralType();
                    if (literalType != null)
                    {
                        typeName = literalType.getFullyQualifiedName(true);
                    }
                }
                value = this.getSqlMappings().getTo(typeName);
                final String columnLength = this.getColumnLength();
                if (StringUtils.isNotEmpty(columnLength))
View Full Code Here

     */
    protected java.lang.String handleGetMessageKey()
    {
        String titleKey = "";

        final ClassifierFacade owner = getOwner();
        if (owner != null)
        {
            titleKey += owner.getName() + '.';
        }

        return StringUtilsHelper.toResourceMessageKey(titleKey + getName());
    }
View Full Code Here

                    ObjectUtils.toString(this.getConfiguredProperty(HibernateGlobals.DEFAULT_COLLECTION_INTERFACE));
            }
        }
        else
        {
            final ClassifierFacade type = this.getType();

            if (type instanceof HibernateEntity)
            {
                final String typeName = ((HibernateEntity)type).getFullyQualifiedEntityName();
View Full Code Here

    protected String handleGetDummyValue(int seed)
    {
        String dummyValue;

        final ClassifierFacade type = this.getType();

        if (type == null)
        {
            dummyValue = "";
        }
        else if (type.isDateType())
        {
            dummyValue = "new java.util.Date()";
        }
        else if (type.isBooleanType())
        {
            dummyValue = String.valueOf(seed % 2 == 0);
        }
        else if (type.isPrimitive())
        {
            dummyValue = String.valueOf(seed);
        }
        else
        {
View Full Code Here

    private ClassifierFacade getMetaclass(ClassifierFacade classifier)
    {
        for (final Iterator iter = classifier.getSourceDependencies().iterator(); iter.hasNext();)
        {
            DependencyFacade dep = (DependencyFacade)iter.next();
            ClassifierFacade target = (ClassifierFacade)dep.getTargetElement();
            Collection stereotypes = target.getStereotypeNames();
            if ((stereotypes != null) && (stereotypes.size() > 0))
            {
                String stereotypeName = (String)stereotypes.iterator().next();
                if (stereotypeName.equals(MetaProfile.STEREOTYPE_METACLASS))
                {
                    return target;
                }
            }
        }

        ClassifierFacade superclass = (ClassifierFacade)classifier.getGeneralization();
        return (superclass != null) ? getMetaclass(superclass) : null;
    }
View Full Code Here

                if (includeSuperclasses && this.getGeneralizations() != null)
                {
                    for (final Iterator iterator = this.getGeneralizations().iterator(); iterator.hasNext();)
                    {
                        final Map methodDataMap = new HashMap();
                        final ClassifierFacade metafacade = (ClassifierFacade)iterator.next();
                        for (ClassifierFacade classifier = metafacade; classifier instanceof Metafacade;
                             classifier = (ClassifierFacade)classifier.getGeneralization())
                        {
                            this.getAllFeatures(methodDataMap, declarationSet, (Metafacade)classifier);
                        }
View Full Code Here

    protected java.lang.String handleGetQueryArgumentNameSetter()
    {
        StringBuffer setterName = new StringBuffer();
        boolean specializedSetters =
            Boolean.valueOf(String.valueOf(this.getConfiguredProperty(USE_SPECIALIZED_SETTERS))).booleanValue();
        ClassifierFacade classifier = this.getType();
        if (classifier != null)
        {
            if (specializedSetters)
            {
                if (classifier.isPrimitive())
                {
                    setterName.append("set" + classifier.getWrapperName().replaceAll("(.)*\\.", ""));
                }
                else if (classifier.isDateType() || classifier.isStringType())
                {
                    setterName.append("set" + classifier.getName());
                }
                else
                {
                    setterName.append("setParameter");
                }
            }
            else
            {
                setterName.append("setParameter");
            }
            if (classifier.isCollectionType())
            {
                setterName.append("List");
            }
        }
        return setterName.toString();
View Full Code Here

        boolean allArgumentsHaveFormFields = true;
        for (final Iterator iterator = arguments.iterator(); iterator.hasNext() && allArgumentsHaveFormFields;)
        {
            final ParameterFacade parameter = (ParameterFacade)iterator.next();
            final String parameterName = parameter.getName();
            final ClassifierFacade parameterType = parameter.getType();
            final String parameterTypeName = parameterType != null ? parameterType.getFullyQualifiedName() : "";

            boolean actionMissingField = false;
            for (final Iterator actionIterator = deferringActions.iterator();
                actionIterator.hasNext() && !actionMissingField;)
            {
                final StrutsAction action = (StrutsAction)actionIterator.next();
                final Collection actionFormFields = action.getActionFormFields();

                boolean fieldPresent = false;
                for (final Iterator fieldIterator = actionFormFields.iterator();
                    fieldIterator.hasNext() && !fieldPresent;)
                {
                    final ParameterFacade field = (ParameterFacade)fieldIterator.next();
                    final ClassifierFacade fieldType = field.getType();
                    final String fieldTypeName = fieldType != null ? fieldType.getFullyQualifiedName() : "";
                    if (parameterName.equals(field.getName()) && parameterTypeName.equals(fieldTypeName))
                    {
                        fieldPresent = true;
                    }
                }
View Full Code Here

TOP

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

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.