borland Packages  Class Hierarchy  dx.sql.dataset Package 

ProcedureResolver component

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

About the ProcedureResolver component

Constructors  Properties  Methods  Event Listeners

Implements Designable, 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 com.borland.dx.dataset.Resolver

Methods implemented in com.borland.dx.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(Database database)
The Database object associated with this component. If not set, a DataSetException of NO_DATABASE_TO_RESOLVE is generated.

deleteProcedure

 public ProcedureDescriptor getDeleteProcedure()
 public void setDeleteProcedure(ProcedureDescriptor deleteProcedure)
Stores the ProcedureDescriptor (which includes the parameters used when calling the delete procedure) that is associated with the ProcedureDataSet. The deleteProcedure is invoked for every row, that was deleted in the DataSet.

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(ProcedureDescriptor insertProcedure)
Stores the ProcedureDescriptor (which includes the parameters used when calling the insert stored procedure) that is associated with the ProcedureDataSet. 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(ProcedureDescriptor updateProcedure)
Stores the ProcedureDescriptor (which includes the parameters used when calling the update stored procedure) that is associated with the ProcedureDataSet. 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(com.borland.dx.dataset.StorageDataSet)

  public void closeStatements(StorageDataSet dataSet)
Frees any system resources used for statements associated with the specified StorageDataSet.

Overrides: com.borland.dx.sql.dataset.SQLResolver.closeStatements(com.borland.dx.dataset.StorageDataSet)

deleteRow(com.borland.dx.dataset.DataSet)

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

Overrides: com.borland.dx.sql.dataset.SQLResolver.deleteRow(com.borland.dx.dataset.DataSet)

insertRow(com.borland.dx.dataset.DataSet)

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

Overrides: com.borland.dx.sql.dataset.SQLResolver.insertRow(com.borland.dx.dataset.DataSet)

updateRow(com.borland.dx.dataset.DataSet, com.borland.dx.dataset.ReadWriteRow)

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

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


ProcedureResolver event listeners

This component is a source for the following event sets.

resolver

 public synchronized void addResolverListener(ResolverListener listener)
 public synchronized void removeResolverListener(ResolverListener listener)