mondrian.olap
Interface Connection

All Known Implementing Classes:
ConnectionBase, RolapConnection

public interface Connection

Connection to a multi-dimensional database.

Author:
jhyde
See Also:
DriverManager
 

Method Summary
 void close()
          Closes this Connection.
 Result execute(Query query)
          Executes a query.
 CacheControl getCacheControl(PrintWriter pw)
          Returns an object with which to explicitly control the contents of the cache.
 String getCatalogName()
          Get the name of the Catalog associated with this Connection.
 String getConnectString()
          Get the Connect String associated with this Connection.
 DataSource getDataSource()
          Returns the data source this connection uses to create connections to the underlying JDBC database.
 Locale getLocale()
          Returns the locale this connection belongs to.
 Object getProperty(String name)
          Returns the value of a connection property.
 Role getRole()
          Returns the access-control profile for this connection.
 Schema getSchema()
          Get the Schema associated with this Connection.
 SchemaReader getSchemaReader()
          Returns a schema reader with access control appropriate to the current role.
 Exp parseExpression(String s)
          Parses an expresion.
 Query parseQuery(String s)
          Parses a query.
 void setRole(Role role)
          Sets the privileges for the this connection.
 

Method Detail

getConnectString

String getConnectString()
Get the Connect String associated with this Connection.

Returns:
the Connect String (never null).

getCatalogName

String getCatalogName()
Get the name of the Catalog associated with this Connection.

Returns:
the Catalog name (never null).

getSchema

Schema getSchema()
Get the Schema associated with this Connection.

Returns:
the Schema (never null).

close

void close()
Closes this Connection. You may not use this Connection after closing it.


execute

Result execute(Query query)
Executes a query.

Throws:
RuntimeException - if another thread calls Query.cancel().

getLocale

Locale getLocale()
Returns the locale this connection belongs to. Determines, for example, the currency string used in formatting cell values.

See Also:
Format

parseExpression

Exp parseExpression(String s)
Parses an expresion.


parseQuery

Query parseQuery(String s)
Parses a query.


setRole

void setRole(Role role)
Sets the privileges for the this connection.

Pre-condition:
role != null, role.isMutable()

getRole

Role getRole()
Returns the access-control profile for this connection.

Post-condition:
role != null, role.isMutable()

getSchemaReader

SchemaReader getSchemaReader()
Returns a schema reader with access control appropriate to the current role.


getProperty

Object getProperty(String name)
Returns the value of a connection property.

Parameters:
name - Name of property, for example "JdbcUser".
Returns:
Value of property, or null if property is not defined.

getCacheControl

CacheControl getCacheControl(PrintWriter pw)
Returns an object with which to explicitly control the contents of the cache.

Parameters:
pw - Writer to which to write logging information; may be null

getDataSource

DataSource getDataSource()
Returns the data source this connection uses to create connections to the underlying JDBC database.

Returns:
Data source

SourceForge.net_Logo