|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ParameterValueSet
A ParameterValueSet is a set of parameter values that can be assembled by a JDBC driver and passed to a PreparedStatement all at once. The fact that they are all passed at once can reduce the communication overhead between client and server.
| Method Summary | |
|---|---|
boolean |
allAreSet()
Tells whether all the parameters are set and ready for execution. |
boolean |
checkNoDeclaredOutputParameters()
Check that there are not output parameters defined by the parameter set. |
void |
clearParameters()
Sets all parameters to an uninitialized state. |
ParameterValueSet |
getClone()
Clone the ParameterValueSet and its contents. |
DataValueDescriptor |
getParameter(int position)
Returns the parameter at the given position. |
int |
getParameterCount()
Returns the number of parameters in this set. |
DataValueDescriptor |
getParameterForGet(int position)
Get the DataValueDescriptor for an INOUT or OUT parameter. |
DataValueDescriptor |
getParameterForSet(int position)
Returns the parameter at the given position in order to set it. |
short |
getParameterMode(int parameterIndex)
Return the mode of the parameter according to JDBC 3.0 ParameterMetaData |
int |
getPrecision(int parameterIndex)
Return the precision of the given parameter index in this pvs. |
DataValueDescriptor |
getReturnValueForSet()
Get the value of the return parameter in order to set it. |
int |
getScale(int parameterIndex)
Return the scale of the given parameter index in this pvs. |
boolean |
hasReturnOutputParameter()
Is there a return output parameter in this pvs. |
void |
initialize(DataTypeDescriptor[] types)
Initialize the parameter set by allocating DataValueDescriptor corresponding to the passed in type for each parameter. |
void |
registerOutParameter(int parameterIndex,
int sqlType,
int scale)
Mark the parameter as an output parameter. |
void |
setParameterAsObject(int parameterIndex,
java.lang.Object value)
Set the value of this user defined parameter to the passed in Object. |
void |
setParameterMode(int position,
int mode)
Set the mode of the parameter, called when setting up static method calls and stored procedures. |
void |
transferDataValues(ParameterValueSet pvstarget)
Set the parameter values of the pvstarget to equal those set in this PVS. |
void |
validate()
Validate the parameters. |
| Method Detail |
|---|
void initialize(DataTypeDescriptor[] types)
throws StandardException
types - expected to match the number of parameters.
StandardException
void setParameterMode(int position,
int mode)
void registerOutParameter(int parameterIndex,
int sqlType,
int scale)
throws StandardException
parameterIndex - The ordinal position of a parameter to set
to the given value.sqlType - A type from java.sql.Typesscale - the scale to use. -1 means ignore scale
StandardException - on errorvoid clearParameters()
int getParameterCount()
DataValueDescriptor getParameter(int position)
throws StandardException
StandardException - Thrown on error
DataValueDescriptor getParameterForSet(int position)
throws StandardException
StandardException - Thrown on error
void setParameterAsObject(int parameterIndex,
java.lang.Object value)
throws StandardException
StandardException - Thrown on error
DataValueDescriptor getParameterForGet(int position)
throws StandardException
position - Zero based index of the parameter.
StandardException - Position out of range or the parameter is not INOUT or OUT.boolean allAreSet()
ParameterValueSet getClone()
void validate()
throws StandardException
StandardException - if the parameters aren't validboolean hasReturnOutputParameter()
boolean checkNoDeclaredOutputParameters()
void transferDataValues(ParameterValueSet pvstarget)
throws StandardException
pvstarget - ParameterValueSet which will recieve the values
StandardException - values not compatibleshort getParameterMode(int parameterIndex)
parameterIndex - the first parameter is 1, the second is 2, ...
DataValueDescriptor getReturnValueForSet()
throws StandardException
StandardException - if a database-access error occurs.int getScale(int parameterIndex)
parameterIndex - the first parameter is 1, the second is 2, ...
int getPrecision(int parameterIndex)
parameterIndex - the first parameter is 1, the second is 2, ...
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||