Examples of DBType


Examples of org.apache.oozie.util.db.Schema.DBType

            conn.prepareStatement(createStmt).execute();
        }
    }

    public static void dropSchema(Connection conn) throws SQLException {
        DBType type = DBType.ORACLE;
        if (Schema.isHsqlConnection(conn)) {
            type = DBType.HSQL;
        }
        else {
            if (Schema.isMySqlConnection(conn)) {
                type = DBType.MySQL;
            }
            else {
                // do not drop database for oracle, only drop tables
                dropTables(conn);
                return;
            }
        }

        conn.prepareStatement("DROP " + ((type.equals(DBType.MySQL) || type.equals(DBType.ORACLE)) ? "DATABASE " : "SCHEMA ") +
                ((type.equals(DBType.MySQL) || type.equals(DBType.HSQL)) ? DB_NAME : "") +
                (type.equals(DBType.HSQL) ? " CASCADE" : "")).execute();
    }
View Full Code Here

Examples of org.apache.oozie.util.db.Schema.DBType

                ((type.equals(DBType.MySQL) || type.equals(DBType.HSQL)) ? DB_NAME : "") +
                (type.equals(DBType.HSQL) ? " CASCADE" : "")).execute();
    }

    public static void dropTables(Connection conn) throws SQLException {
        DBType type = DBType.ORACLE;
        if (Schema.isHsqlConnection(conn)) {
            type = DBType.HSQL;
        }
        else {
            if (Schema.isMySqlConnection(conn)) {
View Full Code Here

Examples of org.apache.oozie.util.db.Schema.DBType

            return idxCol;
        }
    }

    public static void prepareDB(Connection conn) throws SQLException {
        DBType type = DBType.ORACLE;
        if (Schema.isHsqlConnection(conn)) {
            type = DBType.HSQL;
        }
        else {
            if (Schema.isMySqlConnection(conn)) {
                type = DBType.MySQL;
            }
        }

        if (!type.equals(DBType.ORACLE)) {
            conn.prepareStatement(
                    "CREATE " + (type.equals(DBType.MySQL) ? "DATABASE " : "SCHEMA ") + DB_NAME
                            + (type.equals(DBType.HSQL) ? " AUTHORIZATION DBA" : "")).execute();
        }
        for (Table table : TABLE_COLUMNS.keySet()) {
            String createStmt = Schema.generateCreateTableScript(table, type, TABLE_COLUMNS.get(table));
            conn.prepareStatement(createStmt).execute();
        }
View Full Code Here

Examples of org.apache.oozie.util.db.Schema.DBType

            conn.prepareStatement(createStmt).execute();
        }
    }

    public static void dropSchema(Connection conn) throws SQLException {
        DBType type = DBType.ORACLE;
        if (Schema.isHsqlConnection(conn)) {
            type = DBType.HSQL;
        }
        else {
            if (Schema.isMySqlConnection(conn)) {
                type = DBType.MySQL;
            }
            else {
                // do not drop database for oracle, only drop tables
                dropTables(conn);
                return;
            }
        }

        conn.prepareStatement("DROP " + ((type.equals(DBType.MySQL) || type.equals(DBType.ORACLE)) ? "DATABASE " : "SCHEMA ") +
                ((type.equals(DBType.MySQL) || type.equals(DBType.HSQL)) ? DB_NAME : "") +
                (type.equals(DBType.HSQL) ? " CASCADE" : "")).execute();
    }
View Full Code Here

Examples of org.apache.oozie.util.db.Schema.DBType

                ((type.equals(DBType.MySQL) || type.equals(DBType.HSQL)) ? DB_NAME : "") +
                (type.equals(DBType.HSQL) ? " CASCADE" : "")).execute();
    }

    public static void dropTables(Connection conn) throws SQLException {
        DBType type = DBType.ORACLE;
        if (Schema.isHsqlConnection(conn)) {
            type = DBType.HSQL;
        }
        else {
            if (Schema.isMySqlConnection(conn)) {
View Full Code Here

Examples of org.apache.openmeetings.cli.ConnectionProperties.DbType

public abstract class ConnectionPropertiesPatcher {
  protected static final String URL_PREFIX = "Url=";
  protected ConnectionProperties connectionProperties;
 
  public static ConnectionPropertiesPatcher getPatcher(String _dbType, ConnectionProperties connectionProperties) {
    DbType dbType = DbType.valueOf(_dbType);
    ConnectionPropertiesPatcher patcher = null;
    switch (dbType) {
      case db2:
        patcher = new Db2Patcher();
        break;
View Full Code Here

Examples of org.apache.openmeetings.cli.ConnectionProperties.DbType

public abstract class ConnectionPropertiesPatcher {
  protected static final String URL_PREFIX = "Url=";
  protected ConnectionProperties connectionProperties;
 
  public static ConnectionPropertiesPatcher getPatcher(String _dbType, ConnectionProperties connectionProperties) {
    DbType dbType = DbType.valueOf(_dbType);
    ConnectionPropertiesPatcher patcher = null;
    switch (dbType) {
      case db2:
        patcher = new Db2Patcher();
        break;
View Full Code Here

Examples of org.apache.openmeetings.cli.ConnectionProperties.DbType

public abstract class ConnectionPropertiesPatcher {
  protected static final String URL_PREFIX = "Url=";
  protected ConnectionProperties connectionProperties;
 
  static ConnectionPropertiesPatcher getPatcher(String _dbType, ConnectionProperties connectionProperties) {
    DbType dbType = DbType.valueOf(_dbType);
    ConnectionPropertiesPatcher patcher = null;
    switch (dbType) {
      case db2:
        patcher = new Db2Patcher();
        break;
View Full Code Here

Examples of org.apache.openmeetings.cli.ConnectionProperties.DbType

public abstract class ConnectionPropertiesPatcher {
  protected static final String URL_PREFIX = "Url=";
  protected ConnectionProperties connectionProperties;
 
  public static ConnectionPropertiesPatcher getPatcher(String _dbType, ConnectionProperties connectionProperties) {
    DbType dbType = DbType.valueOf(_dbType);
    ConnectionPropertiesPatcher patcher = null;
    switch (dbType) {
      case db2:
        patcher = new Db2Patcher();
        break;
View Full Code Here

Examples of org.mule.module.db.internal.domain.type.DbType

    }

    private QueryParam overrideParam(QueryParam templateParam, QueryParam queryParam)
    {
        QueryParam overriddenParam;
        DbType paramType = templateParam.getType();
        if (!(queryParam.getType() instanceof UnknownDbType))
        {
           paramType = queryParam.getType();
        }
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.