borland Packages  Class Hierarchy  dx.dataset Package 

CoerceFromListener interface

java.util.EventListener
   +----com.borland.dx.dataset.CoerceFromListener

About the CoerceFromListener interface

Methods  
If set, the CoerceFromListener interface is called by implementors of Resolvers to coerce data from the data type of the Column to the data type of the data source. It is used by QueryDataSet, ProcedureDataSet, QueryResolver, and ProcedureResolver components. This allows an application to coerce column values from one data type to another as the values are received from a data source such as a JDBC driver.

Data types are automatically converted during the resolving phase according to the table listed in Data type conversions during data resolving. If you set a column's dataType property, thereby over-riding the default JDBC-to-com.borland mapping, automatic data type coercion is done. The exception to the automatic type coercion is when converting to and from a String to any type other than String (and other conversions involving such differing data types). A VariantException is thrown in these cases.

To customize the coercion, or to prevent the VariantException from being thrown (in cases as described in the previous paragraph), wire the CoerceFromListener.coerceFromColumn(...) event.

See also: Data type conversion during data providing, CoerceToListener.coerceToColumn(...) event


CoerceFromListener methods

Methods defined in this interface


CoerceFromListener methods

coerceFromColumn(com.borland.dx.dataset.StorageDataSet, com.borland.dx.dataset.Column, com.borland.dx.dataset.Variant, com.borland.dx.dataset.Variant)

  void coerceFromColumn(StorageDataSet dataSet, Column column, Variant from, Variant to)
Allows an application to control the coercion of a data value from a column in the DataSet to the data source.

Parameters:

dataSet
The DataSet in which the column exists.
Column
The name of the column in dataSet.
from
The data value from the data source which needs to be coerced to the to parameter.
to
The column value that the from parameter must be coerced to.