borland Packages Class Hierarchy dx.sql.dataset Package
java.lang.Object +----com.borland.dx.dataset.Resolver +----com.borland.dx.sql.dataset.SQLResolver +----com.borland.dx.sql.dataset.ProcedureResolver
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.
sp_procxmode
to change the transaction mode to either "anymore" or "unchained". See your Sybase documentation for additional information.
public ProcedureResolver()Constructs a
ProcedureResolver
component.
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.
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:
DataSet
.
parameterRow
specified in the ProcedureDescriptor
.
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:
DataSet
.
parameterRow
specified in the ProcedureDescriptor
.
parameterRow
may be used for output
summaries or optional input parameters.
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:
DataSet
DataSet
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.
public void closeStatements(StorageDataSet dataSet)Frees any system resources used for statements associated with the specified
StorageDataSet
.
public synchronized void deleteRow(DataSet dataSet)Instructs the
Resolver
to delete the current row in the DataSet
from the Database
.
public synchronized void insertRow(DataSet dataSet)Instructs the
Resolver
to insert the current row of the DataSet
into the Database
.
public synchronized void updateRow(DataSet dataSet, ReadWriteRow oldDataRow)Instructs the
Resolver
to update the current row of the DataSet
in the Database
.
public synchronized void addResolverListener(ResolverListener listener) public synchronized void removeResolverListener(ResolverListener listener)