org.pentaho.platform.plugin.services.connections.mondrian
Class MDXConnection

java.lang.Object
  extended by org.pentaho.platform.plugin.services.connections.mondrian.MDXConnection
All Implemented Interfaces:
org.pentaho.commons.connection.IPentahoConnection, IPentahoLoggingConnection

public class MDXConnection
extends Object
implements IPentahoLoggingConnection

Author:
wseyler

Field Summary
static String CONNECTION_STRING_KEY
          Defines the XML element in the component-definition that holds the mondrian-specific MDX Connection string.
static String MDX_CONNECTION_MAPPER_KEY
           
 
Fields inherited from interface org.pentaho.commons.connection.IPentahoConnection
CLASSNAME_KEY, CONNECTION, DRIVER_KEY, HQL_DATASOURCE, JNDI_NAME_KEY, KEYS, LOCATION_KEY, MDX_DATASOURCE, NONE_DATASOURCE, PASSWORD_KEY, PROVIDER, QUERY_KEY, SQL_DATASOURCE, USERNAME_KEY, XML_DATASOURCE
 
Constructor Summary
MDXConnection()
           
MDXConnection(String connectStr, ILogger logger)
           
MDXConnection(String driver, String provider, String userName, String password)
          Deprecated.  
 
Method Summary
 void clearWarnings()
           
 void close()
           
 boolean connect(Properties props)
           
 org.pentaho.commons.connection.IPentahoResultSet executeQuery(String query)
           
 mondrian.olap.Connection getConnection()
           
 String getDatasourceType()
          return datasource type MDX
 String getLastQuery()
           
 org.pentaho.commons.connection.IPentahoResultSet getResultSet()
           
 boolean initialized()
           
 boolean isClosed()
           
 boolean isReadOnly()
           
 org.pentaho.commons.connection.IPentahoResultSet prepareAndExecuteQuery(String query, List parameters)
           
 boolean preparedQueriesSupported()
           
 void setFetchSize(int fetchSize)
           
 void setLogger(ILogger logger)
           
 void setMaxRows(int maxRows)
           
 void setProperties(Properties props)
           
 void setRole(mondrian.olap.Role customRole)
           
 void setUseExtendedColumnNames(boolean useExtendedColumnNames)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTION_STRING_KEY

public static final String CONNECTION_STRING_KEY
Defines the XML element in the component-definition that holds the mondrian-specific MDX Connection string.

See Also:
Constant Field Values

MDX_CONNECTION_MAPPER_KEY

public static final String MDX_CONNECTION_MAPPER_KEY
See Also:
Constant Field Values
Constructor Detail

MDXConnection

public MDXConnection()

MDXConnection

@Deprecated
public MDXConnection(String driver,
                                String provider,
                                String userName,
                                String password)
Deprecated. 

Parameters:
driver - - The name of the driver or the connection string
provider - - the provider for MDX usally "mondrian"
userName - - User to connect to the datasource with
password - - Password for the user
See Also:
MDXConnection(Properties props, ILogger logger)

MDXConnection

public MDXConnection(String connectStr,
                     ILogger logger)
Method Detail

setLogger

public void setLogger(ILogger logger)
Specified by:
setLogger in interface IPentahoLoggingConnection

setProperties

public void setProperties(Properties props)
Specified by:
setProperties in interface org.pentaho.commons.connection.IPentahoConnection

initialized

public boolean initialized()
Specified by:
initialized in interface org.pentaho.commons.connection.IPentahoConnection

prepareAndExecuteQuery

public org.pentaho.commons.connection.IPentahoResultSet prepareAndExecuteQuery(String query,
                                                                               List parameters)
                                                                        throws Exception
Specified by:
prepareAndExecuteQuery in interface org.pentaho.commons.connection.IPentahoConnection
Throws:
Exception

preparedQueriesSupported

public boolean preparedQueriesSupported()
Specified by:
preparedQueriesSupported in interface org.pentaho.commons.connection.IPentahoConnection

close

public void close()
Specified by:
close in interface org.pentaho.commons.connection.IPentahoConnection

getLastQuery

public String getLastQuery()
Specified by:
getLastQuery in interface org.pentaho.commons.connection.IPentahoConnection

executeQuery

public org.pentaho.commons.connection.IPentahoResultSet executeQuery(String query)
Specified by:
executeQuery in interface org.pentaho.commons.connection.IPentahoConnection

isClosed

public boolean isClosed()
Specified by:
isClosed in interface org.pentaho.commons.connection.IPentahoConnection

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface org.pentaho.commons.connection.IPentahoConnection

clearWarnings

public void clearWarnings()
Specified by:
clearWarnings in interface org.pentaho.commons.connection.IPentahoConnection

getResultSet

public org.pentaho.commons.connection.IPentahoResultSet getResultSet()
Specified by:
getResultSet in interface org.pentaho.commons.connection.IPentahoConnection

connect

public boolean connect(Properties props)
Specified by:
connect in interface org.pentaho.commons.connection.IPentahoConnection

setMaxRows

public void setMaxRows(int maxRows)
Specified by:
setMaxRows in interface org.pentaho.commons.connection.IPentahoConnection

setFetchSize

public void setFetchSize(int fetchSize)
Specified by:
setFetchSize in interface org.pentaho.commons.connection.IPentahoConnection

getConnection

public mondrian.olap.Connection getConnection()

getDatasourceType

public String getDatasourceType()
return datasource type MDX

Specified by:
getDatasourceType in interface org.pentaho.commons.connection.IPentahoConnection
Returns:
datasource type

setUseExtendedColumnNames

public void setUseExtendedColumnNames(boolean useExtendedColumnNames)

setRole

public void setRole(mondrian.olap.Role customRole)