Package com.microstrategy.web.objects
Interface WebDBConnection
-
- All Superinterfaces:
KeyedObject,WebDisplayUnit,WebFeatures,WebObjectInfo,WebPromptSite
public interface WebDBConnection extends WebObjectInfo
Object extending fromWebObjectInfoto 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 booleanareParameterizedQueriesEnabled()voiddisableExtendedFetch()Disable Extended Fetch for ODB associated with this connection.voiddisableParameterizedQueries()Disable parameterized queries.voiddisableTrace()voidenableExtendedFetch()Enable Extended fetch for ODB for this connection.voidenableParameterizedQueries()Enable parameterized queries.voidenableTrace()java.lang.IntegergetCacheOption()java.lang.IntegergetCacheSize()java.lang.IntegergetCacheTimeout()intgetCharEncoding()intgetCharEncodingForUnix()intgetConnectionLifetime()java.lang.StringgetConnectionString()java.lang.IntegergetConnectionTimeout()java.lang.IntegergetDatabaseType()Returns the type of DB being accessed.WebDBLogingetDBLogin()java.lang.IntegergetDBRoleType()Returns the type of DB role accessed.java.lang.IntegergetDBVersion()java.lang.IntegergetDriverMode()java.lang.BooleangetEnableSso()java.lang.IntegergetExecutionMode()java.lang.StringgetExtr()WebIAMgetIam()intgetIdleTimeout()intgetMaxCancelAttemptTime()intgetMaxConnectionAttemptTime()Set the maximum connection attempt time.java.lang.IntegergetMaxDBConnections()java.lang.IntegergetMaxDBCost()intgetMaxQueryExeTime()java.lang.IntegergetMultiProcess()java.lang.StringgetOAuthParameter()java.lang.StringgetResource()java.lang.StringgetSanitizedExtr()java.lang.StringgetScope()java.lang.StringgetTablePrefix()java.lang.BooleangetTraceFlag()java.util.List<byte[]>getWalletBinary()Return wallet file in binary.java.lang.StringgetWalletInfo()byte[]getWalletInfoInBytes()Get wallet info, the return type is byte array.java.lang.BooleanisExtendedFetchEnabled()voidsetCacheOption(int option)voidsetCacheSize(int size)voidsetCacheTimeout(int cacheTimeout)voidsetCharEncoding(int encoding)Set the character set encoding for Windows drivers.voidsetCharEncodingForUnix(int encoding)Set the character set encoding for Unix drivers.voidsetConnectionLifetime(int timeout)Set the connection lifetime.voidsetConnectionString(java.lang.String connectionString)voidsetConnectionTimeout(int time)voidsetDatabaseType(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.voidsetDBLogin(WebDBLogin newL)voidsetDBLogin(WebDBLogin newL, boolean embed)Sets the login credentials to be used by this connectionvoidsetDBRoleType(int newType)Changes the type of DBRole type associated with this database connection This method is only applicable for remote projectsvoidsetDBVersion(java.lang.Integer dbVersion)voidsetDriverMode(int newMode)voidsetEnableSso(java.lang.Boolean enableSso)Enable or disable Single Sign-on for OAuth authentication workflows.voidsetExecutionMode(int newMode)voidsetExtr(java.lang.String extr)Set the extra sensitive info on the db connection level.voidsetIam(WebObjectInfo iam)voidsetIdleTimeout(int timeout)Set the connection idle timeout.voidsetMaxCancelAttemptTime(int time)Set the maximum cancel attempt time.voidsetMaxConnectionAttemptTime(int time)Set the maximum connection attempt time.voidsetMaxDBConnections(int conns)voidsetMaxDBCost(int cost)voidsetMaxQueryExeTime(int time)Set the maximum query execution time.voidsetMultiProcess(int type)voidsetOAuthParameter(java.lang.String oa)voidsetResource(java.lang.String resource)Set the resource on the db connection level for OAuth authentication usage.voidsetScope(java.lang.String scope)Set the scope on the db connection level for OAuth authentication usage.voidsetTablePrefix(java.lang.String prefix)voidsetWalletBinary(java.lang.String walletbinary)Set wallet base64 string to binary propertyvoidsetWalletInfo(java.lang.String walletinfo)Attach wallet info to instance propertybooleanuseWallet()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:
WebDBLoginobject used to connect to ODB associated with this connection
-
getConnectionString
java.lang.String getConnectionString()
- Returns:
- a
Stringincluding connection information about this Database connection
-
getOAuthParameter
java.lang.String getOAuthParameter()
- Returns:
- a
Stringincluding OAuth parameter
-
getWalletInfo
java.lang.String getWalletInfo()
- Returns:
- a
Stringincluding wallet info
-
getWalletInfoInBytes
byte[] getWalletInfoInBytes()
Get wallet info, the return type is byte array.- Returns:
- a
byteincluding 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
EnumDSSXMLCharacterEncodingdepicting encoding across connection for Windows drivers - Throws:
WebObjectsException
-
getCharEncodingForUnix
int getCharEncodingForUnix() throws WebObjectsException- Returns:
- Integer from
EnumDSSXMLCharacterEncodingdepicting 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
EnumDSSXMLDBConnectionMultiProcessOptionspecifying whether connection is executed in a single or several processes
-
setMultiProcess
void setMultiProcess(int type)
-
setDBLogin
void setDBLogin(WebDBLogin newL)
- Parameters:
newL-WebDBLoginto be associated with this connection
-
setDBLogin
void setDBLogin(WebDBLogin newL, boolean embed)
Sets the login credentials to be used by this connection- Parameters:
newL-WebDBLoginobject representing login credentials for this connectionembed- boolean true when newL should be embedded in
-
setConnectionString
void setConnectionString(java.lang.String connectionString)
- Parameters:
connectionString-Stringincluding connection information associated with this database connection
-
setOAuthParameter
void setOAuthParameter(java.lang.String oa)
- Parameters:
oa-Stringincluding 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 WebObjectsExceptionEnable 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 WebObjectsExceptionDisable 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 WebObjectsExceptionSet 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 WebObjectsExceptionSet 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 WebObjectsExceptionSet 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 WebObjectsExceptionSet 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 WebObjectsExceptionSet 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 WebObjectsExceptionSet 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 WebObjectsExceptionSet 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 WebObjectsExceptionSet 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
EnumDSSXMLDBConnectionCacheOptionIt 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.IllegalArgumentExceptionSet wallet base64 string to binary property- Parameters:
walletbinary-- Throws:
java.lang.IllegalArgumentException
-
setWalletInfo
void setWalletInfo(java.lang.String walletinfo) throws java.lang.IllegalArgumentExceptionAttach wallet info to instance property- Parameters:
walletinfo-- Throws:
java.lang.IllegalArgumentException
-
setIam
void setIam(WebObjectInfo iam)
- Parameters:
iam-WebObjectInfoto be associated with this connection
-
getResource
java.lang.String getResource()
- Returns:
- a
Stringspecify 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
Stringspecify 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
Booleanto 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
Stringspecify the list of sensitive keys
-
getExtr
java.lang.String getExtr()
- Returns:
- a
Stringspecify the list of sensitive keys
-
setExtr
void setExtr(java.lang.String extr)
Set the extra sensitive info on the db connection level.- Parameters:
extr-
-
-