public class RolapConnection extends ConnectionBase
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| Constructor and Description |
|---|
RolapConnection(MondrianServer server,
Util.PropertyList connectInfo,
DataSource dataSource)
Creates a connection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this
Connection. |
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.
|
org.olap4j.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(org.olap4j.Scenario scenario) |
createParser, getFullConnectString, parseQuery, parseStatementprotected Role role
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 sourceprotected void finalize()
throws Throwable
public int getId()
protected org.apache.log4j.Logger getLogger()
getLogger in class ConnectionBasepublic Util.PropertyList getConnectInfo()
public void close()
ConnectionConnection. You may not use this
Connection after closing it.public RolapSchema getSchema()
Connectionpublic String getConnectString()
Connectionpublic String getCatalogName()
Connectionpublic Locale getLocale()
ConnectionFormatpublic void setLocale(Locale locale)
public SchemaReader getSchemaReader()
Connectionpublic Object getProperty(String name)
Connectionname - Name of property, for example "JdbcUser".public CacheControl getCacheControl(PrintWriter pw)
Connectionpw - 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.0query - Query parse treeResourceLimitExceededException - if some resource limit specified
in the property file was exceededQueryCanceledException - if query was canceled during executionQueryTimeoutException - 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 exceededQueryCanceledException - if query was canceled during executionQueryTimeoutException - if query exceeded timeout specified in
the property filepublic void setRole(Role role)
Connectionpublic Role getRole()
Connectionpublic void setScenario(org.olap4j.Scenario scenario)
public org.olap4j.Scenario getScenario()
public MondrianServer getServer()
public QueryPart parseStatement(String query)
Connectionquery - MDX stringQuery if it is a SELECT statement, a
DrillThrough if it is a DRILLTHROUGH statementpublic Exp parseExpression(String expr)
Connectionpublic Statement getInternalStatement()
getInternalStatement in class ConnectionBasepublic DataSource getDataSource()
Connectionpublic ScenarioImpl createScenario()
OlapConnection.createScenario().Copyright © 2021 Hitachi Vantara. All rights reserved.