Class MondrianOlap4jConnection
- All Implemented Interfaces:
AutoCloseable,Connection,Wrapper,org.olap4j.OlapConnection,org.olap4j.OlapWrapper
OlapConnection
for the Mondrian OLAP engine.
This class has sub-classes which implement JDBC 3.0 and JDBC 4.0 APIs;
it is instantiated using
Factory.newConnection(MondrianOlap4jDriver, String, java.util.Properties).
This class is public, to allow access to the
setRoleNames(java.util.List) method before it is added to olap4j
version 2.0. This may change without notice. Code should not rely on
this class being public.
- Since:
- May 23, 2007
- Author:
- jhyde
-
Field Summary
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voidcommit()org.olap4j.OlapStatementcreateStatement(int resultSetType, int resultSetConcurrency) createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) booleanintorg.olap4j.OlapDatabaseMetaDataorg.olap4j.metadata.Catalogorg.olap4j.metadata.NamedList<org.olap4j.metadata.Catalog>org.olap4j.metadata.Databaseorg.olap4j.metadata.NamedList<org.olap4j.metadata.Database>org.olap4j.metadata.Schemaorg.olap4j.metadata.NamedList<org.olap4j.metadata.Schema>org.olap4j.mdx.parser.MdxParserFactoryReturns a list of the current role names.org.olap4j.ScenariointbooleanisClosed()booleanbooleanisWrapperFor(Class<?> iface) prepareCall(String sql) prepareCall(String sql, int resultSetType, int resultSetConcurrency) prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) org.olap4j.PreparedOlapStatementprepareStatement(String sql) prepareStatement(String sql, int autoGeneratedKeys) prepareStatement(String sql, int[] columnIndexes) prepareStatement(String sql, int resultSetType, int resultSetConcurrency) prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) prepareStatement(String sql, String[] columnNames) voidreleaseSavepoint(Savepoint savepoint) voidrollback()voidvoidsetAutoCommit(boolean autoCommit) voidsetCatalog(String catalogName) voidsetDatabase(String databaseName) voidsetHoldability(int holdability) voidvoidsetPreferList(boolean preferList) voidsetReadOnly(boolean readOnly) voidsetRoleName(String roleName) voidsetRoleNames(List<String> roleNames) Set the active role(s) in this connection based on a list of role names.setSavepoint(String name) voidsetScenario(org.olap4j.Scenario scenario) voidvoidsetTransactionIsolation(int level) voidsetTypeMap(Map<String, Class<?>> map) <T> TMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Connection
abort, beginRequest, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, endRequest, getClientInfo, getClientInfo, getNetworkTimeout, isValid, setClientInfo, setClientInfo, setNetworkTimeout, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
Method Details
-
createStatement
public org.olap4j.OlapStatement createStatement()- Specified by:
createStatementin interfaceConnection- Specified by:
createStatementin interfaceorg.olap4j.OlapConnection
-
createScenario
- Specified by:
createScenarioin interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
setScenario
public void setScenario(org.olap4j.Scenario scenario) throws org.olap4j.OlapException - Specified by:
setScenarioin interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
getScenario
public org.olap4j.Scenario getScenario() throws org.olap4j.OlapException- Specified by:
getScenarioin interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection
-
prepareCall
- Specified by:
prepareCallin interfaceConnection
-
nativeSQL
- Specified by:
nativeSQLin interfaceConnection
-
setAutoCommit
public void setAutoCommit(boolean autoCommit) - Specified by:
setAutoCommitin interfaceConnection
-
getAutoCommit
public boolean getAutoCommit()- Specified by:
getAutoCommitin interfaceConnection
-
commit
public void commit()- Specified by:
commitin interfaceConnection
-
rollback
public void rollback()- Specified by:
rollbackin interfaceConnection
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceConnection- Throws:
SQLException
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceConnection
-
getMetaData
public org.olap4j.OlapDatabaseMetaData getMetaData()- Specified by:
getMetaDatain interfaceConnection- Specified by:
getMetaDatain interfaceorg.olap4j.OlapConnection
-
setReadOnly
public void setReadOnly(boolean readOnly) - Specified by:
setReadOnlyin interfaceConnection
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin interfaceConnection
-
setSchema
- Specified by:
setSchemain interfaceConnection- Specified by:
setSchemain interfaceorg.olap4j.OlapConnection
-
getSchema
- Specified by:
getSchemain interfaceConnection- Specified by:
getSchemain interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
getOlapSchema
public org.olap4j.metadata.Schema getOlapSchema()- Specified by:
getOlapSchemain interfaceorg.olap4j.OlapConnection
-
getOlapSchemas
public org.olap4j.metadata.NamedList<org.olap4j.metadata.Schema> getOlapSchemas() throws org.olap4j.OlapException- Specified by:
getOlapSchemasin interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
setCatalog
- Specified by:
setCatalogin interfaceConnection- Specified by:
setCatalogin interfaceorg.olap4j.OlapConnection
-
getCatalog
- Specified by:
getCatalogin interfaceConnection- Specified by:
getCatalogin interfaceorg.olap4j.OlapConnection
-
getOlapCatalog
public org.olap4j.metadata.Catalog getOlapCatalog()- Specified by:
getOlapCatalogin interfaceorg.olap4j.OlapConnection
-
getOlapCatalogs
public org.olap4j.metadata.NamedList<org.olap4j.metadata.Catalog> getOlapCatalogs() throws org.olap4j.OlapException- Specified by:
getOlapCatalogsin interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
setDatabase
- Specified by:
setDatabasein interfaceorg.olap4j.OlapConnection
-
getDatabase
- Specified by:
getDatabasein interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
getOlapDatabase
public org.olap4j.metadata.Database getOlapDatabase()- Specified by:
getOlapDatabasein interfaceorg.olap4j.OlapConnection
-
getOlapDatabases
public org.olap4j.metadata.NamedList<org.olap4j.metadata.Database> getOlapDatabases()- Specified by:
getOlapDatabasesin interfaceorg.olap4j.OlapConnection
-
setTransactionIsolation
public void setTransactionIsolation(int level) - Specified by:
setTransactionIsolationin interfaceConnection
-
getTransactionIsolation
public int getTransactionIsolation()- Specified by:
getTransactionIsolationin interfaceConnection
-
getWarnings
- Specified by:
getWarningsin interfaceConnection
-
clearWarnings
public void clearWarnings()- Specified by:
clearWarningsin interfaceConnection
-
createStatement
- Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection
-
prepareCall
- Specified by:
prepareCallin interfaceConnection
-
getTypeMap
- Specified by:
getTypeMapin interfaceConnection
-
setTypeMap
- Specified by:
setTypeMapin interfaceConnection
-
setHoldability
public void setHoldability(int holdability) - Specified by:
setHoldabilityin interfaceConnection
-
getHoldability
public int getHoldability()- Specified by:
getHoldabilityin interfaceConnection
-
setSavepoint
- Specified by:
setSavepointin interfaceConnection
-
setSavepoint
- Specified by:
setSavepointin interfaceConnection
-
rollback
- Specified by:
rollbackin interfaceConnection
-
releaseSavepoint
- Specified by:
releaseSavepointin interfaceConnection
-
createStatement
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
createStatementin interfaceConnection- Throws:
SQLException
-
prepareStatement
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) - Specified by:
prepareStatementin interfaceConnection
-
prepareCall
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) - Specified by:
prepareCallin interfaceConnection
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection
-
prepareStatement
- Specified by:
prepareStatementin interfaceConnection
-
unwrap
- Specified by:
unwrapin interfaceorg.olap4j.OlapWrapper- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceorg.olap4j.OlapWrapper- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
prepareOlapStatement
public org.olap4j.PreparedOlapStatement prepareOlapStatement(String mdx) throws org.olap4j.OlapException - Specified by:
prepareOlapStatementin interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
getParserFactory
public org.olap4j.mdx.parser.MdxParserFactory getParserFactory()- Specified by:
getParserFactoryin interfaceorg.olap4j.OlapConnection
-
setLocale
- Specified by:
setLocalein interfaceorg.olap4j.OlapConnection
-
getLocale
- Specified by:
getLocalein interfaceorg.olap4j.OlapConnection
-
setRoleName
- Specified by:
setRoleNamein interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
setRoleNames
Set the active role(s) in this connection based on a list of role names.
The list may be not be empty. Each role name must be not-null and the name of a valid role for the current user.
This method is not part of the olap4j-1.x API. It may be included in olap4j-2.0. If you want to call this method on a
OlapConnection, useunwrap(java.lang.Class<T>)to get the underlying Mondrian connection.- Parameters:
roleNames- List of role names- Throws:
org.olap4j.OlapException- See Also:
-
getRoleName
- Specified by:
getRoleNamein interfaceorg.olap4j.OlapConnection
-
getRoleNames
Returns a list of the current role names.This method is not part of the olap4j-1.x API. It may be included in olap4j-2.0. If you want to call this method on a
OlapConnection, useunwrap(java.lang.Class<T>)to get the underlying Mondrian connection.- Returns:
- List of the current role names
-
getAvailableRoleNames
- Specified by:
getAvailableRoleNamesin interfaceorg.olap4j.OlapConnection- Throws:
org.olap4j.OlapException
-
setPreferList
public void setPreferList(boolean preferList) -
getMondrianConnection
- Throws:
org.olap4j.OlapException
-