public class MDXOlap4jConnection extends Object implements org.pentaho.commons.connection.IPentahoConnection
CLASSNAME_KEY, CONNECTION, DRIVER_KEY, HQL_DATASOURCE, JNDI_NAME_KEY, KEYS, LOCATION_KEY, MDX_DATASOURCE, MDX_OLAP4J_DATASOURCE, NONE_DATASOURCE, PASSWORD_KEY, PROVIDER, QUERY_KEY, SQL_DATASOURCE, USERNAME_KEY, XML_DATASOURCE| Constructor and Description |
|---|
MDXOlap4jConnection() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearWarnings()
Clears any warnings cached by the connection.
|
void |
close()
Closes the connection.
|
boolean |
connect(Properties props)
Sets the properties to be used when the connection is made.
|
org.pentaho.commons.connection.IPentahoResultSet |
executeQuery(String arg0)
Executes the specified query against the connection.
|
org.olap4j.OlapConnection |
getConnection()
Returns the underlying connection to OLAP system.
|
String |
getDatasourceType()
Returns the type of connection.
|
String |
getLastQuery()
Retrieves the string representation of the last executed query.
|
org.pentaho.commons.connection.IPentahoResultSet |
getResultSet()
Returns resultset of the last executed query.
|
boolean |
initialized()
Checks if the connection is initialized or not.
|
boolean |
isClosed()
Checks if the connection is closed or not.
|
boolean |
isReadOnly()
Checks if the connection is read only or not.
|
org.pentaho.commons.connection.IPentahoResultSet |
prepareAndExecuteQuery(String arg0,
List arg1)
Builds the query based on the pattern and parameters list and executes it against the connection.
|
boolean |
preparedQueriesSupported()
Checks if the given connection supports prepared queries.
|
void |
setFetchSize(int arg0)
Sets size of the fetch buffer used when retrieving rows from the underlying database.
|
void |
setMaxRows(int arg0)
Sets maximum rows that will be returned by the next query.
|
void |
setProperties(Properties props)
Sets the properties to be used when the connection is made.
|
public void close()
close in interface org.pentaho.commons.connection.IPentahoConnectionpublic boolean connect(Properties props)
connect in interface org.pentaho.commons.connection.IPentahoConnectionprops - Properties to be used for creating connection.
This particular method relies on the following properties: url, driver, user, password.public org.pentaho.commons.connection.IPentahoResultSet executeQuery(String arg0)
executeQuery in interface org.pentaho.commons.connection.IPentahoConnectionquery - SQL-like query string. May be data source specific.public org.pentaho.commons.connection.IPentahoResultSet getResultSet()
getResultSet in interface org.pentaho.commons.connection.IPentahoConnectionpublic boolean initialized()
initialized in interface org.pentaho.commons.connection.IPentahoConnectionpublic boolean isClosed()
isClosed in interface org.pentaho.commons.connection.IPentahoConnectionpublic boolean isReadOnly()
isReadOnly in interface org.pentaho.commons.connection.IPentahoConnectionpublic org.pentaho.commons.connection.IPentahoResultSet prepareAndExecuteQuery(String arg0, List arg1) throws Exception
prepareAndExecuteQuery in interface org.pentaho.commons.connection.IPentahoConnectionarg0 - SQL-like query string. May be data source specific.arg1 - List of objects to bind into prepared query.Exceptionpublic boolean preparedQueriesSupported()
preparedQueriesSupported in interface org.pentaho.commons.connection.IPentahoConnectionpublic void setFetchSize(int arg0)
setFetchSize in interface org.pentaho.commons.connection.IPentahoConnectionfetchSize - The buffer size.public void setMaxRows(int arg0)
setMaxRows in interface org.pentaho.commons.connection.IPentahoConnectionmaxRows - Maximum rows that are returned by the next query.public void setProperties(Properties props)
setProperties in interface org.pentaho.commons.connection.IPentahoConnectionprops - Properties to be used when the connection is made.public void clearWarnings()
clearWarnings in interface org.pentaho.commons.connection.IPentahoConnectionpublic String getDatasourceType()
getDatasourceType in interface org.pentaho.commons.connection.IPentahoConnectionpublic String getLastQuery()
getLastQuery in interface org.pentaho.commons.connection.IPentahoConnectionpublic org.olap4j.OlapConnection getConnection()