Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2.0.4)

B14351-04

oracle.AWXML
Class AWConnection

java.lang.Object
  extended byoracle.AWXML.AWConnection

public class AWConnection
extends java.lang.Object

Establishes a JDBC connection to an Oracle Database instance and a context within the database for processing actions specified by Analytic Workspace Java API objects. When instantiated, an AWConnection object invokes the getConnection method in the oracle.jdbc.DriverManager class to load a JDBC driver and create a connection object.

An AWConnection object is only used by client applications that connect through JDBC. It is not used to implement information stored in XML and executed by the EXECUTEFILE PL/SQL function.


Field Summary
static java.lang.String CommitMode
          Indicates whether an action method updates the stored analytic workspace and commits those changes in the relational database tables.
 
Constructor Summary
AWConnection(oracle.jdbc.OracleConnection connection)
          Opens a database connection through JDBC and establishes the OLAP processing environment within the context of the connection.
AWConnection(java.lang.String user, java.lang.String pwd, java.lang.String inputConnectString)
          Opens a database connection through JDBC and establishes the OLAP processing environment within the context of the connection.
 
Method Summary
 java.sql.Connection getSQLConnection()
          Gets the java.sql.Connection for this AWConnection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CommitMode

public static java.lang.String CommitMode
Indicates whether an action method updates the stored analytic workspace and commits those changes in the relational database tables. Action methods begin with an initial capital letter, such as Create, Delete, and so on. Specify TRUE if you want the action methods to update the stored analytic workspace and commit the changes. Specify FALSE if you want an update and commit to occur only when you use the AWAction package classes. The default value is FALSE.

Constructor Detail

AWConnection

public AWConnection(java.lang.String user,
                    java.lang.String pwd,
                    java.lang.String inputConnectString)
Opens a database connection through JDBC and establishes the OLAP processing environment within the context of the connection. The arguments to the AWConnection constructor are a connect string, a user ID, and a password.

For a thin connection (recommended) specify a connect string with the format:

 host_name:port#:SID
where host_name is the name of the host computer, port# is the number of the TCP/IP port for the connection, and SID is the name of the database instance (service identifier). AWConnection uses this input to construct the connect string jdbc:oracle:thin:@host_name:port#:SID which it passes to the oracle.jdbc.DriverManager.getConnection method to create the connection.

For a thick connection specify the name of an entry in the tnsnames.ora file as the connect string. AWConnection uses this name to construct the connect string jdbc:oracle:oci:@tnsnames_descriptor which it passes to the oracle.jdbc.DriverManager.getConnection method to create the connection.

The following example gets the user ID, password, and connect string from a Properties object.

 String user = props.getProperty("user");
 String password = props.getProperty("password");
 String conn = props.getProperty("conn");

 try
 {
   AWConnection awConnection = new AWConnection(user, pwd, conn);
 }
 catch (Exception e) 
 {
   System.out.println(e);
 } 

Parameters:
user - The user ID for the connection.
pwd - The password for the connection.
inputConnectString - The connect string that specifies the connection.

AWConnection

public AWConnection(oracle.jdbc.OracleConnection connection)
Opens a database connection through JDBC and establishes the OLAP processing environment within the context of the connection.

Parameters:
connection - An OracleConnection that specifes a connection to an Oracle Database instance. For information on creating an OracleConnection, see Oracle JDBC Developer's Guide and Reference.
Method Detail

getSQLConnection

public java.sql.Connection getSQLConnection()
Gets the java.sql.Connection for this AWConnection.

Returns:
The java.sql.Connection for this AWConnection.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2.0.4)

B14351-04

Copyright © 2003, 2007 Oracle. All rights reserved.