Package org.apache.cayenne.conn

Examples of org.apache.cayenne.conn.DriverDataSource


          .newInstance(DbAdapter.class, JdbcAdapter.class.getName())
          : (DbAdapter) objectFactory.newInstance(DbAdapter.class,
              adapter);

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

      // Load the data map and run the db importer.
      final LoaderDelegate loaderDelegate = new LoaderDelegate();
      final DbLoader loader = new DbLoader(dataSource.getConnection(),
          adapterInst, loaderDelegate);
      loader.setCreatingMeaningfulPK(meaningfulPk);

      if (namingStrategy != null) {
        final NamingStrategy namingStrategyInst = (NamingStrategy) Class
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.