org.firebirdsql.jdbc
Class FBProcedureCall

java.lang.Object
  extended byorg.firebirdsql.jdbc.FBProcedureCall

public class FBProcedureCall
extends java.lang.Object

Represents procedure call.


Constructor Summary
FBProcedureCall()
           
 
Method Summary
 void addInputParam(FBProcedureParam param)
           
 void addOutputParam(FBProcedureParam param)
           
 FBProcedureParam addParam(int position, java.lang.String param)
          Add call parameter.
 boolean equals(java.lang.Object obj)
          Check if obj is equal to this instance.
 FBProcedureParam getInputParam(int index)
          Get input parameter by the specified index.
 java.util.List getInputParams()
           
 java.lang.String getName()
           
 FBProcedureParam getOutputParam(int index)
           
 java.util.List getOutputParams()
           
 java.lang.String getSQL(boolean select)
          Get native SQL for the specified procedure call.
 int mapOutParamIndexToPosition(int index)
          Map output parameter index to a column number of corresponding result set.
 void registerOutParam(int index, int type)
          Register output parameter.
 void setName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FBProcedureCall

public FBProcedureCall()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getInputParam

public FBProcedureParam getInputParam(int index)
Get input parameter by the specified index.

Parameters:
index - index for which parameter has to be returned.
Returns:
instance of FBProcedureParam.

getOutputParam

public FBProcedureParam getOutputParam(int index)

mapOutParamIndexToPosition

public int mapOutParamIndexToPosition(int index)
                               throws FBSQLException
Map output parameter index to a column number of corresponding result set.

Parameters:
index - index to map.
Returns:
mapped column number or -1 if no output parameter with the specified index found.
Throws:
FBSQLException

getInputParams

public java.util.List getInputParams()

getOutputParams

public java.util.List getOutputParams()

addInputParam

public void addInputParam(FBProcedureParam param)

addOutputParam

public void addOutputParam(FBProcedureParam param)

addParam

public 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 FBProcedureParam that was created to represent this parameter.

registerOutParam

public void registerOutParam(int index,
                             int type)
                      throws java.sql.SQLException
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:
java.sql.SQLException - if something went wrong.

getSQL

public java.lang.String getSQL(boolean select)
                        throws FBSQLException
Get native SQL for the specified procedure call.

Returns:
native SQL that can be executed by the database server.
Throws:
FBSQLException

equals

public boolean equals(java.lang.Object obj)
Check if obj is equal to this instance.

Returns:
true iff obj is instance of this class representing the same procedure with the same parameters.


Copyright © 2001 David Jencks and other authors. All rights reserved.