java.lang.Object
org.firebirdsql.jdbc.FBProcedureCall
Represents procedure call.
This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInputParam
(FBProcedureParam param) Add an input parameter to this procedure call.void
addOutputParam
(FBProcedureParam param) Add an output parameter to this procedure call.Add call parameter.void
Checks if all parameters have been set.static FBProcedureCall
copyOf
(FBProcedureCall source) boolean
Check ifobj
is equal to this instance.getInputParam
(int index) Get input parameter by the specified index.List<@Nullable FBProcedureParam>
Get the list of input parameters for this procedure call.@Nullable String
getName()
Get the name of the procedure to be called.getOutputParam
(int index) Get the output parameter at the specified index.List<@Nullable FBProcedureParam>
Get a list of output parameters for this procedure call.getSQL
(boolean select) Get native SQL for the specified procedure call.int
hashCode()
int
mapOutParamIndexToPosition
(int index) Map output parameter index to a column number of the corresponding result set.void
registerOutParam
(int index, int type) Register output parameter.void
Set the name of the procedure to be called.
-
Constructor Details
-
FBProcedureCall
public FBProcedureCall()
-
-
Method Details
-
copyOf
-
getName
Get the name of the procedure to be called.- Returns:
- The procedure name
-
setName
Set the name of the procedure to be called.- Parameters:
name
- The name of the procedure
-
getInputParam
Get input parameter by the specified index.- Parameters:
index
- index for which parameter has to be returned, first index is 1- Returns:
- instance of
FBProcedureParam
.
-
getOutputParam
Get the output parameter at the specified index.- Parameters:
index
- The index of the parameter, first index is 1- Returns:
- The parameter at the given index
-
mapOutParamIndexToPosition
Map output parameter index to a column number of the corresponding result set.- Parameters:
index
- index to map- Returns:
- mapped column number or
index
if no output parameter with the specified index is found - Throws:
SQLException
- in current implementation: never, throws clause retained for compatibility and possibly future uses
-
getInputParams
Get the list of input parameters for this procedure call.- Returns:
- A list of all input parameters
-
getOutputParams
Get a list of output parameters for this procedure call.- Returns:
- A list of all output parameters
-
addInputParam
Add an input parameter to this procedure call.- Parameters:
param
- The parameter to be added
-
addOutputParam
Add an output parameter to this procedure call.- Parameters:
param
- The parameter to be added
-
addParam
Add call parameter. This method adds new parameter to the procedure call and tries to automatically place the parameter into the right collection if it contains a hint whether it is input or output parameter.- Parameters:
position
- position of the parameter in the procedure call.param
- contents of the parameter.- Returns:
- instance of the
FBProcedureParam
that was created to represent this parameter.
-
registerOutParam
Register output parameter. This method marks parameter with the specified index as output. Parameters marked as output cannot be used as input parameters.- Parameters:
index
- index of the parameter to mark as output.type
- SQL type of the parameter.- Throws:
SQLException
- if something went wrong.
-
getSQL
Get native SQL for the specified procedure call.- Returns:
- native SQL that can be executed by the database server.
- Throws:
SQLException
-
checkParameters
Checks if all parameters have been set.- Throws:
SQLException
- When some parameters don't have values, and are not registered as an out parameter.
-
equals
Check ifobj
is equal to this instance. -
hashCode
public int hashCode()
-