Package org.apache.cayenne.modeler.util

Examples of org.apache.cayenne.modeler.util.ModelerDbAdapter$AdapterFactory


     * Handles saving adapter name for CustomDbAdapter that is only used within Modeler.
     */
    public String nodeAdapterName(String domainName, String nodeName) {
        DbAdapter adapter = findNode(domainName, nodeName).getAdapter();
        if (adapter instanceof ModelerDbAdapter) {
            ModelerDbAdapter customAdapter = (ModelerDbAdapter) adapter;
            return customAdapter.getAdapterClassName();
        }

        return super.nodeAdapterName(domainName, nodeName);
    }
View Full Code Here


        // project...
        DataNode node = createDataNode(domain);

        ProjectDataSource src = new ProjectDataSource(new DataSourceInfo());
        node.setDataSource(src);
        node.setAdapter(new ModelerDbAdapter(src));

        // by default create JDBC Node
        node.setDataSourceFactory(DriverDataSourceFactory.class.getName());

        domain.addNode(node);
View Full Code Here

    public ModelerProjectLoadDelegate(Configuration configuration) {
        super(configuration, configuration.getLoadStatus());
    }

    protected void initAdapter(DataNode node, String adapterName) {
        node.setAdapter(new ModelerDbAdapter(adapterName, node.getDataSource()));
    }
View Full Code Here

    public void setAdapterName(String name) {
        if (node == null) {
            return;
        }

        ModelerDbAdapter adapter = new ModelerDbAdapter(name, node.getDataSource());
        adapter.validate();
        node.setAdapter(adapter);
       
        DataNodeEvent e = new DataNodeEvent(AdapterEditor.this, node);
        ((ProjectController) getParent()).fireDataNodeEvent(e);
    }
View Full Code Here

    public void setAdapterName(String name) {
        if (node == null) {
            return;
        }

        ModelerDbAdapter adapter = new ModelerDbAdapter(name, node.getDataSource());
        adapter.validate();
        node.setAdapter(adapter);
       
        DataNodeEvent e = new DataNodeEvent(AdapterEditor.this, node);
        ((ProjectController) getParent()).fireDataNodeEvent(e);
    }
View Full Code Here

        // project...
        DataNode node = buildDataNode(domain);

        ProjectDataSource src = new ProjectDataSource(new DataSourceInfo());
        node.setDataSource(src);
        node.setAdapter(new ModelerDbAdapter(src));

        // by default create JDBC Node
        node.setDataSourceFactory(DriverDataSourceFactory.class.getName());
        node.setSchemaUpdateStrategyName(SkipSchemaUpdateStrategy.class.getName());
View Full Code Here

     * Handles saving adapter name for CustomDbAdapter that is only used within Modeler.
     */
    public String nodeAdapterName(String domainName, String nodeName) {
        DbAdapter adapter = findNode(domainName, nodeName).getAdapter();
        if (adapter instanceof ModelerDbAdapter) {
            ModelerDbAdapter customAdapter = (ModelerDbAdapter) adapter;
            return customAdapter.getAdapterClassName();
        }

        return super.nodeAdapterName(domainName, nodeName);
    }
View Full Code Here

    protected void updateDefaults(DataDomain domain) {
        // do nothing...
    }

    protected void initAdapter(DataNode node, String adapterName) {
        node.setAdapter(new ModelerDbAdapter(adapterName, node.getDataSource()));
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.modeler.util.ModelerDbAdapter$AdapterFactory

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.