Package com.opengamma.util.db.tool

Examples of com.opengamma.util.db.tool.DbTool.execute()


    dbTool.setUser(props.getProperty(DB_USERNAME_KEY, ""));
    dbTool.setPassword(props.getProperty(DB_PASSWORD_KEY, ""));
    dbTool.setCreate(true);
    dbTool.setDrop(true);
    dbTool.setCreateTables(true);
    dbTool.execute();
  }

  private static Properties loadProperties(String configResourceLocation) throws IOException {
    Resource resource = ResourceUtils.createResource(configResourceLocation);
    Properties props = new Properties();
View Full Code Here


    dbTool.setCatalog("og-financial");
    dbTool.setJdbcUrl(props.getProperty(JDBC_URL_KEY));
    dbTool.setUser(props.getProperty(DB_USERNAME_KEY, ""));
    dbTool.setPassword(props.getProperty(DB_PASSWORD_KEY, ""));
    dbTool.setDrop(true);
    dbTool.execute();
  }

  public static String getJettyPort(String configResourceLocation) throws IOException {
    Properties props = loadProperties(configResourceLocation);
    return props.getProperty("jetty.port");
View Full Code Here

    dbTool.setPassword(props.getProperty(KEY_SHARED_PASSWORD, ""));
    dbTool.setCatalog(CATALOG)// ignored, as it is parsed from the url
    dbTool.setCreate(true);
    dbTool.setDrop(true);
    dbTool.setCreateTables(true);
    dbTool.execute();
   
    // create user database
    s_logger.info("Creating user database...");
    DbTool dbToolUser = new DbTool();
    dbToolUser.setJdbcUrl(Objects.requireNonNull(props.getProperty(KEY_USERFINANCIAL_URL)));
View Full Code Here

    dbToolUser.setPassword(props.getProperty(KEY_USERFINANCIAL_PASSWORD, ""));
    dbToolUser.setCatalog(CATALOG)// ignored, as it is parsed from the url
    dbToolUser.setCreate(true);
    dbToolUser.setDrop(true);
    dbToolUser.setCreateTables(true);
    dbToolUser.execute();
   
    // populate the database
    s_logger.info("Populating main database...");
    new ExampleDatabasePopulator().run(ResourceUtils.toResourceLocator(res), IntegrationToolContext.class);
   
View Full Code Here

    dbTool.setPassword(props.getProperty(KEY_SHARED_PASSWORD, ""));
    dbTool.setCatalog(CATALOG)// ignored, as it is parsed from the url
    dbTool.setCreate(true);
    dbTool.setDrop(true);
    dbTool.setCreateTables(true);
    dbTool.execute();
   
    // create user database
    s_logger.info("Creating user database...");
    DbTool dbToolUser = new DbTool();
    dbToolUser.setJdbcUrl(Objects.requireNonNull(props.getProperty(KEY_USERFINANCIAL_URL)));
View Full Code Here

    dbToolUser.setPassword(props.getProperty(KEY_USERFINANCIAL_PASSWORD, ""));
    dbToolUser.setCatalog(CATALOG)// ignored, as it is parsed from the url
    dbToolUser.setCreate(true);
    dbToolUser.setDrop(true);
    dbToolUser.setCreateTables(true);
    dbToolUser.execute();
   
    // populate the database
    s_logger.info("Populating main database...");
    ServerDatabasePopulator populator = new ServerDatabasePopulator(_configFile, new DatabasePopulatorTool(_serverUrl));
    populator.run();
View Full Code Here

    dbTool.setPassword(props.getProperty(KEY_SHARED_PASSWORD, ""));
    dbTool.setCatalog(CATALOG)// ignored, as it is parsed from the url
    dbTool.setCreate(true);
    dbTool.setDrop(true);
    dbTool.setCreateTables(true);
    dbTool.execute();
   
    // create user database
    s_logger.warn("Creating user database...");
    DbTool dbToolUser = new DbTool();
    dbToolUser.setJdbcUrl(Objects.requireNonNull(props.getProperty(KEY_USERFINANCIAL_URL)));
View Full Code Here

    dbToolUser.setPassword(props.getProperty(KEY_USERFINANCIAL_PASSWORD, ""));
    dbToolUser.setCatalog(CATALOG)// ignored, as it is parsed from the url
    dbToolUser.setCreate(true);
    dbToolUser.setDrop(true);
    dbToolUser.setCreateTables(true);
    dbToolUser.execute();
   
    // populate the database
    s_logger.warn("Populating main database...");
    new ExampleDatabasePopulator().run(ResourceUtils.toResourceLocator(res), ToolContext.class);
   
View Full Code Here

    dbTool.setUser(props.getProperty(DB_USERNAME_KEY, ""));
    dbTool.setPassword(props.getProperty(DB_PASSWORD_KEY, ""));
    dbTool.setCreate(true);
    dbTool.setDrop(true);
    dbTool.setCreateTables(true);
    dbTool.execute();
   
    if (StringUtils.isNotEmpty(props.getProperty(JDBC_URL_KEY_USER))) {
      DbTool dbTool2 = new DbTool();
      dbTool2.setCatalog("og-financial");
      dbTool2.setJdbcUrl(props.getProperty(JDBC_URL_KEY_USER));
View Full Code Here

      dbTool2.setUser(props.getProperty(DB_USERNAME_KEY, ""));
      dbTool2.setPassword(props.getProperty(DB_PASSWORD_KEY, ""));
      dbTool2.setCreate(true);
      dbTool2.setDrop(true);
      dbTool2.setCreateTables(true);
      dbTool2.execute();
    }
  }
 
  public static Properties loadProperties(String configResourceLocation) throws IOException {
    Resource resource = ResourceUtils.createResource(configResourceLocation);
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.