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.Integer
getExecutionMode()
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
getTablePrefix()
java.lang.Boolean
getTraceFlag()
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
setExecutionMode(int newMode)
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
setTablePrefix(java.lang.String prefix)
-
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, getDescription, getExtendedType, getFactory, getFlags, getIconPath, getID, getModificationTime, getModificationTimeStamp, getName, getNonSchedulable, getOtherNameTransCount, getOwner, getParent, getPreSaveAsFlags, getProjectId, getProjectName, getPropertyFlags, getPropertySetFilter, getPropertySets, getRecommendationInfo, getSecurity, getState, getSubType, getType, getVersionID, getViewMediaSettings, getVisualizationViewMode, getXML, getXML, hasOwner, isAncestorNamedFolder, isDirty, isEmbedded, isHidden, isNew, isPopulated, populate, populate, setAbbreviation, setComments, setDataSources, 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
-
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
-
-