Package com.opengamma.util.db.tool

Examples of com.opengamma.util.db.tool.DbTool


   * Initializes the DBTool outside the constructor.
   * This works better with TestNG and Maven, where the constructor is called
   * even if the test is never run.
   */
  private DbTool initDbTool() {
    DbTool dbTool = _dbTool;
    if (dbTool == null) {
      synchronized (this) {
        dbTool = _dbTool;
        if (dbTool == null) {
          DbConnector connector = s_connectors.get(Pair.<String, Class<?>>of(_databaseType, dbConnectorScope()));
View Full Code Here


  }

  //-------------------------------------------------------------------------
  @BeforeMethod(alwaysRun = true)
  public void setUp() throws Exception {
    DbTool dbTool = getDbTool();
    dbTool.setTargetVersion(_targetVersion);
    dbTool.setCreateVersion(_createVersion);
    dbTool.dropTestSchema();
    dbTool.createTestSchema();
    dbTool.createTables(DbScriptUtils.getDbSchemaGroupMetadata(_schemaGroupName), dbTool.getTestCatalog(), dbTool.getTestSchema(), _targetVersion, _createVersion, this);
    dbTool.clearTestTables();
  }
View Full Code Here

   * Initializes the DBTool outside the constructor.
   * This works better with TestNG and Maven, where the constructor is called
   * even if the test is never run.
   */
  private DbTool initDbTool() {
    DbTool dbTool = _dbTool;
    if (dbTool == null) {
      synchronized (this) {
        dbTool = _dbTool;
        if (dbTool == null) {
          _dbTool = dbTool = DbTest.createDbTool(_databaseType, null)// CSIGNORE
View Full Code Here

    ArgumentChecker.notNull(databaseConfigPrefix, "databaseConfigPrefix");
    String dbHost = getDbHost(databaseConfigPrefix);
    String user = getDbUsername(databaseConfigPrefix);
    String password = getDbPassword(databaseConfigPrefix);
    DataSource dataSource = (connector != null ? connector.getDataSource() : null);
    DbTool dbTool = new DbTool(dbHost, user, password, dataSource);
    dbTool.initialize();
    dbTool.setJdbcUrl(dbTool.getTestDatabaseUrl());
    return dbTool;
  }
View Full Code Here

TOP

Related Classes of com.opengamma.util.db.tool.DbTool

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.