Package com.microstrategy.web.objects
Interface WebDBConnection
-
- All Superinterfaces:
KeyedObject
,WebDisplayUnit
,WebFeatures
,WebObjectInfo
,WebPromptSite
public interface WebDBConnection extends WebObjectInfo
Object extending fromWebObjectInfo
to represent the first-class DB connection objects- Since:
- MicroStrategy Web 9.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
areParameterizedQueriesEnabled()
void
disableExtendedFetch()
Disable Extended Fetch for ODB associated with this connection.void
disableParameterizedQueries()
Disable parameterized queries.void
disableTrace()
void
enableExtendedFetch()
Enable Extended fetch for ODB for this connection.void
enableParameterizedQueries()
Enable parameterized queries.void
enableTrace()
java.lang.Integer
getCacheOption()
java.lang.Integer
getCacheSize()
java.lang.Integer
getCacheTimeout()
int
getCharEncoding()
int
getCharEncodingForUnix()
int
getConnectionLifetime()
java.lang.String
getConnectionString()
java.lang.Integer
getConnectionTimeout()
java.lang.Integer
getDatabaseType()
Returns the type of DB being accessed.WebDBLogin
getDBLogin()
java.lang.Integer
getDBRoleType()
Returns the type of DB role accessed.java.lang.Integer
getDBVersion()
java.lang.Integer
getDriverMode()
java.lang.Boolean
getEnableSso()
java.lang.Integer
getExecutionMode()
java.lang.String
getExtr()
WebIAM
getIam()
int
getIdleTimeout()
int
getMaxCancelAttemptTime()
int
getMaxConnectionAttemptTime()
Set the maximum connection attempt time.java.lang.Integer
getMaxDBConnections()
java.lang.Integer
getMaxDBCost()
int
getMaxQueryExeTime()
java.lang.Integer
getMultiProcess()
java.lang.String
getOAuthParameter()
java.lang.String
getResource()
java.lang.String
getSanitizedExtr()
java.lang.String
getScope()
java.lang.String
getTablePrefix()
java.lang.Boolean
getTraceFlag()
java.util.List<byte[]>
getWalletBinary()
Return wallet file in binary.java.lang.String
getWalletInfo()
byte[]
getWalletInfoInBytes()
Get wallet info, the return type is byte array.java.lang.Boolean
isExtendedFetchEnabled()
void
setCacheOption(int option)
void
setCacheSize(int size)
void
setCacheTimeout(int cacheTimeout)
void
setCharEncoding(int encoding)
Set the character set encoding for Windows drivers.void
setCharEncodingForUnix(int encoding)
Set the character set encoding for Unix drivers.void
setConnectionLifetime(int timeout)
Set the connection lifetime.void
setConnectionString(java.lang.String connectionString)
void
setConnectionTimeout(int time)
void
setDatabaseType(int newType)
Changes the type of Database type associated with this database connection This method is only applicable for MDX database, which is DssXmlDBSAP or DssXmlDBMicrosoftAS.void
setDBLogin(WebDBLogin newL)
void
setDBLogin(WebDBLogin newL, boolean embed)
Sets the login credentials to be used by this connectionvoid
setDBRoleType(int newType)
Changes the type of DBRole type associated with this database connection This method is only applicable for remote projectsvoid
setDBVersion(java.lang.Integer dbVersion)
void
setDriverMode(int newMode)
void
setEnableSso(java.lang.Boolean enableSso)
Enable or disable Single Sign-on for OAuth authentication workflows.void
setExecutionMode(int newMode)
void
setExtr(java.lang.String extr)
Set the extra sensitive info on the db connection level.void
setIam(WebObjectInfo iam)
void
setIdleTimeout(int timeout)
Set the connection idle timeout.void
setMaxCancelAttemptTime(int time)
Set the maximum cancel attempt time.void
setMaxConnectionAttemptTime(int time)
Set the maximum connection attempt time.void
setMaxDBConnections(int conns)
void
setMaxDBCost(int cost)
void
setMaxQueryExeTime(int time)
Set the maximum query execution time.void
setMultiProcess(int type)
void
setOAuthParameter(java.lang.String oa)
void
setResource(java.lang.String resource)
Set the resource on the db connection level for OAuth authentication usage.void
setScope(java.lang.String scope)
Set the scope on the db connection level for OAuth authentication usage.void
setTablePrefix(java.lang.String prefix)
void
setWalletBinary(java.lang.String walletbinary)
Set wallet base64 string to binary propertyvoid
setWalletInfo(java.lang.String walletinfo)
Attach wallet info to instance propertyboolean
useWallet()
Return boolean value indicating if current db connection has wallet or not.-
Methods inherited from interface com.microstrategy.utils.KeyedObject
_getObKey
-
Methods inherited from interface com.microstrategy.web.objects.WebDisplayUnit
addDetails, applyVisitor, canHighlight, getChildUnits, getDisplayName, getDisplayUnitType, hasDetails, highlightUnit, highlightUnit, isHighlighted, isObjectInfo, isSelected, setDisplayName, setSelected
-
Methods inherited from interface com.microstrategy.web.objects.WebFeatures
isFeatureAvailable, isFeatureAvailable
-
Methods inherited from interface com.microstrategy.web.objects.WebObjectInfo
buildShortObjectAttributes, buildShortXML, getAbbreviation, getAccessGranted, getAncestors, getCardStatus, getCertifiedInfo, getComments, getContainerDid, getContainerType, getCreationTime, getCreationTimeStamp, getDataSources, getDefaultLanguage, getDescription, getExtendedType, getFactory, getFlags, getIconPath, getID, getModificationTime, getModificationTimeStamp, getName, getNonSchedulable, getOtherNameTransCount, getOwner, getParent, getPreSaveAsFlags, getProjectId, getProjectName, getPropertyFlags, getPropertySetFilter, getPropertySets, getRecommendationInfo, getSecurity, getState, getSubType, getTemplateInfo, getType, getVersionID, getViewMediaSettings, getVisualizationViewMode, getXML, getXML, hasOwner, isAncestorNamedFolder, isDirty, isEmbedded, isHidden, isNew, isPopulated, populate, populate, setAbbreviation, setComments, setDataSources, setDefaultLanguage, setDescription, setExtendedType, setFlags, setHidden, setIconPath, setName, setNonSchedulable, setPreSaveAsFlags, setPropertyFlags
-
Methods inherited from interface com.microstrategy.web.objects.WebPromptSite
getPromptInstances
-
-
-
-
Method Detail
-
getDBLogin
WebDBLogin getDBLogin()
- Returns:
WebDBLogin
object used to connect to ODB associated with this connection
-
getConnectionString
java.lang.String getConnectionString()
- Returns:
- a
String
including connection information about this Database connection
-
getOAuthParameter
java.lang.String getOAuthParameter()
- Returns:
- a
String
including OAuth parameter
-
getWalletInfo
java.lang.String getWalletInfo()
- Returns:
- a
String
including wallet info
-
getWalletInfoInBytes
byte[] getWalletInfoInBytes()
Get wallet info, the return type is byte array.- Returns:
- a
byte
including wallet info.
-
getWalletBinary
java.util.List<byte[]> getWalletBinary()
Return wallet file in binary.- Returns:
-
useWallet
boolean useWallet()
Return boolean value indicating if current db connection has wallet or not.- Returns:
-
getDatabaseType
java.lang.Integer getDatabaseType()
Returns the type of DB being accessed.- Returns:
- integer from
EnumDSSXMLDatabaseType
-
getDBRoleType
java.lang.Integer getDBRoleType()
Returns the type of DB role accessed.- Returns:
- integer from
EnumDSSXMLDatabaseType
-
getDriverMode
java.lang.Integer getDriverMode()
- Returns:
- Integer from
EnumDSSXMLDBConnectionDriverMode
. DriverType is an enumeration property. It specifies the connection driver type. It specifies whether the connection is made using ODBC or some native database driver.
-
getExecutionMode
java.lang.Integer getExecutionMode()
- Returns:
- Integer from
EnumDSSXMLDBConnectionExecutionMode
. ExecutionMode is an enumeration property. It specifies the manner in which SQL statements will be executed on a physical connection made using this object. In particular it indicates if the statement is executed synchronously or asynchronously.
-
isExtendedFetchEnabled
java.lang.Boolean isExtendedFetchEnabled()
- Returns:
- ExtendedFetch is a Boolean property. It specifies whether or not to use the extended fetch ODBC call to retrieve data from the connection.
-
areParameterizedQueriesEnabled
boolean areParameterizedQueriesEnabled() throws WebObjectsException
- Returns:
- boolean whether paramatized queries are enabled
- Throws:
WebObjectsException
-
getCacheTimeout
java.lang.Integer getCacheTimeout()
- Returns:
- Integer seconds for CacheTimeout. CacheTimeOut is a numeric property. When use connection pooling, the connection is not disconnected when it is released. Instead, it is kept open until it idles for ConnectionCacheTimeOut seconds. If a connection is open and released frequently, connection pooling reduces the cost associated with creating a new connection.
-
setCacheTimeout
void setCacheTimeout(int cacheTimeout)
- Parameters:
cacheTimeout
- Integer seconds for CacheTimeout. CacheTimeOut is a numeric property. When use connection pooling, the connection is not disconnected when it is released. Instead, it is kept open until it idles for ConnectionCacheTimeOut seconds. If a connection is open and released frequently, connection pooling reduces the cost associated with creating a new connection.
-
getConnectionTimeout
java.lang.Integer getConnectionTimeout()
- Returns:
- Integer specifying how long before requests on connection are timed out. It specifies the time in seconds to wait for a connection request comes back.
-
setConnectionTimeout
void setConnectionTimeout(int time)
- Parameters:
time
- Integer specifying how long before requests on connection are timed out. It specifies the time in seconds to wait for a connection request comes back.
-
getMaxQueryExeTime
int getMaxQueryExeTime() throws WebObjectsException
- Returns:
- Integer number of seconds that a query has to execute before being timed out
- Throws:
WebObjectsException
-
getTablePrefix
java.lang.String getTablePrefix()
- Returns:
- String containing table prefix for this connection. TablePrefixString is a text property. The QueryEngine prefixed the names of all temporary tables that it creates during report execution with this string.
-
getCharEncoding
int getCharEncoding() throws WebObjectsException
- Returns:
- Integer from
EnumDSSXMLCharacterEncoding
depicting encoding across connection for Windows drivers - Throws:
WebObjectsException
-
getCharEncodingForUnix
int getCharEncodingForUnix() throws WebObjectsException
- Returns:
- Integer from
EnumDSSXMLCharacterEncoding
depicting encoding across connection for Unix drivers - Throws:
WebObjectsException
-
getConnectionLifetime
int getConnectionLifetime() throws WebObjectsException
- Returns:
- Integer seconds maximum connection lifetime
- Throws:
WebObjectsException
-
getIdleTimeout
int getIdleTimeout() throws WebObjectsException
- Returns:
- Integer seconds maximum connection lifetime
- Throws:
WebObjectsException
-
getMaxDBConnections
java.lang.Integer getMaxDBConnections()
- Returns:
- integer numeric property (Backend information)
-
getMaxDBCost
java.lang.Integer getMaxDBCost()
- Returns:
- integer numeric property (Backend information)
-
getTraceFlag
java.lang.Boolean getTraceFlag()
- Returns:
- boolean specifying whether requests on this connection should be traced
-
enableTrace
void enableTrace()
-
disableTrace
void disableTrace()
-
getMultiProcess
java.lang.Integer getMultiProcess()
- Returns:
- int from
EnumDSSXMLDBConnectionMultiProcessOption
specifying whether connection is executed in a single or several processes
-
setMultiProcess
void setMultiProcess(int type)
-
setDBLogin
void setDBLogin(WebDBLogin newL)
- Parameters:
newL
-WebDBLogin
to be associated with this connection
-
setDBLogin
void setDBLogin(WebDBLogin newL, boolean embed)
Sets the login credentials to be used by this connection- Parameters:
newL
-WebDBLogin
object representing login credentials for this connectionembed
- boolean true when newL should be embedded in
-
setConnectionString
void setConnectionString(java.lang.String connectionString)
- Parameters:
connectionString
-String
including connection information associated with this database connection
-
setOAuthParameter
void setOAuthParameter(java.lang.String oa)
- Parameters:
oa
-String
including OAuth parameter
-
setDatabaseType
void setDatabaseType(int newType)
Changes the type of Database type associated with this database connection This method is only applicable for MDX database, which is DssXmlDBSAP or DssXmlDBMicrosoftAS. For other database type, we always use default database type and not allow use this method to set database type.- Parameters:
newType
- integer representing the type of the new DB to be connected by this DBConnection fromEnumDSSXMLDatabaseType
-
setDBRoleType
void setDBRoleType(int newType)
Changes the type of DBRole type associated with this database connection This method is only applicable for remote projects- Parameters:
newType
- integer representing the type of the new DB to be connected by this DBConnection fromEnumDSSXMLDatabaseType
-
setDriverMode
void setDriverMode(int newMode)
- Parameters:
newMode
- Integer fromEnumDSSXMLDBConnectionDriverMode
. It specifies the connection driver type. It specifies whether the connection is made using ODBC or some native database driver.
-
setExecutionMode
void setExecutionMode(int newMode)
- Parameters:
newMode
- Integer fromEnumDSSXMLDBConnectionExecutionMode
. It specifies the manner in SQL statements will be executed on a physical connection made using this object. In particular it indicates if the statement is executed synchronously or asynchronously.
-
enableExtendedFetch
void enableExtendedFetch()
Enable Extended fetch for ODB for this connection. ExtendedFetch is a Boolean property. It specifies whether or not to use the extended fetch ODBC call to retrieve data from the connection.
-
disableExtendedFetch
void disableExtendedFetch()
Disable Extended Fetch for ODB associated with this connection. ExtendedFetch is a Boolean property. It specifies whether or not to use the extended fetch ODBC call to retrieve data from the connection.
-
enableParameterizedQueries
void enableParameterizedQueries() throws WebObjectsException
Enable parameterized queries. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it.- Throws:
WebObjectsException
-
disableParameterizedQueries
void disableParameterizedQueries() throws WebObjectsException
Disable parameterized queries. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it.- Throws:
WebObjectsException
-
setMaxCancelAttemptTime
void setMaxCancelAttemptTime(int time) throws WebObjectsException
Set the maximum cancel attempt time. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it- Parameters:
time
- Integer seconds maximum time to attempt to cancel a connection- Throws:
WebObjectsException
-
setMaxQueryExeTime
void setMaxQueryExeTime(int time) throws WebObjectsException
Set the maximum query execution time. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it- Parameters:
time
- Integer seconds maximum time a query can execute before being timed out- Throws:
WebObjectsException
-
getMaxConnectionAttemptTime
int getMaxConnectionAttemptTime() throws WebObjectsException
Set the maximum connection attempt time. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it- Returns:
- Integer number of seconds connection attempts to be made before timing out
- Throws:
WebObjectsException
-
setMaxConnectionAttemptTime
void setMaxConnectionAttemptTime(int time) throws WebObjectsException
Set the maximum connection attempt time. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it- Parameters:
time
- Integer seconds maximum time to try to connect to IServer- Throws:
WebObjectsException
-
setTablePrefix
void setTablePrefix(java.lang.String prefix) throws java.lang.IllegalArgumentException
- Parameters:
prefix
- String containing table prefix for this connection- Throws:
java.lang.IllegalArgumentException
-
setCharEncoding
void setCharEncoding(int encoding) throws WebObjectsException
Set the character set encoding for Windows drivers. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it.- Parameters:
encoding
-- Throws:
WebObjectsException
-
setCharEncodingForUnix
void setCharEncodingForUnix(int encoding) throws WebObjectsException
Set the character set encoding for Unix drivers. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it.- Parameters:
encoding
-- Throws:
WebObjectsException
-
setConnectionLifetime
void setConnectionLifetime(int timeout) throws WebObjectsException
Set the connection lifetime. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it.- Parameters:
timeout
- integer seconds maximum connection lifetime- Throws:
WebObjectsException
-
setIdleTimeout
void setIdleTimeout(int timeout) throws WebObjectsException
Set the connection idle timeout. This method modifies a WebObjectInfo property. Therefore, this object must exist in the MD prior to calling it.- Parameters:
timeout
- integer seconds maximum connection lifetime- Throws:
WebObjectsException
-
setMaxDBConnections
void setMaxDBConnections(int conns)
- Parameters:
conns
- integer specifying a numeric property for this connection
-
setMaxDBCost
void setMaxDBCost(int cost)
- Parameters:
cost
- integer specifying a numeric property for this connection
-
getCacheOption
java.lang.Integer getCacheOption()
- Returns:
- integer from
EnumDSSXMLDBConnectionCacheOption
It specifies the degree to which the intelligence server will attempt to reuse physical connections made using the specification contained in this DBConnection object.
-
setCacheOption
void setCacheOption(int option)
- Parameters:
option
- integer fromEnumDSSXMLDBConnectionCacheOption
. It specifies the degree to which the intelligence server will attempt to reuse physical connections made using the specification contained in this DBConnection object.
-
getCacheSize
java.lang.Integer getCacheSize()
- Returns:
- integer. It contains the maximum number of physical connections made using the specifications in this object that may be opened simultaneously. Thus it is the maximum size of the connection pool.
-
setCacheSize
void setCacheSize(int size)
- Parameters:
size
- integer. It contains the maximum number of physical connections made using the specifications in this object that may be opened simultaneously. Thus it is the maximum size of the connection pool.
-
getMaxCancelAttemptTime
int getMaxCancelAttemptTime() throws WebObjectsException
- Returns:
- integer seconds before cancel action times out
- Throws:
WebObjectsException
-
getDBVersion
java.lang.Integer getDBVersion()
- Returns:
- integer from
EnumDSSXMLDatabaseVersion
-
setDBVersion
void setDBVersion(java.lang.Integer dbVersion)
- Parameters:
dbVersion
- integer value fromEnumDSSXMLDatabaseVersion
-
setWalletBinary
void setWalletBinary(java.lang.String walletbinary) throws java.lang.IllegalArgumentException
Set wallet base64 string to binary property- Parameters:
walletbinary
-- Throws:
java.lang.IllegalArgumentException
-
setWalletInfo
void setWalletInfo(java.lang.String walletinfo) throws java.lang.IllegalArgumentException
Attach wallet info to instance property- Parameters:
walletinfo
-- Throws:
java.lang.IllegalArgumentException
-
setIam
void setIam(WebObjectInfo iam)
- Parameters:
iam
-WebObjectInfo
to be associated with this connection
-
getResource
java.lang.String getResource()
- Returns:
- a
String
specify the url of configured Web API for OAuth authentication
-
setResource
void setResource(java.lang.String resource)
Set the resource on the db connection level for OAuth authentication usage.- Parameters:
resource
-
-
getScope
java.lang.String getScope()
- Returns:
- a
String
specify the list of delegated permissions that the app is requesting
-
setScope
void setScope(java.lang.String scope)
Set the scope on the db connection level for OAuth authentication usage.- Parameters:
scope
-
-
getEnableSso
java.lang.Boolean getEnableSso()
- Returns:
- a
Boolean
to tell if Single Sign-on is enabled
-
setEnableSso
void setEnableSso(java.lang.Boolean enableSso)
Enable or disable Single Sign-on for OAuth authentication workflows.- Parameters:
enableSso
-
-
getSanitizedExtr
java.lang.String getSanitizedExtr()
- Returns:
- a
String
specify the list of sensitive keys
-
getExtr
java.lang.String getExtr()
- Returns:
- a
String
specify the list of sensitive keys
-
setExtr
void setExtr(java.lang.String extr)
Set the extra sensitive info on the db connection level.- Parameters:
extr
-
-
-