The IfxToJavaType class

The IfxToJavaType class handles all the HCL OneDB™ to Java™ data type conversions. Separate methods are provided for converting each HCL OneDB data type.

The primitive data types of Java are boolean, char, byte, short, int, long, float, double. When ever possible, the conversion returns the primitive data type rather than the Object.

The following table shows the data types that can be converted between the HCL OneDB data types to Java data types.
Table 1. Conversion between HCL OneDB and Java data types
HCL OneDB data types Java data types
BIGINT long
BYTE int (as a large object ID, without an input stream)
CHAR (n) / CHARACTER (n) string
DATE java.sql.Date
DATETIME java.sql.Timestamp
DATETIME interval
DATETIME string
DEC/DECIMAL (p,s) java.lang.Bignum
DOUBLE PRECISION (n) double
FLOAT Same as DOUBLE PRECISION
INT8 long
INT/INTEGER int
INTERVAL interval
MONEY (p,s) Same as DECIMAL
NUMERIC (p,s) Same as DECIMAL
REAL real
SERIAL (n) int
SMALLFLOAT Same as REAL
SMALLINT short
TEXT int (as a large object ID, without an input stream)
VARCHAR (m,r) string
In addition to the conversion methods, the follow methods are also provided
  • convertDateToDays()
  • convertDaysToDate()
  • rleapyear()
  • widenByte()