|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.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(Util.PropertyList connectInfo)
Creates a connection. |
|
RolapConnection(Util.PropertyList connectInfo,
DataSource dataSource)
Creates a connection. |
|
RolapConnection(Util.PropertyList connectInfo,
RolapSchema schema)
Creates a RolapConnection. |
|
RolapConnection(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. |
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. |
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. |
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. |
Schema |
getSchema()
Get the Schema associated with this Connection. |
SchemaReader |
getSchemaReader()
Returns a schema reader with access control appropriate to the current role. |
void |
setLocale(Locale locale)
|
void |
setRole(Role role)
Sets the privileges for the this connection. |
Methods inherited from class mondrian.olap.ConnectionBase |
---|
getFullConnectString, memoryUsageNotification, parseExpression, parseQuery, parseQuery, parseQuery |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Role role
Constructor Detail |
---|
public RolapConnection(Util.PropertyList connectInfo)
connectInfo
- Connection properties; keywords are described in
RolapConnectionProperties
.public RolapConnection(Util.PropertyList connectInfo, DataSource dataSource)
connectInfo
- Connection properties; keywords are described in
RolapConnectionProperties
.RolapConnection(Util.PropertyList connectInfo, RolapSchema schema)
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.
connectInfo
- Connection properties; keywords are described in
RolapConnectionProperties
.schema
- Schema for the connection. Must be null unless this is to
be an internal connection.RolapConnection(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.
connectInfo
- 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 MondrianMethod Detail |
---|
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()
Connection
Connection
. You may not use this
Connection
after closing it.
public Schema getSchema()
Connection
public String getConnectString()
Connection
public String getCatalogName()
Connection
public Locale getLocale()
Connection
Format
public 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)
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 DataSource getDataSource()
Connection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |