Examples of DbLoader


Examples of org.apache.cayenne.access.DbLoader

      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
            .forName(namingStrategy).newInstance();
        loader.setNamingStrategy(namingStrategyInst);
      }

      final DataMap dataMap = map.exists() ? loadDataMap()
          : new DataMap();
      loader.loadDataMapFromDB(schemaName, tablePattern, dataMap);

      for (ObjEntity addedObjEntity : loaderDelegate
          .getAddedObjEntities()) {
        DeleteRuleUpdater.updateObjEntity(addedObjEntity);
      }

      if (importProcedures) {
        loader.loadProceduresFromDB(schemaName, procedurePattern,
            dataMap);
      }

      // Write the new DataMap out to disk.
      map.delete();
View Full Code Here

Examples of org.jasig.portal.tools.dbloader.DbLoader

            config.setDropTables(dropTables);
            config.setPopulateTables(populateTables);
            config.setTablesURL(tablesURL);
            config.setDataURL(dataURL);
           
            DbLoader loader = new DbLoader(config);
           
            String dataString = "(no data definition)";
            if (dataURL != null) {
                dataString = dataURL.toString();
            }
           
            try
            {
                loader.process();
                logWriter.flush();
                if (config.getScriptWriter() != null )
                    config.getScriptWriter().flush();
                if (log.isInfoEnabled())
                    log.info(
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.