Package org.apache.cayenne.access

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


    protected void prepare() {

        prepareDataMap();

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

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

    }

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

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

    protected void initSchema() {
        DataDomain domain = dataContext.getParentDataDomain();

        for (DataMap dataMap : domain.getDataMaps()) {
            DataMap map = dataMap;
            DataNode node = domain.lookupDataNode(map);
            DbAdapter adapter = node.getAdapter();
            DbGenerator generator = new DbGenerator(adapter, map);

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

        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

        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

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.