Package org.andromda.metafacades.uml

Examples of org.andromda.metafacades.uml.AttributeFacade


        }

        // declared fields
        for (final Iterator iterator = this.getAttributes().iterator(); iterator.hasNext();)
        {
            AttributeFacade attribute = (AttributeFacade)iterator.next();
            buffer.append(attribute.getName());
            buffer.append(attribute.getVisibility());
            buffer.append(attribute.getType().getName());
        }

        // operations
        for (final Iterator iter = this.getOperations().iterator(); iter.hasNext();)
        {
View Full Code Here


        final StringBuffer call = new StringBuffer();
        String separator = "";
        call.append("(");
        for (final Iterator iterator = this.getAttributes().iterator(); iterator.hasNext();)
        {
            AttributeFacade attribute = (AttributeFacade)iterator.next();

            call.append(separator);
            String typeName = attribute.getType().getFullyQualifiedName();
            call.append(typeName);
            call.append(" ");
            call.append(attribute.getName());
            separator = ", ";
        }
        call.append(")");
        return call.toString();
    }
View Full Code Here

        for (Iterator propertyIterator = properties.iterator(); propertyIterator.hasNext();)
        {
            final Object property = propertyIterator.next();
            if (property instanceof AttributeFacade)
            {
                final AttributeFacade attribute = (AttributeFacade)property;
                if (attribute.isRequired() || attribute.isReadOnly())
                {
                    requiredConstructorParameters.add(attribute);
                }
            }
            else if (property instanceof AssociationEndFacade)
View Full Code Here

        }

        // declared fields
        for (final Iterator iterator = this.getAttributes().iterator(); iterator.hasNext();)
        {
            AttributeFacade attribute = (AttributeFacade)iterator.next();
            buffer.append(attribute.getName());
            buffer.append(attribute.getVisibility());
            buffer.append(attribute.getType().getName());
        }

        // operations
        for (final Iterator iter = this.getOperations().iterator(); iter.hasNext();)
        {
View Full Code Here

            this.getAttributes(true),
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    final AttributeFacade attribute = (AttributeFacade)object;
                    return StringUtils.trimToEmpty(attribute.getName()).equals(name);
                }
            });
    }
View Full Code Here

                            final String parameterName = argument.getName();
                            if (type != null && type.isEmbeddedValue())
                            {
                                for (final Iterator attributeIterator = type.getAttributes(true).iterator(); attributeIterator.hasNext();)
                                {
                                    final AttributeFacade attribute = (AttributeFacade)attributeIterator.next();
                                    String parameter = "?";
                                    if (this.isUseNamedParameters())
                                    {
                                        parameter = ":" + SpringUtils.concatNamesCamelCase(Arrays.asList(new String[]{parameterName, attribute.getName()}));
                                    }
                                    queryString = queryString + " " + variableName + "." + parameterName + "." + attribute.getName() + " = " + parameter;
                                    if (attributeIterator.hasNext())
                                    {
                                        queryString = queryString + " and";
                                    }
                                }
View Full Code Here

    protected String handleGetAttributeEmbeddedValueList()
    {
        final StringBuffer buffer = new StringBuffer();
        for (final Iterator iterator = this.getEmbeddedValues().iterator(); iterator.hasNext();)
        {
            final AttributeFacade attribute = (AttributeFacade)iterator.next();
            final String name = attribute.getName();
            if (StringUtils.isNotBlank(name))
            {
                buffer.append('\"' + name + '\"');
                if (iterator.hasNext())
                {
View Full Code Here

            {
                final Entity type = (Entity)this.getType();
                final Collection identifiers = type.getIdentifiers();
                if (identifiers != null && !identifiers.isEmpty())
                {
                    AttributeFacade attribute = (AttributeFacade)identifiers.iterator().next();
                    if (attribute instanceof EntityAttribute)
                    {
                        identifier = (EntityAttribute)attribute;
                    }
                }
View Full Code Here

        }

        // No PK dependency found - try a PK attribute
        if (super.getIdentifiers() != null && !super.getIdentifiers().isEmpty())
        {
            AttributeFacade attr = (AttributeFacade)super.getIdentifiers().iterator().next();
            identifiers.add(attr);
            return identifiers;
        }

        // Still nothing found - recurse up the inheritance tree
View Full Code Here

    {
        Collection collIdentifier = this.getIdentifiers(true);
        Iterator it = collIdentifier.iterator();
        while (it.hasNext())
        {
            AttributeFacade attr = (AttributeFacade)it.next();
            if (attr.getName().equalsIgnoreCase(identifier))
            {
                return true;
            }
        }
        return false;
View Full Code Here

TOP

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

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.