|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.olap.ConnectionBase
mondrian.rolap.RolapConnection
public class RolapConnection
A RolapConnection is a connection to a Mondrian OLAP Server.
Typically, you create a connection via
DriverManager.getConnection(String, mondrian.spi.CatalogLocator).
RolapConnectionProperties describes allowable keywords.
RolapSchema,
DriverManager| Nested Class Summary | |
|---|---|
(package private) static class |
RolapConnection.NonEmptyResult
A NonEmptyResult filters a result by removing empty rows
on a particular axis. |
| Field Summary | |
|---|---|
protected Role |
role
|
| Constructor Summary | |
|---|---|
RolapConnection(MondrianServer server,
Util.PropertyList connectInfo,
DataSource dataSource)
Creates a connection. |
|
RolapConnection(MondrianServer server,
Util.PropertyList connectInfo,
RolapSchema schema,
DataSource dataSource)
Creates a RolapConnection. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this Connection. |
(package private) static DataSource |
createDataSource(DataSource dataSource,
Util.PropertyList connectInfo,
StringBuilder buf)
Creates a JDBC data source from the JDBC credentials contained within a set of mondrian connection properties. |
ScenarioImpl |
createScenario()
Helper method to allow olap4j wrappers to implement OlapConnection.createScenario(). |
Result |
execute(Execution execution)
Executes a statement. |
Result |
execute(Query query)
Deprecated. Use execute(mondrian.server.Execution); this method
will be removed in mondrian-4.0 |
protected void |
finalize()
|
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. |
Util.PropertyList |
getConnectInfo()
|
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. |
int |
getId()
Returns the identifier of this connection. |
Statement |
getInternalStatement()
|
Locale |
getLocale()
Returns the locale this connection belongs to. |
protected org.apache.log4j.Logger |
getLogger()
|
Object |
getProperty(String name)
Returns the value of a connection property. |
Role |
getRole()
Returns the access-control profile for this connection. |
Scenario |
getScenario()
|
RolapSchema |
getSchema()
Get the Schema associated with this Connection. |
SchemaReader |
getSchemaReader()
Returns a schema reader with access control appropriate to the current role. |
MondrianServer |
getServer()
Returns the server (mondrian instance) that this connection belongs to. |
Exp |
parseExpression(String expr)
Parses an expresion. |
QueryPart |
parseStatement(String query)
Parses a statement. |
void |
setLocale(Locale locale)
|
void |
setRole(Role role)
Sets the privileges for the this connection. |
void |
setScenario(Scenario scenario)
|
| Methods inherited from class mondrian.olap.ConnectionBase |
|---|
createParser, getFullConnectString, parseQuery, parseStatement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Role role
| Constructor Detail |
|---|
public RolapConnection(MondrianServer server,
Util.PropertyList connectInfo,
DataSource dataSource)
server - Server instance this connection belongs toconnectInfo - Connection properties; keywords are described in
RolapConnectionProperties.dataSource - JDBC data source
RolapConnection(MondrianServer server,
Util.PropertyList connectInfo,
RolapSchema schema,
DataSource dataSource)
Only RolapSchema.Pool.get(java.lang.String, java.lang.String, java.lang.String, java.lang.String, mondrian.olap.Util.PropertyList) calls this with
schema != null (to create a schema's internal connection).
Other uses retrieve a schema from the cache based upon
the Catalog property.
server - Server instance this connection belongs toconnectInfo - Connection properties; keywords are described in
RolapConnectionProperties.schema - Schema for the connection. Must be null unless this is to
be an internal connection.dataSource - If not null an external DataSource to be used
by Mondrian| Method Detail |
|---|
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic int getId()
protected org.apache.log4j.Logger getLogger()
getLogger in class ConnectionBase
static DataSource createDataSource(DataSource dataSource,
Util.PropertyList connectInfo,
StringBuilder buf)
This method is package-level so that it can be called from the RolapConnectionTest unit test.
dataSource - Anonymous data source from user, or nullconnectInfo - Mondrian connection propertiesbuf - Into which method writes a description of the JDBC credentials
public Util.PropertyList getConnectInfo()
public void close()
ConnectionConnection. You may not use this
Connection after closing it.
public RolapSchema getSchema()
Connection
public String getConnectString()
Connection
public String getCatalogName()
Connection
public Locale getLocale()
Connection
Formatpublic void setLocale(Locale locale)
public SchemaReader getSchemaReader()
Connection
public Object getProperty(String name)
Connection
name - Name of property, for example "JdbcUser".
public CacheControl getCacheControl(PrintWriter pw)
Connection
pw - Writer to which to write logging information; may be nullpublic Result execute(Query query)
execute(mondrian.server.Execution); this method
will be removed in mondrian-4.0
query - Query parse tree
ResourceLimitExceededException - if some resource limit specified
in the property file was exceeded
QueryCanceledException - if query was canceled during execution
QueryTimeoutException - if query exceeded timeout specified in
the property filepublic Result execute(Execution execution)
execution - Execution context (includes statement, query)
ResourceLimitExceededException - if some resource limit specified
in the property file was exceeded
QueryCanceledException - if query was canceled during execution
QueryTimeoutException - if query exceeded timeout specified in
the property filepublic void setRole(Role role)
Connection
public Role getRole()
Connection
public void setScenario(Scenario scenario)
public Scenario getScenario()
public MondrianServer getServer()
public QueryPart parseStatement(String query)
Connection
query - MDX string
Query if it is a SELECT statement, a
DrillThrough if it is a DRILLTHROUGH statementpublic Exp parseExpression(String expr)
Connection
public Statement getInternalStatement()
getInternalStatement in class ConnectionBasepublic DataSource getDataSource()
Connection
public ScenarioImpl createScenario()
OlapConnection.createScenario().
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||