Package mondrian.olap
Interface Connection
-
- All Known Implementing Classes:
ConnectionBase,RolapConnection
public interface ConnectionConnection to a multi-dimensional database.- Author:
- jhyde
- See Also:
DriverManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidclose()Closes thisConnection.Resultexecute(Query query)Deprecated.This method is deprecated and will be removed in mondrian-4.0.CacheControlgetCacheControl(PrintWriter pw)Returns an object with which to explicitly control the contents of the cache.StringgetCatalogName()Get the name of the Catalog associated with this Connection.StringgetConnectString()Get the Connect String associated with this Connection.DataSourcegetDataSource()Returns the data source this connection uses to create connections to the underlying JDBC database.LocalegetLocale()Returns the locale this connection belongs to.ObjectgetProperty(String name)Returns the value of a connection property.RolegetRole()Returns the access-control profile for this connection.SchemagetSchema()Get the Schema associated with this Connection.SchemaReadergetSchemaReader()Returns a schema reader with access control appropriate to the current role.ExpparseExpression(String s)Parses an expresion.QueryparseQuery(String s)Parses a query.QueryPartparseStatement(String mdx)Parses a statement.voidsetRole(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 thisConnection. You may not use thisConnectionafter closing it.
-
execute
Result execute(Query query)
Deprecated.This method is deprecated and will be removed in mondrian-4.0. It operates by internally creating a statement. Better to use olap4j and explicitly create a statement.Executes a query.- Throws:
RuntimeException- if another thread cancels the query's statement.
-
getLocale
Locale getLocale()
Returns the locale this connection belongs to. Determines, for example, the currency string used in formatting cell values.- See Also:
Format
-
parseStatement
QueryPart parseStatement(String mdx)
Parses a statement.- Parameters:
mdx- MDX string- Returns:
- A
Queryif it is a SELECT statement, aDrillThroughif it is a DRILLTHROUGH statement
-
setRole
void setRole(Role role)
Sets the privileges for the this connection.
-
getRole
Role getRole()
Returns the access-control profile for this connection.
-
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
-
-