Try OpenEdge Now
skip to main content
Customization Guide
Developing custom Managed Adapters : Supported data types
 

Supported data types

Adapter Configuration and Mapping Framework supports two-way conversion between various data types and boolean, as listed in the following table.
Table 15. Supported types for conversion
Source type
Target type
java.lang. String
java.lang. Long
java.lang. Integer
java.lang. Double
java.lang. Float
java.math. BigDecimal
java.sql. Timestamp
java.lang. Boolean
java.lang. Object
java.lang.String
S
SF
SF
SF
SF
SF
SF
SF
S
java.lang.Long
SC
S
SC
SC
SC
SC
SC
SC
S
java.lang.Integer
SC
SC
S
SC
SC
SC
SC
SC
S
java.lang.Double
SC
SC
SC
S
SC
SC
SC
SC
S
java.lang.Float
SC
SC
SC
SC
S
SC
SC
SC
S
java.math.BigDecimal
SC
SC
SC
SC
SC
S
SC
SC
S
java.sql.Timestamp
SC
SC
SC
SC
SC
SC
S
S
java.lang.Boolean
SC
SC
SC
SC
SC
SC
S
S
java.lang.Object
SC
SF
SF
SF
SF
SF
SF
SF
S
*S: supported, no conversion performed
*SF: supported, if the source is in proper format
*SC: supported, conversion performed
When a value is converted from one data type to another, following rules apply:
*Converting numeric values. Care must be exercised while converting between different numeric types. The transformation may involve loss of precision, or the value may be truncated. For example, if an adapter output is defined as java.lang.Double, you may still map it to an integer data type, but in this case the value will be rounded off.
Note: All numeric types except "BigDecimal" are internally stored as "Double" values, which can have an effect when trying to convert values outside the range of the target type.
*Converting between boolean and numeric types. When a number is converted to Boolean, any non-negative value will be converted to "true"; negative or zero value will be converted to "false". The reverse conversion, from boolean to numeric, maps "true" to "1" and "false" to "0".
*Mapping to "java.lang.Object". If any value is mapped to "java.lang.Object", no transformation will be performed.
*Mapping <null> values. When a mapped input dataslot contains a null value, the corresponding input will not be defined in the adapter inputs hashtable. When a Managed Adapter returns a null value for a mapped output, the value of the corresponding dataslot will be set to the dataslot default value by BP Server.