public abstract class MondrianOlap4jConnection extends Object implements org.olap4j.OlapConnection
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.
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Modifier and Type | Method and Description |
---|---|
void |
clearWarnings() |
void |
close() |
void |
commit() |
ScenarioImpl |
createScenario() |
org.olap4j.OlapStatement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
boolean |
getAutoCommit() |
List<String> |
getAvailableRoleNames() |
String |
getCatalog() |
String |
getDatabase() |
int |
getHoldability() |
Locale |
getLocale() |
org.olap4j.OlapDatabaseMetaData |
getMetaData() |
org.olap4j.metadata.Catalog |
getOlapCatalog() |
org.olap4j.metadata.NamedList<org.olap4j.metadata.Catalog> |
getOlapCatalogs() |
org.olap4j.metadata.Database |
getOlapDatabase() |
org.olap4j.metadata.NamedList<org.olap4j.metadata.Database> |
getOlapDatabases() |
org.olap4j.metadata.Schema |
getOlapSchema() |
org.olap4j.metadata.NamedList<org.olap4j.metadata.Schema> |
getOlapSchemas() |
org.olap4j.mdx.parser.MdxParserFactory |
getParserFactory() |
String |
getRoleName() |
List<String> |
getRoleNames()
Returns a list of the current role names.
|
org.olap4j.Scenario |
getScenario() |
String |
getSchema() |
int |
getTransactionIsolation() |
Map<String,Class<?>> |
getTypeMap() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isReadOnly() |
boolean |
isWrapperFor(Class<?> iface) |
String |
nativeSQL(String sql) |
CallableStatement |
prepareCall(String sql) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
org.olap4j.PreparedOlapStatement |
prepareOlapStatement(String mdx) |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames) |
void |
releaseSavepoint(Savepoint savepoint) |
void |
rollback() |
void |
rollback(Savepoint savepoint) |
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(String catalogName) |
void |
setDatabase(String databaseName) |
void |
setHoldability(int holdability) |
void |
setLocale(Locale locale) |
void |
setPreferList(boolean preferList) |
void |
setReadOnly(boolean readOnly) |
void |
setRoleName(String roleName) |
void |
setRoleNames(List<String> roleNames)
Set the active role(s) in this connection based on a list of role
names.
|
Savepoint |
setSavepoint() |
Savepoint |
setSavepoint(String name) |
void |
setScenario(org.olap4j.Scenario scenario) |
void |
setSchema(String schemaName) |
void |
setTransactionIsolation(int level) |
void |
setTypeMap(Map<String,Class<?>> map) |
<T> T |
unwrap(Class<T> iface) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abort, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, getNetworkTimeout, isValid, setClientInfo, setClientInfo, setNetworkTimeout
public org.olap4j.OlapStatement createStatement()
createStatement
in interface Connection
createStatement
in interface org.olap4j.OlapConnection
public ScenarioImpl createScenario() throws org.olap4j.OlapException
createScenario
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public void setScenario(org.olap4j.Scenario scenario) throws org.olap4j.OlapException
setScenario
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public org.olap4j.Scenario getScenario() throws org.olap4j.OlapException
getScenario
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement
in interface Connection
SQLException
public CallableStatement prepareCall(String sql) throws SQLException
prepareCall
in interface Connection
SQLException
public String nativeSQL(String sql) throws SQLException
nativeSQL
in interface Connection
SQLException
public void setAutoCommit(boolean autoCommit) throws SQLException
setAutoCommit
in interface Connection
SQLException
public boolean getAutoCommit() throws SQLException
getAutoCommit
in interface Connection
SQLException
public void commit() throws SQLException
commit
in interface Connection
SQLException
public void rollback() throws SQLException
rollback
in interface Connection
SQLException
public void close() throws SQLException
close
in interface AutoCloseable
close
in interface Connection
SQLException
public boolean isClosed() throws SQLException
isClosed
in interface Connection
SQLException
public org.olap4j.OlapDatabaseMetaData getMetaData()
getMetaData
in interface Connection
getMetaData
in interface org.olap4j.OlapConnection
public void setReadOnly(boolean readOnly) throws SQLException
setReadOnly
in interface Connection
SQLException
public boolean isReadOnly() throws SQLException
isReadOnly
in interface Connection
SQLException
public void setSchema(String schemaName) throws org.olap4j.OlapException
setSchema
in interface Connection
setSchema
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public String getSchema() throws org.olap4j.OlapException
getSchema
in interface Connection
getSchema
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public org.olap4j.metadata.Schema getOlapSchema() throws org.olap4j.OlapException
getOlapSchema
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public org.olap4j.metadata.NamedList<org.olap4j.metadata.Schema> getOlapSchemas() throws org.olap4j.OlapException
getOlapSchemas
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public void setCatalog(String catalogName) throws org.olap4j.OlapException
setCatalog
in interface Connection
setCatalog
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public String getCatalog() throws org.olap4j.OlapException
getCatalog
in interface Connection
getCatalog
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public org.olap4j.metadata.Catalog getOlapCatalog() throws org.olap4j.OlapException
getOlapCatalog
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public org.olap4j.metadata.NamedList<org.olap4j.metadata.Catalog> getOlapCatalogs() throws org.olap4j.OlapException
getOlapCatalogs
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public void setDatabase(String databaseName) throws org.olap4j.OlapException
setDatabase
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public String getDatabase() throws org.olap4j.OlapException
getDatabase
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public org.olap4j.metadata.Database getOlapDatabase() throws org.olap4j.OlapException
getOlapDatabase
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public org.olap4j.metadata.NamedList<org.olap4j.metadata.Database> getOlapDatabases() throws org.olap4j.OlapException
getOlapDatabases
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public void setTransactionIsolation(int level) throws SQLException
setTransactionIsolation
in interface Connection
SQLException
public int getTransactionIsolation() throws SQLException
getTransactionIsolation
in interface Connection
SQLException
public SQLWarning getWarnings() throws SQLException
getWarnings
in interface Connection
SQLException
public void clearWarnings() throws SQLException
clearWarnings
in interface Connection
SQLException
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement
in interface Connection
SQLException
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement
in interface Connection
SQLException
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall
in interface Connection
SQLException
public Map<String,Class<?>> getTypeMap() throws SQLException
getTypeMap
in interface Connection
SQLException
public void setTypeMap(Map<String,Class<?>> map) throws SQLException
setTypeMap
in interface Connection
SQLException
public void setHoldability(int holdability) throws SQLException
setHoldability
in interface Connection
SQLException
public int getHoldability() throws SQLException
getHoldability
in interface Connection
SQLException
public Savepoint setSavepoint() throws SQLException
setSavepoint
in interface Connection
SQLException
public Savepoint setSavepoint(String name) throws SQLException
setSavepoint
in interface Connection
SQLException
public void rollback(Savepoint savepoint) throws SQLException
rollback
in interface Connection
SQLException
public void releaseSavepoint(Savepoint savepoint) throws SQLException
releaseSavepoint
in interface Connection
SQLException
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement
in interface Connection
SQLException
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareStatement
in interface Connection
SQLException
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareCall
in interface Connection
SQLException
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement
in interface Connection
SQLException
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
prepareStatement
in interface Connection
SQLException
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
prepareStatement
in interface Connection
SQLException
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
unwrap
in interface org.olap4j.OlapWrapper
SQLException
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
isWrapperFor
in interface org.olap4j.OlapWrapper
SQLException
public org.olap4j.PreparedOlapStatement prepareOlapStatement(String mdx) throws org.olap4j.OlapException
prepareOlapStatement
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public org.olap4j.mdx.parser.MdxParserFactory getParserFactory()
getParserFactory
in interface org.olap4j.OlapConnection
public void setLocale(Locale locale)
setLocale
in interface org.olap4j.OlapConnection
public Locale getLocale()
getLocale
in interface org.olap4j.OlapConnection
public void setRoleName(String roleName) throws org.olap4j.OlapException
setRoleName
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public void setRoleNames(List<String> roleNames) throws org.olap4j.OlapException
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
, use unwrap(java.lang.Class<T>)
to get the underlying
Mondrian connection.
roleNames
- List of role namesorg.olap4j.OlapException
getRoleNames()
public String getRoleName()
getRoleName
in interface org.olap4j.OlapConnection
public List<String> getRoleNames()
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
, use unwrap(java.lang.Class<T>)
to get the underlying
Mondrian connection.
public List<String> getAvailableRoleNames() throws org.olap4j.OlapException
getAvailableRoleNames
in interface org.olap4j.OlapConnection
org.olap4j.OlapException
public void setPreferList(boolean preferList)
Copyright © 2020 Hitachi Vantara. All rights reserved.