Package org.firebirdsql.jdbc
Class FBProcedureCall
- java.lang.Object
- 
- org.firebirdsql.jdbc.FBProcedureCall
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 
 public class FBProcedureCall extends java.lang.Object implements java.lang.CloneableRepresents procedure call.
- 
- 
Field SummaryFields Modifier and Type Field Description static booleanOLD_CALLABLE_STATEMENT_COMPATIBILITYtrueif the old callable statement compatibility mode should be used, otherwise -false.
 - 
Constructor SummaryConstructors Constructor Description FBProcedureCall()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInputParam(FBProcedureParam param)Add an input parameter to this procedure call.voidaddOutputParam(FBProcedureParam param)Add an output parameter to this procedure call.FBProcedureParamaddParam(int position, java.lang.String param)Add call parameter.voidcheckParameters()Checks if all parameters have been set.java.lang.Objectclone()booleanequals(java.lang.Object obj)Check ifobjis equal to this instance.FBProcedureParamgetInputParam(int index)Get input parameter by the specified index.java.util.List<FBProcedureParam>getInputParams()Get the list of input parameters for this procedure call.java.lang.StringgetName()Get the name of the procedure to be called.FBProcedureParamgetOutputParam(int index)Get the output parameter at the specified index.java.util.List<FBProcedureParam>getOutputParams()Get a list of output parameters for this procedure call.java.lang.StringgetSQL(boolean select)Get native SQL for the specified procedure call.inthashCode()intmapOutParamIndexToPosition(int index)Map output parameter index to a column number of corresponding result set.intmapOutParamIndexToPosition(int index, boolean compatibilityMode)Map output parameter index to a column number of corresponding result set.voidregisterOutParam(int index, int type)Register output parameter.voidsetName(java.lang.String name)Set the name of the procedure to be called.
 
- 
- 
- 
Field Detail- 
OLD_CALLABLE_STATEMENT_COMPATIBILITYpublic static final boolean OLD_CALLABLE_STATEMENT_COMPATIBILITY trueif the old callable statement compatibility mode should be used, otherwise -false. Current value -true.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
clonepublic java.lang.Object clone() - Overrides:
- clonein class- java.lang.Object
 
 - 
getNamepublic java.lang.String getName() Get the name of the procedure to be called.- Returns:
- The procedure name
 
 - 
setNamepublic void setName(java.lang.String name) Set the name of the procedure to be called.- Parameters:
- name- The name of the procedure
 
 - 
getInputParampublic FBProcedureParam getInputParam(int index) 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.
 
 - 
getOutputParampublic FBProcedureParam getOutputParam(int index) 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
 
 - 
mapOutParamIndexToPositionpublic int mapOutParamIndexToPosition(int index) throws java.sql.SQLExceptionMap output parameter index to a column number of corresponding result set.- Parameters:
- index- index to map.
- Returns:
- mapped column number or indexif no output parameter with the specified index found (assuming thatOLD_CALLABLE_STATEMENT_COMPATIBILITYconstant is set totrue, otherwise throws exception).
- Throws:
- java.sql.SQLException- if compatibility mode is switched off and no parameter was found (see- OLD_CALLABLE_STATEMENT_COMPATIBILITYconstant).
 
 - 
mapOutParamIndexToPositionpublic int mapOutParamIndexToPosition(int index, boolean compatibilityMode) throws java.sql.SQLExceptionMap output parameter index to a column number of corresponding result set.- Parameters:
- index- index to map.
- compatibilityMode-- trueif we should run in old compatibility mode.
- Returns:
- mapped column number or indexif no output parameter with the specified index found andcompatibilityModeis set.
- Throws:
- java.sql.SQLException- if compatibility mode is switched off and no parameter was found.
 
 - 
getInputParamspublic java.util.List<FBProcedureParam> getInputParams() Get the list of input parameters for this procedure call.- Returns:
- A list of all input parameters
 
 - 
getOutputParamspublic java.util.List<FBProcedureParam> getOutputParams() Get a list of output parameters for this procedure call.- Returns:
- A list of all output parameters
 
 - 
addInputParampublic void addInputParam(FBProcedureParam param) Add an input parameter to this procedure call.- Parameters:
- param- The parameter to be added
 
 - 
addOutputParampublic void addOutputParam(FBProcedureParam param) Add an output parameter to this procedure call.- Parameters:
- param- The parameter to be added
 
 - 
addParampublic FBProcedureParam addParam(int position, java.lang.String param) 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 FBProcedureParamthat was created to represent this parameter.
 
 - 
registerOutParampublic void registerOutParam(int index, int type) throws java.sql.SQLExceptionRegister 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:
- java.sql.SQLException- if something went wrong.
 
 - 
getSQLpublic java.lang.String getSQL(boolean select) throws java.sql.SQLExceptionGet native SQL for the specified procedure call.- Returns:
- native SQL that can be executed by the database server.
- Throws:
- java.sql.SQLException
 
 - 
checkParameterspublic void checkParameters() throws java.sql.SQLExceptionChecks if all parameters have been set.- Throws:
- java.sql.SQLException- When some parameters don't have values, and are not registered as an out parameter.
 
 - 
equalspublic boolean equals(java.lang.Object obj) Check ifobjis equal to this instance.- Overrides:
- equalsin class- java.lang.Object
- Returns:
- trueiff- objis instance of this class representing the same procedure with the same parameters.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 
- 
 
-