|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wgen.op.db.DatabaseCall
Represents a call to the database. This class handles Parameterized Queries, Procedures, and Functions, and contains information about what application and what Op initiated it, and information about the execution of it.
| Field Summary | |
private java.lang.String |
_callText
The text of the call which could be a parameterized query, or the name of a procedure or function. |
private int |
_callType
The type of call this is QUERY, PROCEDURE, or FUNCTION. |
private java.lang.String |
_dataSourceName
The datasource against which to execute the call. |
private CallExecutionInfo |
_executionInfo
Information about the execution of this call. |
private java.util.Map |
_idxToParameter
The map of parameter index to Parameter for this call. |
private org.apache.log4j.Logger |
_logger
The logger to use when executing this call. |
private Op |
_opOwner
The Op that is making this call. |
private java.util.Map |
_options
HandlingOptions for this call. |
private java.util.Map |
_rsIdxToResults
Result Sets returned by Statement getResults method. |
private static java.lang.Integer |
DEFAULT_TRUNCATE_AT_LENGTH_IN_CALL_TO_STRING
When constructing the string representation of the call, use this value as default for truncating long values. |
static int |
TYPE_FUNCTION
Identifier for a function. |
static int |
TYPE_PROCEDURE
Identifier for a stored procedure. |
static int |
TYPE_QUERY
Identifier for a parameterized query. |
| Constructor Summary | |
DatabaseCall(java.lang.String callText,
Op opOwner,
int callType)
|
|
| Method Summary | |
java.lang.String |
getCallText()
If the call is a query, this is the parameterized text of the query, and if this is a callable statement, it can simply be the function or procedure name. |
int |
getCallType()
The JDBC call type. |
java.lang.String |
getDataSourceName()
|
CallExecutionInfo |
getExecutionInfo()
Information about the execution of the call. |
java.util.Map |
getIdxToParameter()
A map of parameter index to Parameter object, starting at 1. |
org.apache.log4j.Logger |
getLogger()
|
Op |
getOpOwner()
The Op which instantiated this call. |
java.util.Map |
getOptions()
|
Parameter |
getParameter(int idx)
Get a parameter using its index. |
java.lang.String |
getParametersAsString()
A string representation of the parameter set. |
java.util.Map |
getResultSetIdxToResults()
For ResultSets returned in the getResultSet methods in Statement, one-based index to Collections representing the transformed ResultSets. |
java.util.Collection |
getReturnedResults(int idx)
Transformed ResultSets returned thru the Statement getResultSet methods. |
void |
setDataSourceName(java.lang.String dataSourceName)
The name of the data source against which the call will be executed. |
void |
setParameters(int returnJdbcType,
java.lang.Object[] parameters)
Set the parameters of the call. |
void |
setParameters(java.lang.Object[] parameters)
Set the parameters of the call. |
void |
setParameters(Parameter returnParameter,
java.lang.Object[] parameters)
Set the parameters of the call. |
java.lang.String |
toString()
|
java.lang.String |
toValuePopulatedString()
A string representation of the statement. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final java.lang.Integer DEFAULT_TRUNCATE_AT_LENGTH_IN_CALL_TO_STRING
public static final int TYPE_QUERY
public static final int TYPE_PROCEDURE
public static final int TYPE_FUNCTION
private final java.lang.String _callText
private final Op _opOwner
private final int _callType
private final java.util.Map _idxToParameter
private final java.util.Map _rsIdxToResults
private final transient org.apache.log4j.Logger _logger
private final CallExecutionInfo _executionInfo
private java.lang.String _dataSourceName
private java.util.Map _options
HandlingOption| Constructor Detail |
public DatabaseCall(java.lang.String callText,
Op opOwner,
int callType)
| Method Detail |
public org.apache.log4j.Logger getLogger()
public java.lang.String getCallText()
public Op getOpOwner()
public int getCallType()
public java.lang.String getDataSourceName()
public void setDataSourceName(java.lang.String dataSourceName)
dataSourceName - public java.util.Map getOptions()
public CallExecutionInfo getExecutionInfo()
public java.util.Map getIdxToParameter()
public Parameter getParameter(int idx)
idx - the index of the parameter, should be 1 based.
java.lang.NullPointerException - if the parameter is not found at the indexpublic java.util.Collection getReturnedResults(int idx)
idx - the one-based index of the returned results
public java.util.Map getResultSetIdxToResults()
public final void setParameters(java.lang.Object[] parameters)
parameters - the parameter set to be applied starting at index 1
java.lang.NullPointerException - if one of the parameters is null, since it will not have enough
information to determine the jdbc type.Parameter.Parameter(Object)
public final void setParameters(Parameter returnParameter,
java.lang.Object[] parameters)
returnParameter - the call's return Parameterparameters - the remaining parameters of the callsetParameters(Object[])
public final void setParameters(int returnJdbcType,
java.lang.Object[] parameters)
returnJdbcType - the type of the call's returnparameters - the remaining parameters of the callsetParameters(Object[])public java.lang.String toString()
public java.lang.String getParametersAsString()
public java.lang.String toValuePopulatedString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||