SAP BI Java SDK

com.sap.ip.bi.sdk.dac.connector
Interface IBIConnection

All Superinterfaces:
javax.resource.cci.Connection, com.sapportals.connector.connection.IConnection

public interface IBIConnection
extends com.sapportals.connector.connection.IConnection

Creates the connection to an OLAP or relational data source. This interface extends SAP's Enterprise Portal Portal Connection Framework's IConnection interface. It is the entry point for accessing the information in an OLAP or relational data source.

Code example for a managed environment:

  Context initctx = null;
  IConnectionFactory connectionFactory = null;
  IConnection con;
    try
    {
      //obtain the initial JNDI context
      initctx = new InitialContext();
      // perform JNDI lookup to obtain connection factory
      connectionFactory = (IConnectionFactory)initctx.lookup("EISConnections/JDBCFactory");
    }
    catch (Exception e)
    { ...
    }

    try
    {
      // retrieve the ConnectionSpec and set the values
      IConnectionSpec spec = connectionFactory.getConnectionSpec();
      spec.setPropertyValue("url","jdbc:odbc:Northwind");

      // retrieve the connection handle
      con = connectionFactory.getConnectionEx(spec);
      IBIRelational relational = ((IBIConnection) con).getRelational();
      ...
    }
    catch (Exception e)
    { ...
    }
 


Code example for a non-managed environment:
 ManagedConnectionFactory mcf = new JDBCManagedConnectionFactory();
 IConnectionFactory cf = (IConnectionFactory) mcf.createConnectionFactory();
 IConnectionSpec cs = cf.getConnectionSpec();
 ((Map) cs).put("url","jdbc:odbc:Northwind");
 IConnection con = cf.getConnectionEx(cs);
 IBIRelational relational = ((IBIConnection) con).getRelational();
 

Since:
3.50

Inner Class Summary
static class IBIConnection.Supports
          Returns true or false, depending on what kind of service the data provider provides.
 
Method Summary
 IBIOlap getOlap()
          Provides OLAP data source functionality, such as retrieval of metadata, creation of the cubeView, and retrieval of the data set.
 IBIRelational getRelational()
          Provides relational data source functionality, such as retrieval of metadata, query creation, and retrieval of result sets.
 Boolean supports(IBIConnection.Supports feature)
          Returns true or false, depending on whether the features queried are supported or not.
 
Methods inherited from interface com.sapportals.connector.connection.IConnection
createInteractionEx, getFunctionsMetaData, getMetaDataEx, getObjectsMetaData, getRelationsMetaData, newExecution, newNativeQuery, newQuery, retrieveNative
 
Methods inherited from interface javax.resource.cci.Connection
close, createInteraction, getLocalTransaction, getMetaData, getResultSetInfo
 

Method Detail

supports

public Boolean supports(IBIConnection.Supports feature)
                 throws BIResourceException
Returns true or false, depending on whether the features queried are supported or not. The available features are RELATIONAL and OLAP.
Parameters:
feature - a feature, which can be supported by a specific connector
Returns:
true if the queried domain is supported; false if not
Throws:
BIResourceException - if the concrete resource adapter (BI Java Connector) encounters problem with the supports method
Since:
3.50

getRelational

public IBIRelational getRelational()
                            throws BIResourceException
Provides relational data source functionality, such as retrieval of metadata, query creation, and retrieval of result sets. This interface, retrieved from IBIConnection, must be implemented by every relational connector.
Returns:
the relational interface
Throws:
BIResourceException - if the concrete resource adapter (BI Java Connector) can't return a valid implementation of IBIRelational
Since:
3.50

getOlap

public IBIOlap getOlap()
                throws BIResourceException
Provides OLAP data source functionality, such as retrieval of metadata, creation of the cubeView, and retrieval of the data set. This interface, retrieved from IBIConnection, must be implemented by every OLAP connector.
Returns:
the OLAP interface
Throws:
BIResourceException - if the concrete resource adapter (BI Java Connector) can't return a valid implementation of IBIOlap
Since:
3.50

SAP BI Java SDK

Copyright © 2004-2006 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.