borland Packages  Class Hierarchy  sql.dataset Package  Index 

ProcedureResolver component

java.lang.Object
   +----borland.jbcl.dataset.Resolver
           +----borland.sql.dataset.SQLResolver
                   +----borland.sql.dataset.ProcedureResolver

About the ProcedureResolver component

Constructors  Properties  Methods  Event Listeners

Implements Serializable

The ProcedureResolver component is used to resolve (save) changes back to a JBDC data source by calling stored procedures in that database. The stored procedures must exist prior to using this component; this component will not generate them. These stored procedures must meet the requirements described in the following properties:

The database property of this component must be set to the Database component that this ProcedureResolver is associated with. Otherwise, a DataSetException is generated.

Sybase users: Stored procedures on Sybase servers are created in a "Chained" transaction mode. In order to call Sybase stored procedures as part of this component, the procedures must be modified to run in an unchained transaction mode. Use the Sybase stored system procedure sp_procxmode to change the transaction mode to either "anymore" or "unchained". See your Sybase documentation for additional information.


ProcedureResolver constructors

ProcedureResolver properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

ProcedureResolver methods

Methods implemented in this class

Methods implemented in borland.jbcl.dataset.Resolver

Methods implemented in borland.sql.dataset.SQLResolver

Methods implemented in java.lang.Object

ProcedureResolver event listeners


ProcedureResolver constructors

ProcedureResolver()

  public ProcedureResolver()
Constructs a ProcedureResolver component.

ProcedureResolver properties

database

 public Database getDatabase()
 public void setDatabase(borland.sql.dataset.Database database)
The Database object associated with this component. If not set, a DataSetException of Cannot resolve data, since Database property is not set on Resolver is generated.

deleteProcedure

 public ProcedureDescriptor getDeleteProcedure()
 public void setDeleteProcedure(borland.sql.dataset.ProcedureDescriptor deleteProcedure)
The available parameters for invocation of a deleteProcedure call are:
  1. the original row as it was when data was provided into the DataSet.
  2. the optional parameterRow specified in the ProcedureDescriptor.
The stored procedure should be designed to delete a record in the appropriate table(s) given the original data of that row.

insertProcedure

 public ProcedureDescriptor getInsertProcedure()
 public void setInsertProcedure(borland.sql.dataset.ProcedureDescriptor insertProcedure)
The insertProcedure is invoked for every row, that was inserted in the DataSet. The available parameters for invocation of an insertProcedure are:
  1. the inserted row as it appears in the DataSet.
  2. the optional parameterRow specified in the ProcedureDescriptor.
The stored procedure should be designed to insert a record in the appropriate table(s) given the data of that row. The parameterRow may be used for output summaries or optional input parameters.

updateProcedure

 public ProcedureDescriptor getUpdateProcedure()
 public void setUpdateProcedure(borland.sql.dataset.ProcedureDescriptor updateProcedure)
The updateProcedure is invoked for every row that was changed in the DataSet. The available parameters for invocation of an updateProcedure are:
  1. the modified row as it appears in the DataSet
  2. the original row as it was when data was provided into the DataSet
  3. the optional parameterRow specified in the ProcedureDescriptor

The stored procedure should be designed to update a record in the appropriate table(s) given the original data, and the modified data. Since the original row and the modified row have the same column names, the named parameter syntax has been expanded with a way to indicate the designated data row.

The named parameter ":2.CUST_ID" indicates the CUST_ID of the original data row, where ":1.CUST_ID" indicates the CUST_ID of the modified row.


ProcedureResolver methods

closeStatements(borland.jbcl.dataset.StorageDataSet)

  public void closeStatements(borland.jbcl.dataset.StorageDataSet dataSet)

Overrides: borland.sql.dataset.SQLResolver.closeStatements(borland.jbcl.dataset.StorageDataSet)

deleteRow(borland.jbcl.dataset.DataSet)

  public synchronized void deleteRow(borland.jbcl.dataset.DataSet dataSet)
Instructs the Resolver to delete the current row in the DataSet from the Database.

Overrides: borland.sql.dataset.SQLResolver.deleteRow(borland.jbcl.dataset.DataSet)

insertRow(borland.jbcl.dataset.DataSet)

  public synchronized void insertRow(borland.jbcl.dataset.DataSet dataSet)
Instructs the Resolver to insert the current row of the DataSet into the Database.

Overrides: borland.sql.dataset.SQLResolver.insertRow(borland.jbcl.dataset.DataSet)

updateRow(borland.jbcl.dataset.DataSet, borland.jbcl.dataset.ReadWriteRow)

  public synchronized void updateRow(borland.jbcl.dataset.DataSet dataSet, borland.jbcl.dataset.ReadWriteRow oldDataRow)
Instructs the Resolver to update the current row of the DataSet in the Database.

Overrides: borland.sql.dataset.SQLResolver.updateRow(borland.jbcl.dataset.DataSet, borland.jbcl.dataset.ReadWriteRow)


ProcedureResolver event listeners

This component is a source for the following event sets. For information on the JBCL event sets, see Events in JBCL.

resolver

 public synchronized void addResolverListener(borland.jbcl.dataset.ResolverListener listener)
 public synchronized void removeResolverListener(borland.jbcl.dataset.ResolverListener listener)