Package org.apache.cayenne.conn

Examples of org.apache.cayenne.conn.DriverDataSource


            generator.setShouldCreateTables(createTables);
            generator.setShouldDropPKSupport(dropPK);
            generator.setShouldDropTables(dropTables);

            // load driver taking custom CLASSPATH into account...
            DriverDataSource dataSource = new DriverDataSource((Driver) Class.forName(
                    driver).newInstance(), url, userName, password);

            generator.runGenerator(dataSource);
        }
        catch (Exception ex) {
View Full Code Here


        if (isEmpty(true)) {
            return;
        }

        Driver driver = (Driver) Class.forName(dsi.getJdbcDriver()).newInstance();
        DataSource dataSource = new DriverDataSource(driver, dsi.getDataSourceUrl(), dsi
                .getUserName(), dsi.getPassword());

        runGenerator(dataSource);
    }
View Full Code Here

            generator.setShouldCreateTables(createTables);
            generator.setShouldDropPKSupport(dropPK);
            generator.setShouldDropTables(dropTables);

            // load driver taking custom CLASSPATH into account...
            DriverDataSource dataSource = new DriverDataSource((Driver) Class.forName(
                    driver).newInstance(), url, userName, password);

            generator.runGenerator(dataSource);
        }
        catch (Exception ex) {
View Full Code Here

        if (properties == null) {
            throw new IllegalArgumentException("'nodeDescriptor' contains no datasource descriptor");
        }

        Driver driver = objectFactory.newInstance(Driver.class, properties.getJdbcDriver());
        return new DriverDataSource(driver, properties.getDataSourceUrl(), properties.getUserName(),
                properties.getPassword());
    }
View Full Code Here

            // Load the data map and run the db generator.
            DataMap dataMap = loadDataMap();

            // load driver taking custom CLASSPATH into account...
            DriverDataSource dataSource = new DriverDataSource((Driver) Class.forName(driver).newInstance(), url,
                    userName, password);

            DbAdapter adapter = getAdapter(injector, dataSource);

            DbGenerator generator = new DbGenerator(adapter, dataMap, Collections.<DbEntity> emptyList(), null,
View Full Code Here

        if (isEmpty(true)) {
            return;
        }

        Driver driver = (Driver) Class.forName(dsi.getJdbcDriver()).newInstance();
        DataSource dataSource = new DriverDataSource(
                driver,
                dsi.getDataSourceUrl(),
                dsi.getUserName(),
                dsi.getPassword());
View Full Code Here

            generator.setShouldCreateTables(createTables);
            generator.setShouldDropPKSupport(dropPK);
            generator.setShouldDropTables(dropTables);

            // load driver taking custom CLASSPATH into account...
            DriverDataSource dataSource = new DriverDataSource((Driver) Class.forName(driver).newInstance(), url,
                    username, password);

            generator.runGenerator(dataSource);
        } catch (Exception ex) {
            Throwable th = Util.unwindException(ex);
View Full Code Here

        catch (Throwable th) {
            th = Util.unwindException(th);
            throw new SQLException("Driver load error: " + th.getLocalizedMessage());
        }

        return new DriverDataSource(driver, getUrl(), getUserName(), getPassword());
    }
View Full Code Here

        catch (Throwable th) {
            th = Util.unwindException(th);
            throw new SQLException("Driver load error: " + th.getLocalizedMessage());
        }

        return new DriverDataSource(driver, getUrl(), getUserName(), getPassword());
    }
View Full Code Here

            generator.setShouldCreateTables(createTables);
            generator.setShouldDropPKSupport(dropPK);
            generator.setShouldDropTables(dropTables);

            // load driver taking custom CLASSPATH into account...
            DriverDataSource dataSource = new DriverDataSource((Driver) Class.forName(
                    driver).newInstance(), url, username, password);

            generator.runGenerator(dataSource);
        }
        catch (Exception ex) {
View Full Code Here

TOP

Related Classes of org.apache.cayenne.conn.DriverDataSource

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.