Examples of OracleConnection


Examples of oracle.jdbc.OracleConnection

        OracleConnection oracleConn = unwrap(conn);
        oracleConn.openProxySession(type, prop);
    }

    public static int getDefaultExecuteBatch(Connection conn) throws SQLException {
        OracleConnection oracleConn = unwrap(conn);
        return oracleConn.getDefaultExecuteBatch();
    }
View Full Code Here

Examples of oracle.jdbc.OracleConnection

     * INTERNAL:
     * Clears both implicit and explicit caches of OracleConnection
     */
    public void clearOracleConnectionCache(Connection conn) {
        if(conn instanceof OracleConnection){
            OracleConnection oracleConnection = (OracleConnection)conn;
            try {
                if(oracleConnection.getImplicitCachingEnabled()) {
                    oracleConnection.purgeImplicitCache();
                }
            } catch(SQLException ex) {
                // ignore
            }
            try {
                if(oracleConnection.getExplicitCachingEnabled()) {
                    oracleConnection.purgeExplicitCache();
                }
            } catch(SQLException ex) {
                // ignore
            }
        }
View Full Code Here

Examples of oracle.jdbc.OracleConnection

     * INTERNAL:
     * Clears both implicit and explicit caches of OracleConnection
     */
    public void clearOracleConnectionCache(Connection conn) {
        if(conn instanceof OracleConnection){
            OracleConnection oracleConnection = (OracleConnection)conn;
            try {
                if(oracleConnection.getImplicitCachingEnabled()) {
                    oracleConnection.purgeImplicitCache();
                }
            } catch(SQLException ex) {
                // ignore
            }
            try {
                if(oracleConnection.getExplicitCachingEnabled()) {
                    oracleConnection.purgeExplicitCache();
                }
            } catch(SQLException ex) {
                // ignore
            }
        }
View Full Code Here

Examples of oracle.jdbc.OracleConnection

        super.connect();
        fixture = new GeometryFixture();
        this.connection = setup.getDataSource().getConnection();
       
        UnWrapper unwrapper = DataSourceFinder.getUnWrapper(this.connection);
        OracleConnection oraConn = (OracleConnection) unwrapper.unwrap(this.connection);
        converter = new GeometryConverter(oraConn);
    }
View Full Code Here

Examples of oracle.jdbc.OracleConnection

            dataStore.setFetchSize(200);
        }
       
        Connection cx = dataStore.getConnection(Transaction.AUTO_COMMIT);
        try {
            OracleConnection oracleConnection = dialect.unwrapConnection( cx );
        } catch (SQLException e) {
            throw new IOException(
                    "Unable to obtain Oracle Connection require for SDO Geometry access)."+
                    "Check connection pool implementation to unsure unwrap is available", e);
        }
View Full Code Here

Examples of oracle.jdbc.OracleConnection

        if (struct == null) {
            return null;
        }

        // unwrap the connection and create a converter
        OracleConnection ocx = unwrapConnection(cx);
        GeometryConverter converter = factory != null ? new GeometryConverter(ocx, factory)
                : new GeometryConverter(ocx);

        return converter.asGeometry((STRUCT) struct);
    }
View Full Code Here

Examples of oracle.jdbc.OracleConnection

        if (g == null) {
            ps.setNull(column, Types.STRUCT, "MDSYS.SDO_GEOMETRY");
            return;
        }

        OracleConnection ocx = unwrapConnection(ps.getConnection());

        GeometryConverter converter = new GeometryConverter(ocx);
        STRUCT s = converter.toSDO(g, srid);
        ps.setObject(column, s);
View Full Code Here

Examples of oracle.jdbc.driver.OracleConnection

    public Connection connect(String s, Properties properties) throws SQLException{
        if (getDriver() == null)
            return null;

        //has to return null if no connection available for compliance with the JDBC appi
        OracleConnection con = (OracleConnection) getDriver().connect(s, properties);
        if (con != null)
            return new JdbcLoggerOracleConnectionWrapper(con, formatters);
        return null;

    }
