Package de.businesscode.bcdui.web.wrs
Class RequestOptions
- java.lang.Object
-
- de.businesscode.bcdui.web.wrs.RequestOptions
-
- All Implemented Interfaces:
IRequestOptions
public class RequestOptions extends java.lang.Object implements IRequestOptions
Implements IRequestOptions for Wrs operations, which may not be originated in an HTTP request When using getManagedConnection() also call returnAllThreadManagedConnections()!
-
-
Constructor Summary
Constructors Constructor Description RequestOptions(int maxRows)
HttpRequestOptions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeAllThreadManagedConnections()
Close all managed connections associated with the current threadBindings
getBindings()
getBindingsjavax.servlet.http.HttpServletRequest
getHttpRequest()
java.sql.Connection
getManagedConnection(java.lang.String dbSourceName)
When using this also call returnAllThreadManagedConnections(), otherwise db connections leakint
getMaxRows()
Method getMaxRowsint
getMaxSQLBatchSize()
gets max count of statements to execute in SQL Statementorg.w3c.dom.Document
getRequestDoc()
getRequestDocjava.lang.String
getRequestUrl()
getRequestUrljavax.servlet.ServletContext
getServletCtx()
java.lang.String
getSessionId()
java.sql.Connection
getUnmanagedConnection(java.lang.String dbSourceName)
gets UnmanagedConnection, that should be closed by userboolean
isDebugMode()
isDebugModevoid
setMaxSQLBatchSize(int i)
sets max count of statements to execute in SQL Statementvoid
setRequestDoc(org.w3c.dom.Document doc)
Delayed setting the request doc, of not already available in constructor
-
-
-
Method Detail
-
getServletCtx
public javax.servlet.ServletContext getServletCtx()
-
getHttpRequest
public final javax.servlet.http.HttpServletRequest getHttpRequest()
- Returns:
- the httpRequest
-
getSessionId
public final java.lang.String getSessionId()
- Returns:
- the sessionId or null
-
getManagedConnection
public java.sql.Connection getManagedConnection(java.lang.String dbSourceName) throws java.lang.Exception
When using this also call returnAllThreadManagedConnections(), otherwise db connections leak- Specified by:
getManagedConnection
in interfaceIRequestOptions
- Parameters:
dbSourceName
- - the name of requeted db-connection, null for default- Returns:
- the database connection
- Throws:
java.lang.Exception
- - if connection with the name not found or database is not available- See Also:
IRequestOptions.getManagedConnection(java.lang.String)
-
closeAllThreadManagedConnections
public void closeAllThreadManagedConnections() throws java.sql.SQLException
Close all managed connections associated with the current thread- Throws:
java.sql.SQLException
-
getRequestUrl
public java.lang.String getRequestUrl()
Description copied from interface:IRequestOptions
getRequestUrl- Specified by:
getRequestUrl
in interfaceIRequestOptions
- Returns:
- the URL of the request
- See Also:
IRequestOptions.getRequestUrl()
-
getRequestDoc
public org.w3c.dom.Document getRequestDoc()
Description copied from interface:IRequestOptions
getRequestDoc- Specified by:
getRequestDoc
in interfaceIRequestOptions
- Returns:
- the request xml-document or null
- See Also:
IRequestOptions.getRequestDoc()
-
isDebugMode
public boolean isDebugMode()
Description copied from interface:IRequestOptions
isDebugMode- Specified by:
isDebugMode
in interfaceIRequestOptions
- Returns:
- true if debug mode
- See Also:
IRequestOptions.isDebugMode()
-
getBindings
public Bindings getBindings()
Description copied from interface:IRequestOptions
getBindings- Specified by:
getBindings
in interfaceIRequestOptions
- Returns:
- the Bindings used for this request, using this and not Bindings.getInstance() allows usage in batch environments
- See Also:
IRequestOptions.getBindings()
-
getMaxSQLBatchSize
public int getMaxSQLBatchSize()
gets max count of statements to execute in SQL Statement- Specified by:
getMaxSQLBatchSize
in interfaceIRequestOptions
- Returns:
- max count of statements to execute in a SQL Statement
-
setMaxSQLBatchSize
public void setMaxSQLBatchSize(int i)
sets max count of statements to execute in SQL Statement- Specified by:
setMaxSQLBatchSize
in interfaceIRequestOptions
- Parameters:
i
- - max count of statements to execute in a SQL Statement
-
getUnmanagedConnection
public java.sql.Connection getUnmanagedConnection(java.lang.String dbSourceName) throws java.lang.Exception
Description copied from interface:IRequestOptions
gets UnmanagedConnection, that should be closed by user- Specified by:
getUnmanagedConnection
in interfaceIRequestOptions
- Returns:
- Throws:
java.lang.Exception
-
getMaxRows
public int getMaxRows()
Description copied from interface:IRequestOptions
Method getMaxRows- Specified by:
getMaxRows
in interfaceIRequestOptions
- Returns:
- max count rows to be returned
-
setRequestDoc
public void setRequestDoc(org.w3c.dom.Document doc)
Description copied from interface:IRequestOptions
Delayed setting the request doc, of not already available in constructor- Specified by:
setRequestDoc
in interfaceIRequestOptions
-
-