Skip navigation links

Oracle® OLAP Java API Reference
11g Release 1 (11.1)

B28128-01


oracle.olapi.session
Class UserSession

java.lang.Object
  extended by oracle.olapi.session.UserSession


public class UserSession
extends java.lang.Object

Associates a DataProvider with an OracleConnection. An application creates a UserSession with the createSession method of a DataProvider.

An application can have many UserSession objects that share the same DataProvider. Each UserSession has a separate OracleConnection. The metadata provided by the DataProvider is the same for all of the UserSession objects.

To end a UserSession, an application calls the closeSession method of the UserSession. Doing so closes any open CursorManager objects and commits or rolls back any Transaction objects associated with the UserSession. It does not, however, close the associated OracleConnection.


Method Summary
 void closeSession()
          Closes the UserSession but does not close the associated OracleConnection.
 oracle.jdbc.OracleConnection getConnection()
          Gets the OracleConnection associated with the UserSession.
 DataProvider getDataProvider()
          Gets the DataProvider associated with the UserSession.
 java.lang.String getDefaultLanguage()
          Gets the default language for the UserSession.
 Transaction getRootTransaction()
          Gets the root Transaction associated with the UserSession.
 XMLParserCallback getServerXMLParserCallback()
          Gets the XMLParserCallback implementation that is associated with this UserSession.
 java.util.Properties getSettings()
          Get the Properties object that contains all of the settings used by this UserSession.
 void interrupt()
          Terminates any operation that is currently executing in the UserSession.
 boolean isOpen()
          Indicates whether the OracleConnection has an open connection to the database.
 void setServerXMLParserCallback(XMLParserCallback callback)
          Specifies an XMLParserCallback for Oracle OLAP to use when it retrieves a metadata object that is stored on the server.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getRootTransaction

public Transaction getRootTransaction()
Gets the root Transaction associated with the UserSession.
Returns:
The root Transaction associated with the UserSession.

getConnection

public oracle.jdbc.OracleConnection getConnection()
Gets the OracleConnection associated with the UserSession.
Returns:
The root OracleConnection associated with the UserSession.

isOpen

public boolean isOpen()
Indicates whether the OracleConnection has an open connection to the database.
Returns:
A boolean that is true if the OracleConnection is open or false if it is not.

closeSession

public void closeSession()
Closes the UserSession but does not close the associated OracleConnection.

getDataProvider

public DataProvider getDataProvider()
Gets the DataProvider associated with the UserSession.
Returns:
The DataProvider associated with the UserSession.

getSettings

public java.util.Properties getSettings()
Get the Properties object that contains all of the settings used by this UserSession.
Returns:
A Properties object that contains the settings used by this UserSession.

getDefaultLanguage

public final java.lang.String getDefaultLanguage()
Gets the default language for the UserSession.
Returns:
A String that identifies the default language for the session.

setServerXMLParserCallback

public void setServerXMLParserCallback(XMLParserCallback callback)
Specifies an XMLParserCallback for Oracle OLAP to use when it retrieves a metadata object that is stored on the server. For example, if an application specifies an XMLParserCallback with this method and then calls a method like MdmMetadataProvider.getMetadataObject(id) or MdmDatabaseSchema.getTopLevelObject(name) and the requested object is invalid, then Oracle OLAP calls a method of the XMLParserCallback. A object stored on the server can become invalid if, for example, the column or table that the object references no longer exists in the database.

The XMLParserCallback.ERROR_BY_EXCEPTION constant is not used by Oracle OLAP for an XMLParserCallback specified by this method. If a method of the XMLParserCallback returns the ERROR_BY_EXCEPTION constant, then Oracle OLAP uses the default constant, which is ERROR_BY_SET_TO_NULL.

The XMLParserCallback specified by this method is not used by the MdmMetadataProvider.importXML or the SyntaxObject.fromSyntax methods. Those methods use the XMLParserCallback that the application passes to them.

Parameters:
callback - An implementation of the XMLParserCallback interface.

getServerXMLParserCallback

public XMLParserCallback getServerXMLParserCallback()
Gets the XMLParserCallback implementation that is associated with this UserSession.
Returns:
The XMLParserCallback associated with this UserSession.

interrupt

public final void interrupt()
Terminates any operation that is currently executing in the UserSession. This method has the same effect as calling the oracle.jdbc.OracleConnection.cancel method.

An application must call this method in a separate thread. An application can use this method to terminate a build operation that was initiated by a DataProvider.executeBuild method.


Skip navigation links

Copyright © 2002, 2007, Oracle. All rights reserved.