View Full Code Here

Examples of oracle.jdbc.driver.OracleConnection

      if(connection==null ){
        result.setFailed(OLAP_CONNECTION_NOT_AVAILABLE);
        return result;
      }
     
      OracleConnection conn = (OracleConnection) connection;
      try{
        awConnection = new AWConnection(conn);
      }catch(Exception e){
        result.setFailed(e.getMessage());
        e.printStackTrace();
        return result;
      }
      Interaction curInteraction = new Interaction();

        // Set the AWConnection to use when building the analytic workspace.
        curInteraction.setConnection(awConnection);

        // Create an BuildDatabase object.
        BuildDatabase myBuild =
                 (BuildDatabase)curInteraction.createAction("BUILDDATABASE");

        // Set the name of the analytic workspace.
        myBuild.setAWName(WebVariable.AW_GLOBAL_ID);//挂载分析空间global.global

        // Specify not running solves when building the database.
       
        myBuild.setBuildType("EXECUTE");
//        myBuild.setRunSolve(true);
        myBuild.setCleanMeasures(false);
        myBuild.setCleanAttrs(false);
        myBuild.setCleanDim(true);
        myBuild.setTrackStatus(true);
       
//        myBuild.setId("simple");
        /**!
         * TrackStatus
         * true只导入增量数据
         * false全数据导入
         */
//        myBuild.setTrackStatus(isFull);
        myBuild.setMaxJobQueues(0);
        if(dims!=null){
          for(String dimid:dims){
            Dimension dim = new Dimension();
            dim.setId(dimid);
            myBuild.addBuildList(dim);
          }
        }
        if(cubes!=null){
          for(String cubeid:cubes){
            Cube cube = new Cube();
            cube.setId(cubeid);
            myBuild.addBuildList(cube);
          }
        }
       
        myBuild.Execute();
        awConnection.executeCommand("aw detach "+WebVariable.AW_GLOBAL_ID);
        result.setSucceed(getOLAPLog(conn));
        awConnection.close();
        conn.close();
       
    } catch (Exception e) {
      e.printStackTrace();
      result.setFailed(OLAP_MAINTAIN_FAILED,e.getMessage());
    } finally{
View Full Code Here

Examples of oracle.jdbc.driver.OracleConnection

      if(connection==null || !(connection instanceof OracleConnection)){
        result.setFailed(OLAP_CONNECTION_NOT_AVAILABLE);
        return result;
      }
      OracleConnection conn = (OracleConnection) connection;
      try{
        awConnection = new AWConnection(conn);
      }catch(Exception e){
        result.setFailed(e.getMessage());
        e.printStackTrace();
        return result;
      }
      Interaction curInteraction = new Interaction();

        // Set the AWConnection to use when building the analytic workspace.
        curInteraction.setConnection(awConnection);

        // Create an BuildDatabase object.
        BuildDatabase myBuild =
                 (BuildDatabase)curInteraction.createAction("BUILDDATABASE");

        // Set the name of the analytic workspace.
        myBuild.setAWName(WebVariable.AW_GLOBAL_ID);//挂载分析空间global.global

        // Specify not running solves when building the database.
       
        myBuild.setBuildType("EXECUTE");
        myBuild.setRunSolve(true);
       
        if(solveGroups!=null)
        {
          for(String solveGroupid:solveGroups)
          {
            SolveGroup solveGroup = new SolveGroup();//计算计划属于SolveGroup型
            solveGroup.setId(solveGroupid);
            myBuild.addBuildList(solveGroup);
          }
        }
        myBuild.Execute();
        awConnection.executeCommand("aw detach "+WebVariable.AW_GLOBAL_ID);
        result.setSucceed(getOLAPLog(conn));
        awConnection.close();
        conn.close();
    }
    catch (Exception e)
    {
      e.printStackTrace();
      result.setFailed(CALCULATE_PLAN_EXECUTE_FAILED,e.getMessage());
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.