ParameterValueSetfinal class GenericParameterValueSet extends java.lang.Object implements ParameterValueSet
ParameterValueSet| Modifier and Type | Field | Description |
|---|---|---|
(package private) ClassInspector |
ci |
|
private boolean |
hasReturnOutputParam |
|
private GenericParameter[] |
parms |
| Modifier | Constructor | Description |
|---|---|---|
private |
GenericParameterValueSet(int numParms,
GenericParameterValueSet pvs) |
|
(package private) |
GenericParameterValueSet(ClassInspector ci,
int numParms,
boolean hasReturnOutputParam) |
Constructor for a GenericParameterValueSet
|
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
private void |
checkPosition(int position) |
Check the position number for a parameter and throw an exception if
it is out of range.
|
void |
clearParameters() |
Sets all parameters to an uninitialized state.
|
ParameterValueSet |
getClone() |
Clone the ParameterValueSet and its contents.
|
(package private) GenericParameter |
getGenericParameter(int position) |
|
DataValueDescriptor |
getParameter(int position) |
Returns the parameter value 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 |
getParameterNumber(GenericParameter theParam) |
Return the parameter number (in jdbc lingo, i.e. 1 based)
for the given parameter.
|
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 set by allocating a holder DataValueDescriptor object
for each parameter.
|
void |
registerOutParameter(int parameterIndex,
int jdbcType,
int scale) |
Mark the parameter as an output parameter.
|
void |
setParameterAsObject(int position,
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.
|
java.lang.String |
toString() |
|
void |
transferDataValues(ParameterValueSet pvstarget) |
Set the parameter values of the pvstarget to equal those
set in this PVS.
|
void |
validate() |
Validate the parameters.
|
private final GenericParameter[] parms
final ClassInspector ci
private final boolean hasReturnOutputParam
GenericParameterValueSet(ClassInspector ci, int numParms, boolean hasReturnOutputParam)
numParms - The number of parameters in the new ParameterValueSethasReturnOutputParam - 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.private GenericParameterValueSet(int numParms,
GenericParameterValueSet pvs)
public void initialize(DataTypeDescriptor[] types) throws StandardException
initialize in interface ParameterValueSettypes - expected to match the number of parameters.StandardExceptionpublic void setParameterMode(int position,
int mode)
ParameterValueSetsetParameterMode in interface ParameterValueSetpublic void clearParameters()
ParameterValueSetclearParameters in interface ParameterValueSetParameterValueSet.clearParameters()public int getParameterCount()
getParameterCount in interface ParameterValueSetpublic DataValueDescriptor getParameter(int position) throws StandardException
getParameter in interface ParameterValueSetStandardException - Thrown on errorpublic DataValueDescriptor getParameterForSet(int position) throws StandardException
ParameterValueSetgetParameterForSet in interface ParameterValueSetStandardException - Thrown on errorpublic DataValueDescriptor getParameterForGet(int position) throws StandardException
ParameterValueSetgetParameterForGet in interface ParameterValueSetposition - Zero based index of the parameter.StandardException - Position out of range or the parameter is not INOUT or OUT.public void setParameterAsObject(int position,
java.lang.Object value)
throws StandardException
ParameterValueSetsetParameterAsObject in interface ParameterValueSetStandardException - Thrown on errorpublic boolean allAreSet()
ParameterValueSetallAreSet in interface ParameterValueSetParameterValueSet.allAreSet()public void transferDataValues(ParameterValueSet pvstarget) throws StandardException
ParameterValueSettransferDataValues in interface ParameterValueSetpvstarget - ParameterValueSet which will recieve the valuesStandardException - values not compatibleParameterValueSet.transferDataValues(org.apache.derby.iapi.sql.ParameterValueSet)GenericParameter getGenericParameter(int position)
public java.lang.String toString()
toString in class java.lang.Objectprivate void checkPosition(int position)
throws StandardException
position - The position number to checkStandardException - Thrown if position number is
out of range.public ParameterValueSet getClone()
ParameterValueSetgetClone in interface ParameterValueSetpublic void registerOutParameter(int parameterIndex,
int jdbcType,
int scale)
throws StandardException
registerOutParameter in interface ParameterValueSetparameterIndex - The ordinal parameterIndex of a parameter to set
to the given value.jdbcType - A type from java.sql.Typesscale - the scale to use. -1 means ignore scaleStandardException - on errorpublic void validate()
throws StandardException
validate in interface ParameterValueSetStandardException - if the parameters aren't validpublic int getParameterNumber(GenericParameter theParam)
public boolean checkNoDeclaredOutputParameters()
checkNoDeclaredOutputParameters in interface ParameterValueSetpublic short getParameterMode(int parameterIndex)
getParameterMode in interface ParameterValueSetparameterIndex - the first parameter is 1, the second is 2, ...public boolean hasReturnOutputParameter()
hasReturnOutputParameter in interface ParameterValueSetpublic DataValueDescriptor getReturnValueForSet() throws StandardException
getReturnValueForSet in interface ParameterValueSetStandardException - if a database-access error occurs.public int getScale(int parameterIndex)
getScale in interface ParameterValueSetparameterIndex - the first parameter is 1, the second is 2, ...public int getPrecision(int parameterIndex)
getPrecision in interface ParameterValueSetparameterIndex - the first parameter is 1, the second is 2, ...Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.