ParameterValueSet
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ClassInspector | |
| private final boolean | |
| private final GenericParameter[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | GenericParameterValueSet(ClassInspector ci, int
The number of parameters in the new ParameterValueSet numParms, boolean if we have a ? = call syntax. Note that
this is NOT the same thing as an output parameter -- return
output parameters are special cases of output parameters. hasReturnOutputParam)Constructor for a GenericParameterValueSet |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | allAreSet()
Implements org. Tells whether all the parameters are set and ready for execution. |
| public boolean | Returns: true if a declared Java Procedure INOUT or OUT parameter is in the set, false otherwise.Implements org. Check that there are not output parameters defined by the parameter set. |
| private void | checkPosition(int
The position number to check position)Check the position number for a parameter and throw an exception if it is out of range. |
| public void | clearParameters()
Implements org. Sets all parameters to an uninitialized state. |
| public ParameterValueSet | getClone()
Implements org. Clone the ParameterValueSet and its contents. |
| pack-priv GenericParameter | |
| public DataValueDescriptor | Returns: The parameter at the given position.The parameters's position in the set position)Implements org. Returns the parameter value at the given position. |
| public int | Returns: The number of parameters in this set.Implements org. Returns the number of parameters in this set. |
| public DataValueDescriptor | getParameterForGet(int
Zero based index of the parameter. position)Implements org. Get the DataValueDescriptor for an INOUT or OUT parameter. |
| public DataValueDescriptor | getParameterForSet(int
The parameters's position in the set position)Implements org. Returns the parameter at the given position in order to set it. |
| public short | getParameterMode(int
the first parameter is 1, the second is 2, ... parameterIndex)Implements org. Return the mode of the parameter according to JDBC 3.0 ParameterMetaData |
| public int | Returns: the parameter number, or 0 if not foundReturn the parameter number (in jdbc lingo, i.e. 1 based) for the given parameter. |
| public int | Returns: precisionthe first parameter is 1, the second is 2, ... parameterIndex)Implements org. Return the precision of the given parameter index in this pvs. |
| public DataValueDescriptor | getReturnValueForSet()
Implements org. Get the value of the return parameter in order to set it. |
| public int | Returns: scalethe first parameter is 1, the second is 2, ... parameterIndex)Implements org. Return the scale of the given parameter index in this pvs. |
| public boolean | Returns: true if it has a return parameterImplements org. Is there a return output parameter in this pvs. |
| public void | initialize(DataTypeDescriptor[]
expected to match the number of parameters. types)Implements org. Initialize the set by allocating a holder DataValueDescriptor object for each parameter. |
| public void | registerOutParameter(int
The ordinal parameterIndex of a parameter to set
to the given value. parameterIndex, int A type from java.sql.Types jdbcType, int the scale to use. -1 means ignore scale scale)Implements org. Mark the parameter as an output parameter. |
| public void | setParameterAsObject(int
The position of the parameter position, Object It's value value)Implements org. Set the value of this user defined parameter to the passed in Object. |
| public void | setParameterMode(int
The position of the parameter in the set position, int The IN/OUT mode to set mode)Implements org. Set the mode of the parameter, called when setting up static method calls and stored procedures. |
| public String | |
| public void | transferDataValues(ParameterValueSet
ParameterValueSet which will recieve the values pvstarget)Implements org. Set the parameter values of the pvstarget to equal those set in this PVS. |
| public void |
| ci | back to summary |
|---|---|
| pack-priv final ClassInspector ci | |
| hasReturnOutputParam | back to summary |
|---|---|
| private final boolean hasReturnOutputParam | |
| parms | back to summary |
|---|---|
| private final GenericParameter[] parms | |
| GenericParameterValueSet | back to summary |
|---|---|
| pack-priv GenericParameterValueSet(ClassInspector ci, int numParms, boolean hasReturnOutputParam) Constructor for a GenericParameterValueSet
| |
| GenericParameterValueSet | back to summary |
|---|---|
| private GenericParameterValueSet(int numParms, GenericParameterValueSet pvs) | |
| allAreSet | back to summary |
|---|---|
| public boolean allAreSet() Implements org. Doc from org. Tells whether all the parameters are set and ready for execution. OUT are not required to be set.
| |
| checkNoDeclaredOutputParameters | back to summary |
|---|---|
| public boolean checkNoDeclaredOutputParameters() Implements org. Check that there are not output parameters defined by the parameter set. If there are unknown parameter types they are forced to input types. i.e. Derby static method calls with parameters that are array.
| |
| checkPosition | back to summary |
|---|---|
| private void checkPosition(int position) throws StandardException Check the position number for a parameter and throw an exception if it is out of range.
| |
| clearParameters | back to summary |
|---|---|
| public void clearParameters() Implements org. Doc from org. Sets all parameters to an uninitialized state. An exception will be thrown if the caller tries to execute a PreparedStatement when one or more parameters is uninitialized (i.e. has not had setParameterValue() called on it.
| |
| getClone | back to summary |
|---|---|
| public ParameterValueSet getClone() Implements org. Doc from org. Clone the ParameterValueSet and its contents.
| |
| getGenericParameter | back to summary |
|---|---|
| pack-priv GenericParameter getGenericParameter(int position) | |
| getParameter | back to summary |
|---|---|
| public DataValueDescriptor getParameter(int position) throws StandardException Implements org. Returns the parameter value at the given position.
| |
| getParameterCount | back to summary |
|---|---|
| public int getParameterCount() Implements org. Returns the number of parameters in this set.
| |
| getParameterForGet | back to summary |
|---|---|
| public DataValueDescriptor getParameterForGet(int position) throws StandardException Implements org. Doc from org. Get the DataValueDescriptor for an INOUT or OUT parameter.
| |
| getParameterForSet | back to summary |
|---|---|
| public DataValueDescriptor getParameterForSet(int position) throws StandardException Implements org. Doc from org. Returns the parameter at the given position in order to set it. Setting via an unknown object type must use setParameterAsObject() to ensure correct typing.
| |
| getParameterMode | back to summary |
|---|---|
| public short getParameterMode(int parameterIndex) Implements org. Return the mode of the parameter according to JDBC 3.0 ParameterMetaData
| |
| getParameterNumber | back to summary |
|---|---|
| public int getParameterNumber(GenericParameter theParam) Return the parameter number (in jdbc lingo, i.e. 1 based) for the given parameter. Linear search.
| |
| getPrecision | back to summary |
|---|---|
| public int getPrecision(int parameterIndex) Implements org. Return the precision of the given parameter index in this pvs.
| |
| getReturnValueForSet | back to summary |
|---|---|
| public DataValueDescriptor getReturnValueForSet() throws StandardException Implements org. Get the value of the return parameter in order to set it.
| |
| getScale | back to summary |
|---|---|
| public int getScale(int parameterIndex) Implements org. Return the scale of the given parameter index in this pvs.
| |
| hasReturnOutputParameter | back to summary |
|---|---|
| public boolean hasReturnOutputParameter() Implements org. Is there a return output parameter in this pvs. A return parameter is from a CALL statement of the following syntax: ? = CALL myMethod()
| |
| initialize | back to summary |
|---|---|
| public void initialize(DataTypeDescriptor[] types) throws StandardException Implements org. Initialize the set by allocating a holder DataValueDescriptor object for each parameter.
| |
| registerOutParameter | back to summary |
|---|---|
| public void registerOutParameter(int parameterIndex, int jdbcType, int scale) throws StandardException Implements org. Mark the parameter as an output parameter.
| |
| setParameterAsObject | back to summary |
|---|---|
| public void setParameterAsObject(int position, Object value) throws StandardException Implements org. Doc from org. Set the value of this user defined parameter to the passed in Object.
| |
| setParameterMode | back to summary |
|---|---|
| public void setParameterMode(int position, int mode) Implements org. Doc from org. Set the mode of the parameter, called when setting up static method calls and stored procedures. Otherwise the parameter type will default to an IN parameter.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| transferDataValues | back to summary |
|---|---|
| public void transferDataValues(ParameterValueSet pvstarget) throws StandardException Implements org. Doc from org. Set the parameter values of the pvstarget to equal those set in this PVS. Used to transfer saved SPS parameters to the actual prepared statement parameters once associated parameters have been established. Assumes pvstarget is the same length as this.
| |
| validate | back to summary |
|---|---|
| public void validate() throws StandardException Implements org. Validate the parameters. This is done for situations where we cannot validate everything in the setXXX() calls. In particular, before we do an execute() on a CallableStatement, we need to go through the parameters and make sure that all parameters are set up properly. The motivator for this is that setXXX() can be called either before or after registerOutputParamter(), we cannot be sure we have the types correct until we get to execute().
| |