|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.scripting.engine.Variable
com.sun.slamd.scripting.jdbc.JDBCResultSetVariable
This class defines a variable that provides a set of methods for interacting with the results of a query executed using a JDBC connection. The methods available for use with a result set are:
executeQuery method.
| Field Summary | |
static java.lang.String |
CANCEL_ROW_UPDATES_METHOD_NAME
The name of the method that can be used to cancel any outstanding updates to the current row of the result set. |
static int |
CANCEL_ROW_UPDATES_METHOD_NUMBER
The method number for the "cancelRowUpdates" method. |
static java.lang.String |
DELETE_ROW_METHOD_NAME
The name of the method that can be used to remove the current row from the result set and database. |
static int |
DELETE_ROW_METHOD_NUMBER
The method number for the "deleteRow" method. |
static java.lang.String |
FIRST_ROW_METHOD_NAME
The name of the method that can be used to move to the first row in the result set. |
static int |
FIRST_ROW_METHOD_NUMBER
The method number for the "firstRow" method. |
static int |
GET_BOOLEAN_1_METHOD_NUMBER
The method number for the first "getBoolean" method. |
static int |
GET_BOOLEAN_2_METHOD_NUMBER
The method number for the second "getBoolean" method. |
static java.lang.String |
GET_BOOLEAN_METHOD_NAME
The name of the method that can be used to retrieve the Boolean value of a specified column. |
static java.lang.String |
GET_FAILURE_REASON_METHOD_NAME
The name of the method that can retrieve the reason for the last failure. |
static int |
GET_FAILURE_REASON_METHOD_NUMBER
The method number for the "getFailureReason" method. |
static int |
GET_INTEGER_1_METHOD_NUMBER
The method number for the first "getInteger" method. |
static int |
GET_INTEGER_2_METHOD_NUMBER
The method number for the second "getInteger" method. |
static java.lang.String |
GET_INTEGER_METHOD_NAME
The name of the method that can be used to retrieve the integer value of a specified column. |
static java.lang.String |
GET_ROW_METHOD_NAME
The name of the method that can be used to get the row number for the current row. |
static int |
GET_ROW_METHOD_NUMBER
The method number for the "getRow" method. |
static int |
GET_STRING_1_METHOD_NUMBER
The method number for the first "getString" method. |
static int |
GET_STRING_2_METHOD_NUMBER
The method number for the second "getString" method. |
static java.lang.String |
GET_STRING_METHOD_NAME
The name of the method that can be used to retrieve the string value of a specified column. |
static java.lang.String |
INSERT_ROW_METHOD_NAME
The name of the method that can be used to insert a row into the row set and database. |
static int |
INSERT_ROW_METHOD_NUMBER
The method number for the "insertRow" method. |
static java.lang.String |
IS_NULL_METHOD_NAME
The name of the method that can be used to determine whether this is a null result set. |
static int |
IS_NULL_METHOD_NUMBER
The method number for the "isNull" method. |
static Method[] |
JDBC_RESULT_SET_VARIABLE_METHODS
The set of methods associated with JDBC result set variables. |
static java.lang.String |
JDBC_RESULT_SET_VARIABLE_TYPE
The name that will be used for the data type of JDBC result set variables. |
static java.lang.String |
LAST_ROW_METHOD_NAME
The name of the method that can be used to move to the last row in the result set. |
static int |
LAST_ROW_METHOD_NUMBER
The method number for the "lastRow" method. |
static java.lang.String |
MOVE_TO_CURRENT_ROW_METHOD_NAME
The name of the method that can be used to return to the row that was selected before moving to the insert row. |
static int |
MOVE_TO_CURRENT_ROW_METHOD_NUMBER
The method number for the "moveToCurrentRow" method. |
static java.lang.String |
MOVE_TO_INSERT_ROW_METHOD_NAME
The name of the method that can be used to move to a special row that can be used to insert a new row into the result set and database. |
static int |
MOVE_TO_INSERT_ROW_METHOD_NUMBER
The method number for the "moveToInsertRow" method. |
static java.lang.String |
NEXT_ROW_METHOD_NAME
The name of the method that can be used to move to the next row in the result set. |
static int |
NEXT_ROW_METHOD_NUMBER
The method number for the "nextRow" method. |
static int |
SET_BOOLEAN_1_METHOD_NUMBER
The method number for the first "setBoolean" method. |
static int |
SET_BOOLEAN_2_METHOD_NUMBER
The method number for the second "setBoolean" method. |
static java.lang.String |
SET_BOOLEAN_METHOD_NAME
The name of the method that can be used to specify the Boolean value to use for a given column of the current row. |
static int |
SET_INTEGER_1_METHOD_NUMBER
The method number for the first "setInteger" method. |
static int |
SET_INTEGER_2_METHOD_NUMBER
The method number for the second "setInteger" method. |
static java.lang.String |
SET_INTEGER_METHOD_NAME
The name of the method that can be used to specify the integer value to use for a given column of the current row. |
static java.lang.String |
SET_ROW_METHOD_NAME
The name of the method that can be used to specify the current row in the result set. |
static int |
SET_ROW_METHOD_NUMBER
The method number for the "setRow" method. |
static int |
SET_STRING_1_METHOD_NUMBER
The method number for the first "setString" method. |
static int |
SET_STRING_2_METHOD_NUMBER
The method number for the second "setString" method. |
static java.lang.String |
SET_STRING_METHOD_NAME
The name of the method that can be used to specify the string value to use for a given column of the current row. |
static java.lang.String |
UPDATE_ROW_METHOD_NAME
The name of the method that can be used to update the current row in the underlying database. |
static int |
UPDATE_ROW_METHOD_NUMBER
The method number for the "updateRow" method. |
| Constructor Summary | |
JDBCResultSetVariable()
Creates a new variable with no name, to be used only when creating a variable with Class.newInstance(), and only when
setName() is called after that to set the name. |
|
JDBCResultSetVariable(java.lang.String sqlQuery,
java.sql.ResultSet resultSet)
Creates a new JDBC result set variable using the provided result set. |
|
| Method Summary | |
void |
assign(Argument argument)
Assigns the value of the provided argument to this variable. |
Variable |
executeMethod(int lineNumber,
int methodNumber,
Argument[] arguments)
Executes the specified method, using the provided variables as arguments to the method, and makes the return value available to the caller. |
int |
getMethodNumber(java.lang.String methodName,
java.lang.String[] argumentTypes)
Retrieves the method number for the method that has the specified name and argument types, or -1 if there is no such method. |
Method[] |
getMethods()
Retrieves a list of all methods defined for this variable. |
java.lang.String |
getReturnTypeForMethod(java.lang.String methodName,
java.lang.String[] argumentTypes)
Retrieves the return type for the method with the specified name and argument types. |
java.lang.String |
getValueAsString()
Retrieves a string representation of the value of this argument. |
java.lang.String |
getVariableTypeName()
Retrieves the name of the variable type for this variable. |
boolean |
hasMethod(java.lang.String methodName)
Indicates whether this variable type has a method with the specified name. |
| Methods inherited from class com.sun.slamd.scripting.engine.Variable |
getArgumentAsString, getArgumentType, getArgumentValue, getName, getStatTrackers, isValidIdentifier, setName, startStatTrackers, stopStatTrackers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String JDBC_RESULT_SET_VARIABLE_TYPE
public static final java.lang.String CANCEL_ROW_UPDATES_METHOD_NAME
public static final int CANCEL_ROW_UPDATES_METHOD_NUMBER
public static final java.lang.String DELETE_ROW_METHOD_NAME
public static final int DELETE_ROW_METHOD_NUMBER
public static final java.lang.String FIRST_ROW_METHOD_NAME
public static final int FIRST_ROW_METHOD_NUMBER
public static final java.lang.String GET_BOOLEAN_METHOD_NAME
public static final int GET_BOOLEAN_1_METHOD_NUMBER
public static final int GET_BOOLEAN_2_METHOD_NUMBER
public static final java.lang.String GET_FAILURE_REASON_METHOD_NAME
public static final int GET_FAILURE_REASON_METHOD_NUMBER
public static final java.lang.String GET_INTEGER_METHOD_NAME
public static final int GET_INTEGER_1_METHOD_NUMBER
public static final int GET_INTEGER_2_METHOD_NUMBER
public static final java.lang.String GET_ROW_METHOD_NAME
public static final int GET_ROW_METHOD_NUMBER
public static final java.lang.String GET_STRING_METHOD_NAME
public static final int GET_STRING_1_METHOD_NUMBER
public static final int GET_STRING_2_METHOD_NUMBER
public static final java.lang.String INSERT_ROW_METHOD_NAME
public static final int INSERT_ROW_METHOD_NUMBER
public static final java.lang.String IS_NULL_METHOD_NAME
public static final int IS_NULL_METHOD_NUMBER
public static final java.lang.String LAST_ROW_METHOD_NAME
public static final int LAST_ROW_METHOD_NUMBER
public static final java.lang.String MOVE_TO_CURRENT_ROW_METHOD_NAME
public static final int MOVE_TO_CURRENT_ROW_METHOD_NUMBER
public static final java.lang.String MOVE_TO_INSERT_ROW_METHOD_NAME
public static final int MOVE_TO_INSERT_ROW_METHOD_NUMBER
public static final java.lang.String NEXT_ROW_METHOD_NAME
public static final int NEXT_ROW_METHOD_NUMBER
public static final java.lang.String SET_BOOLEAN_METHOD_NAME
public static final int SET_BOOLEAN_1_METHOD_NUMBER
public static final int SET_BOOLEAN_2_METHOD_NUMBER
public static final java.lang.String SET_INTEGER_METHOD_NAME
public static final int SET_INTEGER_1_METHOD_NUMBER
public static final int SET_INTEGER_2_METHOD_NUMBER
public static final java.lang.String SET_ROW_METHOD_NAME
public static final int SET_ROW_METHOD_NUMBER
public static final java.lang.String SET_STRING_METHOD_NAME
public static final int SET_STRING_1_METHOD_NUMBER
public static final int SET_STRING_2_METHOD_NUMBER
public static final java.lang.String UPDATE_ROW_METHOD_NAME
public static final int UPDATE_ROW_METHOD_NUMBER
public static final Method[] JDBC_RESULT_SET_VARIABLE_METHODS
| Constructor Detail |
public JDBCResultSetVariable()
throws ScriptException
Class.newInstance(), and only when
setName() is called after that to set the name.
ScriptException - If a problem occurs while initializing the new
variable.
public JDBCResultSetVariable(java.lang.String sqlQuery,
java.sql.ResultSet resultSet)
sqlQuery - The SQL query to use for this result set variable.resultSet - The JDBC result set to use for this result set variable.| Method Detail |
public java.lang.String getVariableTypeName()
getVariableTypeName in class Variablepublic Method[] getMethods()
getMethods in class Variablepublic boolean hasMethod(java.lang.String methodName)
hasMethod in class VariablemethodName - The name of the method.
true if this variable has a method with the specified
name, or false if it does not.
public int getMethodNumber(java.lang.String methodName,
java.lang.String[] argumentTypes)
getMethodNumber in class VariablemethodName - The name of the method.argumentTypes - The list of argument types for the method.
public java.lang.String getReturnTypeForMethod(java.lang.String methodName,
java.lang.String[] argumentTypes)
getReturnTypeForMethod in class VariablemethodName - The name of the method.argumentTypes - The set of argument types for the method.
null if there is
no such method defined.
public Variable executeMethod(int lineNumber,
int methodNumber,
Argument[] arguments)
throws ScriptException
executeMethod in class VariablelineNumber - The line number of the script in which the method
call occurs.methodNumber - The method number of the method to execute.arguments - The set of arguments to use for the method.
null if it
does not return a value.
ScriptException - If the specified method does not exist, or if a
problem occurs while attempting to execute it.
public void assign(Argument argument)
throws ScriptException
assign in class Variableargument - The argument whose value should be assigned to this
variable.
ScriptException - If a problem occurs while performing the
assignment.public java.lang.String getValueAsString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||