Examples of DatabaseType


Examples of org.rhq.core.db.DatabaseType

    @Override
    @RequiredPermission(Permission.MANAGE_SETTINGS)
    @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
    public long reindex(Subject whoami) {
        Connection conn = null;
        DatabaseType dbtype = null;
        try {
            conn = dataSource.getConnection();
            dbtype = DatabaseTypeFactory.getDefaultDatabaseType();
            long duration = 0;
            if (DatabaseTypeFactory.isPostgres(dbtype)) {
                for (String table : TABLES_TO_REINDEX) {
                    duration += doCommand(dbtype, conn, SQL_REINDEX, table);
                }
            } else if (DatabaseTypeFactory.isOracle(dbtype)) {
                for (String index : ORA_INDEXES_TO_REBUILD) {
                    duration += doCommand(dbtype, conn, SQL_REBUILD, index);
                }
            } else {
                return -1;
            }

            return duration;
        } catch (Exception e) {
            LOG.error("Error reindexing database", e);
            throw new RuntimeException("Error reindexing database", e);
        } finally {
            if (dbtype != null) {
                dbtype.closeConnection(conn);
            }
        }
    }
View Full Code Here

Examples of org.rhq.server.metrics.migrator.DataMigrator.DatabaseType

        serverProperties.load(stream);
        stream.close();

        //SQL options
        String dbType = serverProperties.getProperty("rhq.server.database.type-mapping");
        DatabaseType databaseType = DatabaseType.Postgres;
        if (dbType != null && dbType.toLowerCase().contains("oracle")) {
            databaseType = databaseType.Oracle;
        }

        configuration.put(sqlServerTypeOption, databaseType);
View Full Code Here

Examples of org.rhq.server.metrics.migrator.DataMigrator.DatabaseType

        log.debug("Creating Cassandra session");
        Session cassandraSession = this.createCassandraSession();
        log.debug("Done creating Cassandra session");

        DatabaseType databaseType = DatabaseType.Postgres;
        if (configuration.get(sqlServerTypeOption) != null) {
            databaseType = (DatabaseType) configuration.get(sqlServerTypeOption);
        }

        DataMigrator migrator = new DataMigrator(entityManager, cassandraSession, databaseType, tryParseBoolean(
View Full Code Here

Examples of org.springframework.batch.support.DatabaseType

    this.dataSource = dataSource;
  }

    @Override
  public DataFieldMaxValueIncrementer getIncrementer(String incrementerType, String incrementerName) {
    DatabaseType databaseType = DatabaseType.valueOf(incrementerType.toUpperCase());

    if (databaseType == DB2) {
      return new DB2SequenceMaxValueIncrementer(dataSource, incrementerName);
    }
    else if (databaseType == DB2ZOS) {
View Full Code Here

Examples of org.voltdb.compiler.projectfile.DatabaseType

            m_catalog.getClusters().get("cluster").
                setSecurityenabled(security.isEnabled());

        }

        DatabaseType database = project.getDatabase();
        if (database != null) {
            compileDatabaseNode(database);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.humantask.dao.DatabaseType

        }
    }

    protected DatabaseType determineDbType() {
        Connection con = null;
        DatabaseType dbType = null;
        try {
            con = getDBConnection();
            DatabaseMetaData metaData = con.getMetaData();
            if (metaData != null) {
                String dbProductName = metaData.getDatabaseProductName().toLowerCase();
View Full Code Here

Examples of tcg.common.DatabaseManager.DatabaseType

       
        //load configuration from properties file
        props_ = load_properties(configFile_);
       
    //set database type
        DatabaseType dbType = null;
    String dbTypeString = props_.getProperty("tcg.db.type", "");
    if (0 == dbTypeString.compareToIgnoreCase("MYSQL"))
    {
      dbType = DatabaseType.MYSQL;
    }
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.