borland Packages  Class Hierarchy  dx.sql.dataset Package 

ProcedureProvider class

java.lang.Object
   +----com.borland.dx.dataset.Provider
           +----com.borland.dx.sql.dataset.JdbcProvider
                   +----com.borland.dx.sql.dataset.ProcedureProvider
                           +----com.borland.dx.sql.dataset.OracleProcedureProvider

About the ProcedureProvider class

Properties  Methods  

Implements Designable, LoadCancel, ConnectionUpdateListener, Task, Serializable, EventListener

The ProcedureProvider class provides data to the StorageDataSet by executing the specified stored procedure through JDBC. You connect this component to the StorageDataSet component through the StorageDataSet's provider property.

This class provides the data to the StorageDataSet however it does not attempt to make the StorageDataSet updatable or editable; it is the developer's responsibility to ensure this prior to the start of the resolution phase.

The stored procedure is expected to return a result set. For stored procedures that don't return values, use either static form of the callProcedure() method to execute them.


ProcedureProvider properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in com.borland.dx.sql.dataset.JdbcProvider

Properties implemented in java.lang.Object

ProcedureProvider methods

Methods implemented in this class

Methods implemented in com.borland.dx.dataset.Provider

Methods implemented in com.borland.dx.sql.dataset.JdbcProvider

Methods implemented in java.lang.Object


ProcedureProvider properties

parameterRow

 public ReadWriteRow getParameterRow()
 public void setParameterRow(ReadWriteRow value)
The ReadWriteRow that is used to fill in parameter values for parameterized queries or stored procedures for StorageDataSet extensions such as QueryDataSet and ProcedureDataSet.

procedure

 public final ProcedureDescriptor getProcedure()
 public final void setProcedure(ProcedureDescriptor procedureDescriptor)
Stores the ProcedureDescriptor object that contains property settings for the stored procedure.

ProcedureProvider methods

callProcedure(com.borland.dx.sql.dataset.Database, java.lang.String, com.borland.dx.dataset.ReadWriteRow)

  public static final int callProcedure(Database database, String procedureSpecification, ReadWriteRow parameters)
Calls a stored procedure. For example,
     callProcedure(db1,"call foo",null);

This method can also be used for queries with an output parameter, for example:

     callProcedure(db1,"select sum(expense) into ? from expense_table",paramRow);

Parameters:

database
The associated Database object.
procedureSpecification
The procedure to call.
parameters
The ReadWriteRow implementation that stores the parameter values for the stored procedure.

callProcedure(com.borland.dx.sql.dataset.Database, java.lang.String, com.borland.dx.dataset.ReadWriteRow[])

  public static final int callProcedure(Database database, String procedureSpecification, ReadWriteRow[] parameters)
Calls a stored procedure with named access to multiple rows of parameters. The parameters are accessed via an optional tag of the named parameters. The tag is the number of the passed ReadWriteRow, starting with 1. For example, the following code passes the value of the 'Name' column from the parameter row 'param1' as the first parameter, and the value of the 'Name' column from the parameter row 'param2'.
     callProcedure(db1,"call foo(:2.Name,:1.Name)", new ReadWriteRow[]{param1,param2});

If no tag is given, the parameter name is found by searching the parameter rows from left to right. Therefore, tags can be used to differentiate columns with identical names in different parameter rows.

Parameters:

database
The associated Database object.
procedureSpecification
The procedure to call.
parameters
An array of ReadWriteRow objects containing the parameter values for the stored procedure.

ifBusy()

  public void ifBusy()
Tests whether the data is present. This method is used when providing data asynchronously to determine whether editing, resolving, and other such actions should be blocked until the data is available.