borland Packages  Class Hierarchy  sql.dataset Package  Index 

ProcedureDescriptor class

java.lang.Object
   +----borland.sql.dataset.QueryDescriptor
           +----borland.sql.dataset.ProcedureDescriptor

About the ProcedureDescriptor class

Constructors  Properties  Methods  

Implements Serializable

The ProcedureDescriptor class stores property settings associated with a ProcedureDataSet. Its main properties are:

To work with this component programatically, set its properties when instantiating the ProcedureDescriptor object, or individually by its write accessor methods. For properties that do not have corresponding setter methods, use a constructor that takes that property as a parameter.

Through the user-interface, the information stored in the ProcedureDescriptor can be accessed by inspecting the procedure property of a ProcedureDataSet object. This displays the Procedure property editor. The Procedure property editor also provides additional discovery functionality through the Browse Procedures button. Clicking this button displays a dialog listing available stored procedures in the associated database (as specified by the Database property). When you select a stored procedure from this dialog, its contents are pasted into the Stored Procedure Escape or SQL Statement field to be run against the server database.

When you close the procedure property editor, as long as the necessary properties have been specified (the stored procedure escape sequence or SQL statement and the Database object), JBuilder runs the stored procedure against the specified Database object.

You can also explicitly test the stored procedure's properties by clicking the Test Procedure button from within the Procedure property editor. Results of "Success" and "Fail" display in the area beneath the Test Procedure button.

Data can be loaded all in one fetch, as needed, asynchronously or one at a time. When working with asynchronous queries, opening the ProcedureDataSet then immediately calling methods such as rowCount() typically returns a row count lower than expected. To avoid this, either set the stored procedure to run synchronously, listen for the LoadingEvent, perform other actions while the ProcedureDataSet completes loading, or listen for updates to the row count. With asynchronous loading, as the stored procedure fetches rows of data, they are appended to the end of the DataSet. If working with a sorted view of the DataSet, the new rows appear in the specified sort order. Also, be careful to not make assumptions about the current row position since rows are inserted into the sorted view as they are fetched, thereby changing row positions automatically.

For more information on executing stored procedures in JBuilder, see the ProcedureDataSet component. For examples on using a ProcedureDescriptor with the ProcedureDataSet, see Obtaining data through a stored procedure in the Database Application Developer's Guide.

Note: If a stored procedure is run against a synonym on an Oracle server, it is dependent on the support of synonyms in the JDBC driver to determine whether the stored procedure is updatable.


ProcedureDescriptor constructors

ProcedureDescriptor properties

*Read-only properties **Write-only properties

Properties implemented in borland.sql.dataset.QueryDescriptor

Properties implemented in java.lang.Object

ProcedureDescriptor methods

Methods implemented in borland.sql.dataset.QueryDescriptor

Methods implemented in java.lang.Object


ProcedureDescriptor constructors

ProcedureDescriptor(borland.sql.dataset.Database, java.lang.String)

  public ProcedureDescriptor(borland.sql.dataset.Database database, java.lang.String query)
Constructs a ProcedureDescriptor object with the specified parameters:

Parameters:

database
The associated Database object.
query
The stored procedure escape or SQL statement to run against the database.

ProcedureDescriptor(borland.sql.dataset.Database, java.lang.String, borland.jbcl.dataset.ReadWriteRow, boolean)

  public ProcedureDescriptor(borland.sql.dataset.Database database, java.lang.String query, borland.jbcl.dataset.ReadWriteRow parameters, boolean executeOnOpen)
Constructs a ProcedureDescriptor object with the specified parameters:

Parameters:

database
The associated Database object.
query
The stored procedure escape or SQL statement to run against the database.
parameters
The ReadWriteRow implementation that stores the parameter values for the stored procedure.
executeOnOpen
Whether or not the stored procedure escape or SQL statement should execute immediately when an object that is bound to the ProcedureDataSet is opened.

ProcedureDescriptor(borland.sql.dataset.Database, java.lang.String, borland.jbcl.dataset.ReadWriteRow, boolean, boolean)

  public ProcedureDescriptor(borland.sql.dataset.Database database, java.lang.String query, borland.jbcl.dataset.ReadWriteRow parameters, boolean executeOnOpen, boolean asynchronousExecution)

ProcedureDescriptor(borland.sql.dataset.Database, java.lang.String, borland.jbcl.dataset.ReadWriteRow, boolean, int)

  public ProcedureDescriptor(borland.sql.dataset.Database database, java.lang.String query, borland.jbcl.dataset.ReadWriteRow parameters, boolean executeOnOpen, int loadOption)
Constructs a ProcedureDescriptor object with the specified parameters:

Parameters:

database
The associated Database object.
query
The stored procedure escape or SQL statement to run against the database.
parameters
The ReadWriteRow implementation that stores the parameter values for the stored procedure.
executeOnOpen
Whether or not the stored procedure escape or SQL statement should execute immediately when an object that is bound to the ProcedureDataSet is opened.
load
How the data should be loaded into the ProcedureDataSet. Constants for this parameter are defined in Load variables.