borland Packages Class Hierarchy dx.dataset Package
java.util.EventListener +----com.borland.dx.dataset.ResolverListener
Methods
Implemented by ResolverAdapter
This interface is used as a notification before and after a StorageDataSet
is resolved. This interface includes
insertingRow, updatingRow, deletingRow
) can be used to validate the row being resolved, and prevent
unwanted changes.
Methods that occur after a data set is resolved (methods containing "ed"). These events
(insertedRow, updatedRow, deletedRow
) can be used to indicate that the action has been performed.
Methods that occur when an exception is thrown in response to an attempt to resolve
(methods ending in "Error"). The events (insertError, updateError, deleteError
) can be used to trap
errors during resolution, and take the appropriate action, such as aborting the transaction, ignoring the error, or
retrying the resolution.
This listener is added to instances of the QueryResolver
class. The QueryResolver
is hooked to
the StorageDataSet
by setting the resolver
property of the StorageDataSet
.
public void deletedRow(ReadWriteRow row)
This method is called when the deletion of a row from the data set has been resolved on the server.
row
public void deleteError(DataSet dataSet, ReadWriteRow row, DataSetException ex, ErrorResponse response)
This method is called when an exception is thrown during resolution of a deletion from the DataSet
.
dataSet
DataSet
passed in to be resolved. This can be used to position any controls bound to it if user interaction is needed.
row
ex
response
ABORT
, IGNORE
, or RETRY
for this error.
These constants are defined in util.ErrorResponse
.
Note that an ABORT
response causes all insert, update, and delete operations in the same transaction to be rolled back.
com.borland.dx.dataset.DataSetException
public void deletingRow(ReadWriteRow row, ResolverResponse response)
This method is called just before the deletion of a row from the data set is resolved on the server.
row
response
ABORT
, IGNORE
, or RETRY
for this error.
These constants are defined in util.ErrorResponse
.
Note that an ABORT
response causes all insert, update, and delete operations in the
same transaction to be rolled back.
public void insertedRow(ReadWriteRow row)
This method is called when the insertion of a row into the data set has been resolved on the server.
row
public void insertError(DataSet dataSet, ReadWriteRow row, DataSetException ex, ErrorResponse response)
This method is called when an exception is thrown during resolution of an insertion into the DataSet
.
dataSet
DataSet
passed in to be resolved, positioned at the row that caused the error. This can be used to position any controls bound to it if user interaction is needed.
row
ex
response
ABORT
, IGNORE
, or RETRY
for this error.
These constants are defined in util.ErrorResponse
.
Note that an ABORT
response causes all insert, update, and delete operations in the same transaction to be rolled back.
com.borland.dx.dataset.DataSetException
public void insertingRow(ReadWriteRow row, ResolverResponse response)
This method is called when just before the insertion of a row into the data set is resolved to the server.
row
response
ABORT
, IGNORE
, or RETRY
for this error.
These constants are defined in util.ErrorResponse
.
public void updatedRow(ReadWriteRow row, ReadRow oldRow)
This method is called when modifications to a row in the data set have been resolved on the server.
row
oldRow
public void updateError(DataSet dataSet, ReadWriteRow row, ReadRow oldRow, ReadWriteRow updRow, DataSetException ex, ErrorResponse response)
This method is called when an exception is thrown during resolution of modifications to a row in the DataSet
.
dataSet
DataSet
passed in to be resolved, positioned at the row that caused the error. This can be used to position any controls bound
to it if user interaction is needed.
row
oldRow
updRow
DataSet.refetchRow()
method, which refetches updates made to this row by other users
since the time the DataSet
was originally provided.
This is useful in dealing with the situation where another user has modified the same row. It allows your application to do a
three-way merge of oldRow, updRow, and row.
ex
response
util.ErrorResponse
.
Note that an ABORT
response causes all insert, update, and delete operations in the same transaction to be rolled back.
com.borland.dx.dataset.DataSetException
public void updatingRow(ReadWriteRow row, ReadRow oldRow, ResolverResponse response)
This method is called just before modifications to a row in the data set are resolved on the server.
row
oldRow
response
ABORT
, IGNORE
, or RETRY
for this error.
These constants are defined in util.ErrorResponse
.