org.olap4j
Interface OlapConnection

All Superinterfaces:
Connection, OlapWrapper, Wrapper

public interface OlapConnection
extends Connection, OlapWrapper

Connection to an OLAP server.

Since:
Aug 22, 2006
Author:
jhyde
 

Field Summary
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Method Summary
 OlapStatement createStatement()
          
 NamedList<Catalog> getCatalogs()
          Returns a list of Catalog objects which belong to this connection's OLAP server.
 Locale getLocale()
          Returns this connection's locale.
 OlapDatabaseMetaData getMetaData()
          
 MdxParserFactory getParserFactory()
          Returns the factory used to create MDX parsers in this connection.
 String getRoleName()
          Returns the name of the role in which this connection executes queries.
 Schema getSchema()
          Returns the current Schema of this connection.
 PreparedOlapStatement prepareOlapStatement(String mdx)
          Creates a prepared OLAP Statement.
 void setLocale(Locale locale)
          Sets the current locale of this connection.
 void setRoleName(String roleName)
          Sets the name of the role in which this connection executes queries.
 
Methods inherited from interface java.sql.Connection
clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 
Methods inherited from interface org.olap4j.OlapWrapper
isWrapperFor, unwrap
 

Method Detail

getMetaData

OlapDatabaseMetaData getMetaData()
                                 throws OlapException

Specified by:
getMetaData in interface Connection
Throws:
OlapException - if database error occurs

prepareOlapStatement

PreparedOlapStatement prepareOlapStatement(String mdx)
                                           throws OlapException
Creates a prepared OLAP Statement.

This method is the equivalent, for OLAP, of the Connection.prepareStatement(String) JDBC method.

Throws:
OlapException - if database error occurs
Parameters:
mdx - MDX query string
Returns:
prepared statement

getParserFactory

MdxParserFactory getParserFactory()
Returns the factory used to create MDX parsers in this connection.

Returns:
MDX parser factory

createStatement

OlapStatement createStatement()
                              throws OlapException

Specified by:
createStatement in interface Connection
Throws:
OlapException - if database error occurs

getSchema

Schema getSchema()
                 throws OlapException
Returns the current Schema of this connection.

Throws:
OlapException - if database error occurs
Returns:
current Schema

getCatalogs

NamedList<Catalog> getCatalogs()
Returns a list of Catalog objects which belong to this connection's OLAP server.

The caller should assume that the list is immutable; if the caller modifies the list, behavior is undefined.

Returns:
List of Catalogs in this connection's OLAP server
See Also:
DatabaseMetaData.getCatalogs()

setLocale

void setLocale(Locale locale)
Sets the current locale of this connection. The value must not be null.

If the locale is not set, the JDK's current locale is used (see Locale.getDefault()).

Most drivers support a Locale connect-string property.

Parameters:
locale - Locale

getLocale

Locale getLocale()
Returns this connection's locale. The value is never null.

Returns:
locale of this connection

setRoleName

void setRoleName(String roleName)
                 throws OlapException
Sets the name of the role in which this connection executes queries. If the name of the role is null, the connection reverts to the default access control context.

Throws:
OlapException - if role name is invalid
Parameters:
roleName - Name of role

getRoleName

String getRoleName()
Returns the name of the role in which this connection executes queries.

Returns:
name of the role in which this connection executes queries

SourceForge.net_Logo