borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.dataset
java.lang.Object +----java.lang.Throwable +----java.lang.Exception +----borland.jbcl.dataset.DataSetException +----borland.jbcl.dataset.ValidationException +----borland.jbcl.dataset.ResolutionException
Variables Constructors Properties Methods
Implements ChainedException, Serializable
The DataSetException class extends the java.lang.Exception class and is used heavily by the dataset package. It encapsulates common errors that can be generated, and behavior necessary to access this error information.
The DataSetException class can have other types of exceptions chained to them, for example, java.io.IOException and java.sql.SQLException exceptions. In these cases the DataSetException has an appropriate message that describes the error from the perspective of the higher level API.
Programmatically, use the getExceptionChain() to obtain any chained exception. A chained exception (a singly linked list) can contain non-DataSetException exceptions that were encountered at a lower level API.
The dataset package has some built-in DataSetException handling support for JBCL data-aware controls. The controls themselves don't know what a DataSetException is. They simply expect all of their data update and access operations to work, leaving the handling of errors to the built-in DataSetException. For JBCL data aware controls, the default DataSetException error handling works as follows at runtime:
The DataSetException class is extended by borland.jbcl.dataset.ValidationException and borland.jbcl.dataset.ResolutionException classes.
public static final int ALREADY_LOADING = BASE+28The DataSet cannot be loaded or is not in load mode. Unexpected Internal error.
public static final int BAD_QUERY_PROPERTIES = BASE+1One or more connection properties of the Database or query properties of the QueryDataSet are not set.
public static final int CANNOT_CHANGE_COLUMN = BASE+70Cannot make the requested change to the Column. Use Column.clone() before applying changes.
public static final int CANNOT_CHANGE_COLUMN_DATA_TYPE = BASE+14Cannot change the data type of the Column because the Column already contains data.
public static final int CANNOT_FIND_TABLE_NAME = BASE+7Cannot determine the table name for the query property of the QueryDataSet from metadata or from parsing the query property.
public static final int CANNOT_IMPORT_NULL_DATASET = BASE+9The DataSet must contain Columns before data can be imported.
public static final int CANNOT_REFRESH = BASE+77Cannot refresh the current DataSet.
public static final int CANNOT_SAVE_CHANGES = BASE+76Cannot save changes in the current DataSet.
public static final int CANNOT_UPDATE_SCOPED_DATA_ROW = BASE+30Cannot modify Column elements in a scoped DataRow. Create a new scoped DataRow if needed.
public static final int COLUMN_ALREADY_BOUND = BASE+13The Column is already bound to a DataSet. Use Column.clone() to add this column.
public static final int COLUMN_NOT_IN_ROW = BASE+19The Column is in the DataSet but was excluded from the row.
public static final int COLUMN_TYPE_CONFLICT = BASE+11Failed to add a Column with the same name, but different data type as an existing Column.
public static final int CONNECTION_DESCRIPTOR_NOT_SET = BASE+45Cannot open a Database unless the ConnectionDescriptor is set. From the JBuilder UI, set the connection property of the Database component.
public static final int CONNECTION_NOT_CLOSED = BASE+80Connection could not be closed.
public static final int DATASET_CORRUPT = BASE+35Operation failed. The DataSet structure is corrupt.
public static final int DATASET_HAS_NO_ROWS = BASE+41Invalid access on an empty DataSet. If working with a master-detail relationship where the master DataSet has no rows and the details are being fetched as needed, add persistent Columns to the detail DataSet. This allows the initialization logic to determine the Columns of the detail DataSet.
public static final int DATASET_HAS_NO_TABLES = BASE+18Save operation failed. None of the DataSet class Columns that are updatable have a table name.
public static final int DATASET_NOT_OPEN = BASE+42Operation failed. The DataSet is not open.
public static final int DATASET_OPEN = BASE+39Operation cannot be performed on an open DataSet. Close the DataSet first.
public static final int DATA_FILE_LOAD_FAILED = BASE+60The DataFile load operation failed.
public static final int DUPLICATE_COLUMN_NAME = BASE+36Duplicate value for the columnName property in this DataSet.
public static final int EMPTY_COLUMN_NAMES = BASE+20List of Columns is null or empty.
public static final int EXCEPTION_CHAIN = BASE+47Exception chain
public static final int FIELD_POST_ERROR = BASE+81The field value cannot be posted. This error occurs when a DataSet requests that a data aware control post field values being edited and the field value cannot be posted (most likely due to a ValidationException error). Unfortunately controls do not currently provide any information on why a post failed.
public static final int INCOMPATIBLE_DATA_ROW = BASE+31Attempt to use a DataRow with a DataSet that are no longer synchronized. A DataRow must be created with the DataSet it is used with. If the structure of a DataSet changes, a new DataRow must be created for it.
public static final int INSUFFICIENT_ROWID = BASE+73The DataSet.refetchRow() method was called with an insufficient rowId (row identifier).
public static final int INVALID_AGG_DESCRIPTOR = BASE+46Operation failed. The AggDescriptor has no groupColumns, or some groupColumns do not exist in the DataSet.
public static final int INVALID_COLUMN_POSITION = BASE+12The Column postion is out of range.
public static final int INVALID_COLUMN_TYPE = BASE+49Operation failed. Invalid Column data type for a DataSet.
public static final int INVALID_DATA_FILE_FORMAT = BASE+32Attempt load or save a DataSet with an invalid DataFileFormat property setting. See DataFileFormat for valid file format settings.
public static final int INVALID_FORMAT = BASE+71column formatting error for default, min, max values using edit mask or display format.
public static final int INVALID_SCHEMA_FILE = BASE+50Invalid schema file.
public static final int INVALID_SORT_COLUMN = BASE+48Operation failed. Attempt to sort on non sortable Column, for example a Binary Column.
public static final int IO_ERROR = BASE+79Operation failed due to an IO error.
public static final int LINK_COLUMNS_ERROR = BASE+33The number and data type of Columns in the MasterLinkColumns and DetailLinkColumns must match.
public static final int LOADING_NOT_STARTED = BASE+29Cannot load data into the DataSet. The DataSet is not in load mode. Unexpected Internal error.
public static final int MASTER_DETAIL_VIEW_ERROR = BASE+34The SortDescriptor keys property setting is not compatible with the DataSet linkColumns property. The keys property must start with all the Columns specified in the MasterLinkColumns and DetailColumns properties.
public static final int MASTER_NAVIGATION_ERROR = BASE+43Error in navigating master DataSet.
public static final int MISMATCHED_PARAMETER_FORMAT = BASE+5Cannot mix named parameters and '?' parameter markers.
public static final int MISSING_MASTER_DATASET = BASE+65Detail DataSet being resolved without a master DataSet.
public static final int MISSING_RESOLVER = BASE+64Resolver object missing.
public static final int MULTIPLE_ROWS_AFFECTED = BASE+38More than one row was affected by resolution query (either DELETE or UPDATE query).
public static final int NEED_LOCATE_START_OPTION = BASE+24Must specify one of First, Last, Next, Prior for locate operations (see borland.jbcl.dataset.Locate).
public static final int NON_EXISTENT_ROWID = BASE+74DataSet.refetchRow() was called with non existent rowId (row identifier).
public static final int NOT_DATABASE_RESOLVER = BASE+67Trying to use the Database component to save changes to a DataSet with a non-DatabaseResolver derived resolver.
public static final int NOT_SELECT_QUERY = BASE+2Not a SELECT query, can't be parsed.
public static final int NOT_UPDATEABLE = BASE+37The DataSet has no unique row identifiers and is not updatable.
public static final int NO_CALC_FIELDS = BASE+44Operation failed. There is a CalcFieldsListener, but no Columns with the CalcType property set to CALC.
public static final int NO_NON_BLOB_COLUMNS = BASE+21Operation cannot be completed. The DataSet has no non-blob Columns.
public static final int NO_RESULT_SET = BASE+78Execution of query did not return a result set.
public static final int NO_ROWS_AFFECTED = BASE+51No row was affected by resolution query (either DELETE or UPDATE query).
public static final int NO_UPDATABLE_COLUMNS = BASE+8Could not find any updatable columns when saving DataSet data.
public static final int NO_WHERE_CLAUSE = BASE+40A QueryDataSet that uses delayed detail fetching must have a where clause in its query property.
public static final int NULL_COLUMN_NAME = BASE+68Trying to perform an operation that requires a column name without having specified one.
public static final int ONEPASS_INPUT_STREAM = BASE+72Attempting to read twice from a input stream that doesn't support reset().
public static final int PARAMETER_COUNT_MISMATCH = BASE+6Mismatch between number of parameters markers in query and number of parameters in the ReadRow.
public static final int PARTIAL_SEARCH_FOR_STRING = BASE+23Partial search option can only be used when last column searched on is of String type.
public static final int QUERY_FAILED = BASE+62Execution of query failed.
public static final int QUERY_IN_PROCESS = BASE+26A query is already in process for this DataSet.
public static final int QUERY_NOT_EXECUTED = BASE+25The query has not been executed yet
public static final int REFRESHROW_NOT_SUPPORTED = BASE+75The current DataSet does not support a refetch row operation.
public static final int REOPEN_FAILURE = BASE+61Failure notification to dependent components of a DataSet reopen.
public static final int RESOLVE_FAILED = BASE+63Resolve failed.
public static final int RESOLVE_IN_PROGRESS = BASE+69The DataSet changes are currently being saved. Retry operation later.
public static final int RESTRUCTURE_IN_PROGRESS = BASE+27Operation failed. A restructure operation is already in progress.
public static final int SET_CALCULATED_FAILURE = BASE+15Cannot set the calculated property for Columns that already have data.
public static final int SQL_ERROR = BASE+66SQLException from JDBC API.
public static final int TRANSACTION_ISOLATION_LEVEL_NOT_SUPPORTED = BASE+22Driver does not support this (or any higher) transaction isolation level.
public static final int UNEXPECTED_END_OF_QUERY = BASE+3Unexpected end of query, can't be parsed.
public static final int UNKNOWN_COLUMN_NAME = BASE+10Cannot find Column with given columnName.
public static final int UNKNOWN_PARAM_NAME = BASE+4No matching named query parameter could be found.
public static final int UNRECOGNIZED_DATA_TYPE = BASE+16Unknown Variant data type.
protected int errorCode
protected ExceptionChain exceptionChain
public DataSetException(int errorCode, java.lang.String message)Creates a DataSetException object with a single error.
Parameters:
public DataSetException(int errorCode, java.lang.String message, borland.jbcl.util.ExceptionChain chain)Creates a DataSetException object with properties as specified in its parameters.
Parameters:
public DataSetException(int errorCode, java.lang.String message, java.lang.Exception ex)
Parameters:
public int getErrorCode()Read-only property that returns the error code associated with the DataSetException.
public ExceptionChain getExceptionChain()Read-only property that returns a chained Exception through a borland.jbcl.util.ExceptionChain object. The chained exception (a singly linked list) includes non-DataSetExceptions that were encountered at a lower level API.
public static final void addExceptionListener(borland.jbcl.dataset.ExceptionListener listener)Add a listener for ExceptionListener dispatches.
public static final void handleException(borland.jbcl.dataset.DataSet dataSet, java.awt.Component component, java.lang.Exception ex)
public static final void handleException(borland.jbcl.dataset.DataSet dataSet, java.awt.Component component, java.lang.Exception ex, boolean modal)
public static final void handleException(java.lang.Exception ex)
public static final void handleException(java.lang.Exception ex, boolean modal)
public void printStackTrace()
Overrides: java.lang.Throwable.printStackTrace()
public void printStackTrace(java.io.PrintStream out)
Overrides: java.lang.Throwable.printStackTrace(java.io.PrintStream)
public static final void removeExceptionListener(borland.jbcl.dataset.ExceptionListener listener)Add a listener for ExceptionListener dispatches.
public static final void throwBadQueryProperties()
public static final void throwIOException(java.io.IOException ex)
public static final void throwInvalidColumnType(int dataType)
public static final void throwQueryInProcess()
public static final void throwQueryNotExecuted()
public static final void throwSQLException(java.sql.SQLException ex)