Class CallableStatementParameters

java.lang.Object
com.mcpdbwizard.pub.StatementParameters2
com.mcpdbwizard.pub.CallableStatementParameters

public class CallableStatementParameters extends StatementParameters2
A set of parameters for a Callable Statement statement call

This class represents OUT or IN/OUT parameters for a Stored Procedure or function. It extends StatementParameters2 which represents IN parameters and is used by both SQL statements and Procedures.

Under normal circumstances MCPDBWizard users will have no reason to use this class directly - the created code will use it.

Copyright 2003-2026 ATB Consultancy Services Ltd (formerly Orinda Software Ltd, Dublin, Ireland)

Version:
7
Author:
devteam@mcpdbwizard.com
  • Field Details

    • outputParameterSetArray

      protected boolean[] outputParameterSetArray
      Array of boolean for keeping track of whether parameters are set or not.
  • Constructor Details

    • CallableStatementParameters

      public CallableStatementParameters(int howMany, LogInterface theLog)
      Create a set of statement Parameters of size howMany.
      Parameters:
      howMany - The number of parameters the statement requires.
    • CallableStatementParameters

      public CallableStatementParameters(String sqlStatement, LogInterface theLog)
      Create a set of statement Parameters by counting '?' characters in a SQL statement
      Parameters:
      sqlStatement - The statement that we will be working with
  • Method Details

    • clearParameters

      public void clearParameters()
      Clear our parameter array
      Overrides:
      clearParameters in class StatementParameters2
    • setPlSqlIndexArrayOutParam

      public void setPlSqlIndexArrayOutParam(int parameterId, PlsqlIndexByTable2 parameterValue) throws CSException
      Set an out parameter for a PL/SQL Index By Table In order to retrieve a PL/SQL Index By Table you need to specify the data type you are expecting and how many records can be in the array. parametervalue is used to store this as well as the resulting array.
      Parameters:
      parameterId - The id of the parameter to set. Id's start at 0.
      parameterValue -
      Throws:
      CSException - if parameterId is not a valid parameter.
      Since:
      Oracle 10g / 4.0.1798
    • setPlSqlTableArrayOutParam

      public void setPlSqlTableArrayOutParam(int parameterId, PlsqlArray parameterValue) throws CSException
      Set an out parameter for a PL/SQL Array In order to retrieve a PL/SQL varray or table you need to specify the oracle collection name. parametervalue is used to store this as well as the resulting array.
      Parameters:
      parameterId - The id of the parameter to set. Id's start at 0.
      parameterValue -
      Throws:
      CSException - if parameterId is not a valid parameter.
      Since:
      Oracle 9i / 4.0.1885
    • setOutParam

      public void setOutParam(int parameterId, int parameterType) throws CSException
      Set an out parameter
      Parameters:
      parameterId - The id of the parameter to set. Id's start at 0.
      parameterType - A parameter type
      Throws:
      CSException - if parameterId is not a valid parameter.
    • setOutParam

      public void setOutParam(int parameterId, int parameterType, String parameterOpaqueTypeName) throws CSException
      Set an OPAQUE out parameter
      Parameters:
      parameterId - The id of the parameter to set. Id's start at 0.
      parameterType - A parameter type
      parameterOpaqueTypeName - Underlying data type name
      Throws:
      CSException - if parameterId is not a valid parameter.
      Since:
      6.0.2746
    • bindParameters

      public void bindParameters(CallableStatement theCallableStatement) throws CSException
      Bind these parameters to a Prepared Statement.
      Parameters:
      theCallableStatement - The prepared statement you want these parameters bound to.
      Throws:
      CSException
      Since:
      Oracle 10g / 4.0.1798 Support for PL/SQL INDEX BY tables
    • unloadParameters

      public void unloadParameters(CallableStatement theCallableStatement) throws CSException
      Unload these parameter from a Prepared Statement.
      Parameters:
      theCallableStatement - The prepared statement you want these parameters unloaded from.
      Throws:
      CSException
      Since:
      Oracle 10g / 4.0.1798 Support for PL/SQL INDEX BY tables, Oracle 9.0.1 / 4.0.1847 Support for PL/SQL tables
    • checkSet

      public void checkSet() throws CSException
      Complain if not all parameters set...
      Overrides:
      checkSet in class StatementParameters2
      Throws:
      CSException - if one or more parameters is not set.