Package org.apache.cayenne.project

Examples of org.apache.cayenne.project.ProjectDataSource


        // use domain name as DataNode base, as node names must be unique across the
        // 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());
View Full Code Here


        if (getNode() == null || getNode().getDataSource() == null) {
            return;
        }

        ProjectDataSource projectDS = (ProjectDataSource) getNode().getDataSource();

        ProjectController parent = (ProjectController) getParent();
        String key = parent.getDataNodePreferences().getLocalDataSource();
        if (key == null) {
            mainController.updateStatus("No Local DataSource selected for node...");
            return;
        }

        DBConnectionInfo dataSource = (DBConnectionInfo) parent
                .getApplicationPreferenceDomain()
                .getDetail(key, DBConnectionInfo.class, false);

        if (dataSource != null) {
            if (dataSource.copyTo(projectDS.getDataSourceInfo())) {
                refreshView();
                super.nodeChangeProcessor.modelUpdated(null, null, null);
                mainController.updateStatus(null);
            }
            else {
View Full Code Here

        if (getNode() == null || getNode().getDataSource() == null) {
            return;
        }

        ProjectDataSource projectDS = (ProjectDataSource) getNode().getDataSource();

        ProjectController parent = (ProjectController) getParent();
        String key = parent.getDataNodePreferences().getLocalDataSource();
        if (key == null) {
            mainController.updateStatus("No Local DataSource selected for node...");
            return;
        }

        DBConnectionInfo dataSource = (DBConnectionInfo) parent
                .getApplicationPreferenceDomain()
                .getDetail(key, DBConnectionInfo.class, false);

        if (dataSource != null) {
            if (dataSource.copyTo(projectDS.getDataSourceInfo())) {
                refreshView();
                super.nodeChangeProcessor.modelUpdated(null, null, null);
                mainController.updateStatus(null);
            }
            else {
View Full Code Here

        // use domain name as DataNode base, as node names must be unique across the
        // 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());
View Full Code Here

TOP

Related Classes of org.apache.cayenne.project.ProjectDataSource

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.