Examples of lookupDataNode()


Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

        assertEquals(2, domain.getDataNodes().size());
        DataNode node1 = domain.getNode("node1");
        assertNotNull(node1);
        assertEquals(1, node1.getDataMaps().size());
        assertSame(map1, node1.getDataMaps().iterator().next());
        assertSame(node1, domain.lookupDataNode(map1));
        assertEquals(nodeDescriptor1.getDataSourceFactoryType(), node1
                .getDataSourceFactory());
        assertNotNull(node1.getDataSource());
        assertEquals(nodeDescriptor1.getParameters(), node1.getDataSourceLocation());
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

        DataNode node2 = domain.getNode("node2");
        assertNotNull(node2);
        assertEquals(1, node2.getDataMaps().size());
        assertSame(map2, node2.getDataMaps().iterator().next());
        assertSame(node2, domain.lookupDataNode(map2));
        assertNull(node2.getDataSourceFactory());
        assertNotNull(node2.getDataSource());
        assertEquals(nodeDescriptor2.getParameters(), node2.getDataSourceLocation());
        assertEquals(SkipSchemaUpdateStrategy.class.getName(), node2
                .getSchemaUpdateStrategyName());
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

        assertEquals(2, domain.getDataNodes().size());
        DataNode node1 = domain.getNode("node1");
        assertNotNull(node1);
        assertEquals(1, node1.getDataMaps().size());
        assertSame(map1, node1.getDataMaps().iterator().next());
        assertSame(node1, domain.lookupDataNode(map1));
        assertEquals(nodeDescriptor1.getDataSourceFactoryType(), node1
                .getDataSourceFactory());
        assertNotNull(node1.getDataSource());
        assertEquals(nodeDescriptor1.getParameters(), node1.getDataSourceLocation());
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

        DataNode node2 = domain.getNode("node2");
        assertNotNull(node2);
        assertEquals(1, node2.getDataMaps().size());
        assertSame(map2, node2.getDataMaps().iterator().next());
        assertSame(node2, domain.lookupDataNode(map2));
        assertNull(node2.getDataSourceFactory());
        assertNotNull(node2.getDataSource());
        assertEquals(nodeDescriptor2.getParameters(), node2.getDataSourceLocation());
        assertEquals(SkipSchemaUpdateStrategy.class.getName(), node2
                .getSchemaUpdateStrategyName());
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

    protected void prepare() {

        prepareDataMap();

        DataDomain domain = getDomain();
        DataNode node = domain.lookupDataNode(domain.getMap("people"));
        domain.removeDataNode(node.getName());

        node.addDataMap(testMap);
        domain.addNode(node);
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

    }

    protected void cleanup(DataContext context) {
        DataDomain domain = getDomain();
        domain.removeMap(testMap.getName());
        DataNode node = domain.lookupDataNode(domain.getMap("people"));

        ExtendedTypeMap map = node.getAdapter().getExtendedTypes();
        map.unregisterType(CAY_207String1.class.getName());
        map.unregisterType(CAY_207String2.class.getName());
    }
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

        assertEquals(2, domain.getDataNodes().size());
        DataNode node1 = domain.getDataNode("node1");
        assertNotNull(node1);
        assertEquals(1, node1.getDataMaps().size());
        assertSame(map1, node1.getDataMaps().iterator().next());
        assertSame(node1, domain.lookupDataNode(map1));
        assertEquals(nodeDescriptor1.getDataSourceFactoryType(), node1
                .getDataSourceFactory());
        assertNotNull(node1.getDataSource());
        assertEquals(nodeDescriptor1.getParameters(), node1.getDataSourceLocation());
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

        DataNode node2 = domain.getDataNode("node2");
        assertNotNull(node2);
        assertEquals(1, node2.getDataMaps().size());
        assertSame(map2, node2.getDataMaps().iterator().next());
        assertSame(node2, domain.lookupDataNode(map2));
        assertNull(node2.getDataSourceFactory());
        assertNotNull(node2.getDataSource());
        assertEquals(nodeDescriptor2.getParameters(), node2.getDataSourceLocation());
        assertEquals(SkipSchemaUpdateStrategy.class.getName(), node2
                .getSchemaUpdateStrategyName());
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

        DataDomain domain = dataContext.getParentDataDomain();

        Iterator maps = domain.getDataMaps().iterator();
        while (maps.hasNext()) {
            DataMap map = (DataMap) maps.next();
            DataNode node = domain.lookupDataNode(map);
            DbAdapter adapter = node.getAdapter();
            DbGenerator generator = new DbGenerator(adapter, map);

            try {
                generator.runGenerator(node.getDataSource());
View Full Code Here

Examples of org.apache.cayenne.access.DataDomain.lookupDataNode()

        assertEquals(2, domain.getDataNodes().size());
        DataNode node1 = domain.getNode("node1");
        assertNotNull(node1);
        assertEquals(1, node1.getDataMaps().size());
        assertSame(map1, node1.getDataMaps().iterator().next());
        assertSame(node1, domain.lookupDataNode(map1));
        assertEquals(nodeDescriptor1.getDataSourceFactoryType(), node1
                .getDataSourceFactory());
        assertNotNull(node1.getDataSource());
        assertEquals(nodeDescriptor1.getParameters(), node1.getDataSourceLocation());
View Full Code Here
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.