borland Packages Class Hierarchy dx.sql.dataset Package
java.lang.Object +----java.lang.Throwable +----java.lang.Exception +----java.lang.RuntimeException +----com.borland.dx.dataset.DataSetException +----com.borland.dx.sql.dataset.ResolutionException
Variables Constructors Properties Methods
Implements ChainedException, Serializable
The ResolutionException
class defines error constants and behavior associated with error conditions encountered when resolving changes made to data back to its data source. It extends DataSetException
and may include chained exceptions.
DataSetException
, DBExceptionDialog
public transient DataSet dataSetThe
DataSet
object that generated the ResolutionException
.
public static final int DELETE_FAILED = BASE+2An attempt to delete a value in a
DataSet
failed.
For instance, a ResolutionException
with this error code will be thrown when there has been an attempt to delete a value in a DataSet
that has been set to readOnly
.
public static final int INSERT_FAILED = BASE+1An attempt to insert a value in a
DataSet
failed.
For instance, a ResolutionException
with this error code will be thrown when there has been an attempt to insert a value in a DataSet
that has been set to readOnly
.
public static final int RESOLVE_FAILED = BASE+4If the
StorageDataSet.maxResolveErrors
property is set, a ResolutionException
with this error code will be thrown when the maximum errors are encountered.
The resolution process is aborted; changes are rolled back.
ResolveError
public static final int RESOLVE_PARTIAL = BASE+5If the
StorageDataSet.maxResolveErrors
property is set, a ResolutionException
with this error code will be thrown when all rows have been processed.
Any successfully processed rows will be committed.
ResolveError
public static final int UPDATE_FAILED = BASE+3An attempt to update a
DataSet
failed.
For instance, a ResolutionException
with this error code will be thrown when there has been an attempt to delete master rows that have detail rows linked to them, or modify their linking columns.
public ResolutionException(int errorCode, DataSet dataSet, String message, Exception ex)Constructs a
ResolutionException
object with the following parameters:
errorCode
dataSet
DataSet
object that generated this error.
message
ex
Exception
object.
public ResolutionException(int errorCode, StorageDataSet[] errorDataSets, String message)Constructs a
ResolutionException
object with the following parameters:
errorCode
errorDataSets
StorageDataSet
objects that generated this error.
message
public DataSet getDataSet()
Returns an array of StorageDataSet
s that contain errors from a resolution process. A resolution process can be invoked by calling DataSet.saveChanges()
or Database.saveChanges()
. This property will only be non-null if one or more StorageDataSet
s that participated in the resolver operation had the StorageDataSet.maxResolveErrors
property set to -1 or to a value greater than 0.
The returned array has a StorageDataSet
entry for each StorageDataSet
that participated in the resolve operation. The order of these errorDataSets
in the array corresponds directory to the order of the StorageDataSet
s in the array of StorageDataSet
s passed into the resolution manager class.
In the case that Database.saveChanges()
is called to invoke the resolution manager, the array passed to this method dictates the order of the errorDataSets
array if there are any errors logged. If there are no errors logged for a StorageDataSet
being resolved, its entry in the errorDataSets
array wil be null.
The structure of the errorDataSets
is described in ResolveError
.
public StorageDataSet[] getErrorDataSets()Read-only property that returns all the errors for which
ErrorResponse.ignore()
was called.
This method returns an array of StorageDataSets
. There is one StorageDataSet
for every DataSet
that participated in the resolution. The order of the StorageDataSets
in the error StorageDataSet
array corresponds to the order of the DataSets
that were passed into the Database.saveChanges()
method.