borland Packages  Class Hierarchy  dx.dataset Package 

ValidationException class

java.lang.Object
   +----java.lang.Throwable
           +----java.lang.Exception
                   +----com.borland.dx.dataset.DataSetException
                           +----com.borland.dx.dataset.ValidationException

About the ValidationException class

Variables  Constructors  Properties  Methods  

Implements ChainedException, Serializable

The ValidationException class is a subclass of DataSetException and is used heavily by the dataset package for Column and row-level validation errors that occur when posting changed or new row(s) of data.


ValidationException variables

Variables implemented in this class

Variables implemented in com.borland.dx.dataset.DataSetException

ValidationException constructors

ValidationException properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in com.borland.dx.dataset.DataSetException

Properties implemented in java.lang.Object

Properties implemented in java.lang.Throwable

ValidationException methods

Methods implemented in this class

Methods implemented in com.borland.dx.dataset.DataSetException

Methods implemented in java.lang.Object

Methods implemented in java.lang.Throwable


ValidationException variables

APPLICATION_ERROR

  public static final int APPLICATION_ERROR = BASE+12
Application error caused by an Exception in a application event handler.

CANNOT_DITTO_EXISTING

  public static final int CANNOT_DITTO_EXISTING = BASE+10
Cannot ditto into an existing row. By default, you cannot ditto over an existing row; you must insert an empty row and ditto into it.

CANNOT_ORPHAN_DETAILS

  public static final int CANNOT_ORPHAN_DETAILS = BASE+3
Master rows that have detail rows linked to them cannot be deleted or have their linking columns modified.

DELETE_NOT_ALLOWED

  public static final int DELETE_NOT_ALLOWED = BASE+16
Row deleting not allowed.

DUPLICATE_KEY

  public static final int DUPLICATE_KEY = BASE+17
The key value is a duplicate.

GREATER_THAN_MAX

  public static final int GREATER_THAN_MAX = BASE+8
The value entered for a Column is greater than the Column component's max property.

INSERT_NOT_ALLOWED

  public static final int INSERT_NOT_ALLOWED = BASE+14
Row insertion not allowed.

INVALID_COLUMN_VALUE

  public static final int INVALID_COLUMN_VALUE = BASE+4
Application-defined validation failed in a ColumnChangeListener.validate() event handler.

INVALID_FORMAT

  public static final int INVALID_FORMAT = BASE+11
Cannot parse value or generic format error.

Overrides: com.borland.dx.dataset.DataSetException.INVALID_FORMAT

INVALID_PRECISION

  public static final int INVALID_PRECISION = BASE+9
String values for this column can not exceed the precision length set in the Column.precision property. This property can be implicitly set when data is retrieved from a provider. If data is being provided from a JDBC driver, the precision specified by the JDBC result set will be propagated to the Column.precision property. This propagation can be overridden by explicitly setting the Column.precision property.

INVALID_ROW_VALUES

  public static final int INVALID_ROW_VALUES = BASE+5
The row cannot be posted due to missing or invalid field values.

LESS_THAN_MIN

  public static final int LESS_THAN_MIN = BASE+7
The value entered for the Column is less than the Column component's min property.

NO_ROWS_TO_DELETE

  public static final int NO_ROWS_TO_DELETE = BASE+13
No rows to delete.

READ_ONLY_COLUMN

  public static final int READ_ONLY_COLUMN = BASE+1
Attempting to assign a value to a readonly column.

READ_ONLY_DATASET

  public static final int READ_ONLY_DATASET = BASE+2
Attempting to assign a value to a readonly DataSet.

UPDATE_NOT_ALLOWED

  public static final int UPDATE_NOT_ALLOWED = BASE+15
Row editing not allowed.

ValidationException constructors

ValidationException(int, java.lang.String, com.borland.dx.dataset.Column)

  public ValidationException(int errorCode, String error, Column column)
Constructs a ValidationException object that contains the error code, the error that occurred, and the Column in which it occurred.

Parameters:

errorCode
One of the ValidationException variables.
error
The message describing the error that occurred.
column
The column containing the error that occurred.

ValidationException(int, java.lang.String, com.borland.dx.dataset.Column, java.lang.Exception)

  public ValidationException(int errorCode, String error, Column column, Exception ex)
Constructs a ValidationException object that contains the error code, the error that occurred, the Column in which it occurred, and the exception.

Parameters:

errorCode
One of the ValidationException variables.
error
The message describing the error that occurred.
column
The column containing the error that occurred.
ex
The exception that occurred.

ValidationException properties

errorColumn

 public final Column getErrorColumn()
Returns the offending Column for this error. Returns null if it is a row level error.

ValidationException methods

duplicateKey(com.borland.dx.dataset.StorageDataSet, com.borland.dx.dataset.SortDescriptor)

  public static final void duplicateKey(StorageDataSet dataSet, SortDescriptor descriptor)
Cannot parse value or generic format error. Throws a ValidationException of DUPLICATE_KEY.

invalidFormat(java.lang.Exception, java.lang.String, java.lang.String)

  public static final void invalidFormat(Exception ex, String columnName, String message)
Cannot parse value or generic format error. If message is null, throws a ValidationException of INVALID_FORMAT. If message is not null, returns the offending column for this error, or returns null if it is a row level error.