Examples of addAttribute()


Examples of org.apache.cayenne.map.DbEntity.addAttribute()

        // create and add new column to model and db
        DbAttribute column = new DbAttribute("NEWCOL1", Types.VARCHAR, dbEntity);

        column.setMandatory(false);
        column.setMaxLength(10);
        dbEntity.addAttribute(column);
        assertTokensAndExecute(node, map, 1, 0);

        // try merge once more to check that is was merged
        assertTokensAndExecute(node, map, 0, 0);

Examples of org.apache.cayenne.map.Embeddable.addAttribute()

            EmbeddableAttribute attribute = new EmbeddableAttribute(jpaBasic.getName());
            attribute.setType(getAttributeType(path, jpaBasic.getName()).getName());
            attribute.setDbAttributeName(jpaBasic.getColumn().getName());

            embeddable.addAttribute(attribute);
            return attribute;
        }

        Class<?> getAttributeType(ProjectPath path, String name) {
            AccessType access = null;

Examples of org.apache.cayenne.map.Entity.addAttribute()

            src.setMandatory(false);
            src.setMaxLength(jpaTargetId.getColumn().getLength());
            src.setType(jpaTargetId.getDefaultJdbcType());

            Entity srcEntity = dbRelationship.getSourceEntity();
            srcEntity.addAttribute(src);

            // add join
            DbJoin join = new DbJoin(dbRelationship, src.getName(), jpaTargetId
                    .getColumn()
                    .getName());

Examples of org.apache.cayenne.map.ObjEntity.addAttribute()

        ObjEntity objEntity = new ObjEntity("NewTable");
        objEntity.setDbEntity(dbEntity);
        ObjAttribute oatr1 = new ObjAttribute("name");
        oatr1.setDbAttributePath(column2.getName());
        oatr1.setType("java.lang.String");
        objEntity.addAttribute(oatr1);
        map.addObjEntity(objEntity);

        // try to insert some rows to check that pk stuff is working
        DataContext ctxt = createDataContext();
        DataMap sourceMap = map;//ctxt.getEntityResolver().getDataMap("testmap");

Examples of org.apache.cocoon.xml.AttributesImpl.addAttribute()

    public void generate() throws IOException, SAXException,
            ProcessingException {
        this.contentHandler.startDocument();
        AttributesImpl attr = new AttributesImpl();
        attr.addAttribute("", MODULE_PARAM, MODULE_PARAM, "CDATA", module);
        this.contentHandler.startPrefixMapping(NS_PREFIX, PROP_NS);
        this.contentHandler.startElement(PROP_NS, ROOT_ELEMENT, ROOT_ELEMENT,
                attr);
        if (!(iterator == null)) {
            createProperty(attr);

Examples of org.apache.commons.configuration.tree.ConfigurationNode.addAttribute()

        assertTrue("Found elements with name attribute", context.selectNodes(
                "//" + CHILD_NAME2 + "[@name]").isEmpty());
        ConfigurationNode node = (ConfigurationNode) root.getChild(2).getChild(
                1).getChildren(CHILD_NAME2).get(1);
        node.addAttribute(new DefaultConfigurationNode("name", "testValue"));
        List nodes = context.selectNodes("//" + CHILD_NAME2 + "[@name]");
        assertEquals("Name attribute not found", 1, nodes.size());
        assertEquals("Wrong node returned", node, nodes.get(0));
    }

Examples of org.apache.commons.configuration.tree.DefaultConfigurationNode.addAttribute()

            for (int i = 1; i <= CHILD_COUNT; i++)
            {
                ConfigurationNode child = new DefaultConfigurationNode(
                        (i % 2 == 0) ? CHILD_NAME1 : CHILD_NAME2, prefix + i);
                parent.addChild(child);
                child.addAttribute(new DefaultConfigurationNode(ATTR_NAME,
                        String.valueOf(i)));

                createLevel(child, level - 1);
            }
        }

Examples of org.apache.commons.jelly.impl.StaticTagScript.addAttribute()

                String attributeName = list.getLocalName(i);
                String attributeValue = list.getValue(i);
                Expression expression = CompositeExpression.parse(
                    attributeValue, getExpressionFactory()
                );
                script.addAttribute(attributeName, expression);
            }
            return script;
        }
        catch (Exception e) {
            log.warn(

Examples of org.apache.commons.jelly.impl.TagScript.addAttribute()

                                attributeName,
                                attributeValue);
                        if (expression == null) {
                            expression = createConstantExpression(localName, attributeName, attributeValue);
                        }
                        script.addAttribute(attributeName, expression);
                    }
                }
                return script;
            }
            return null;

Examples of org.apache.commons.modeler.ManagedBean.addAttribute()

                ai.setType( mai.getType());
                ai.setReadable( mai.isReadable());
                ai.setWriteable( mai.isWritable());
                                               
                mbean.addAttribute(ai);
            }

            MBeanOperationInfo opInfo[]=mbi.getOperations();
            for( int i=0; i<opInfo.length; i++ ) {
                MBeanOperationInfo moi=opInfo[i];
TOP
Copyright © 2018 www.massapi.com. 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.