The setXXXCast() methods
The setXXXCast() methods specify the implicit or explicit cast to convert data from an opaque type to the data type specified.
The ifxtype parameter is a type code from the class com.informix.lang.IfxTypes. Data type mapping between the ifxtype parameter and the SQL type in the database server is detailed in Mapping for casts. The methodsqlname parameter is the SQL name of the Java™ method that implements the cast.
The following example sets an implicit cast implemented
by a Java method with the SQL
name circle2_input:
setImplicitCast(com.informix.lang.IfxTypes.IFX_TYPE_LVARCHAR,
"circle2_input");
The following example sets an explicit cast implemented
by a Java method with the SQL
name circle_output:
setExplicitCast(com.informix.lang.IfxTypes.IFX_TYPE_LVARCHAR,
"circle2_output");
The following example sets an explicit cast for converting
a circle2 opaque type to an integer:
setExplicitCast(com.informix.lang.IfxTypes.IFX_TYPE_INT,
"circle2_to_int");