skip to main content
OpenAccess SDK SQL Engine core methods for Java : Exchanging data : Reference tables
 

Reference tables

This section contains tables referenced by the APIs listed in this chapter. Table 33 represents the Java data types that the Java code must use when calling the OpenAccess SDK SQL engine methods for Java.
Table 33. OpenAccess SDK Data Types and Java Type When Adding Value
SQL Type
Data Type - use with API calls
Java Data Type
BIGINT
XO_TYPE_BIGINT
long
BINARY
XO_TYPE_BINARY
byte [ ]
BIT
XO_TYPE_BIT
boolean
CHAR
XO_TYPE_CHAR
StringBuffer - string of characters
DATE
XO_TYPE_DATE
xo_tm - create this object using xo_tm(year, month, day).
DOUBLE
XO_TYPE_DOUBLE
double
FLOAT
XO_TYPE_FLOAT
double
INTEGER
XO_TYPE_INTEGER
int
LONGVARBINARY
XO_TYPE_ LONGVARBINARY
byte [ ]
LONGVARCHAR
XO_TYPE_ LONGVARCHAR
StringBuffer - string of characters
NUMERIC
XO_TYPE_NUMERIC
StringBuffer - a string with a decimal point. Does not have to be padded for exact precision and scale specifications. Use "." as the decimal separator regardless of the locale.
REAL
XO_TYPE_REAL
float
SMALLINT
XO_TYPE_SMALLINT
short
TIME
XO_TYPE_TIME
xo_tm - create this object using xo_tm(hour, minute, second, fraction).
TIMESTAMP
XO_TYPE_TIMESTAMP
xo_tm - create this object using xo_tm (year, month, day, hour, minute, second, fraction).
TINYINT
XO_TYPE_TINYINT
byte [ ]
VARBINARY
XO_TYPE_VARBINARY
byte [ ]
VARCHAR
XO_TYPE_VARCHAR
StringBuffer - string of characters
WCHAR
XO_TYPE_WCHAR
StringBuffer - string of Unicode characters
WLONGVARCHAR
XO_TYPE_ WLONGVARCHAR
StringBuffer - string of Unicode characters
WVARCHAR
XO_TYPE_WVARCHAR
StringBuffer - string of Unicode characters
Table 34details how an object is interpreted when returned from a method. The class of the object returned by the methods depends on the type of the column or the condition. For example, if the left condition value type is XO_TYPE_CHAR, then calling dam_getCondVal on that condition will return an object of type String.
Table 34. How the methods for Java return a value as an object
Data type of the condition/column
Class type of the returned object
XO_TYPE_BIGINT
Long
XO_TYPE_BINARY
Byte [ ]
XO_TYPE_BIT
Boolean
XO_TYPE_CHAR
String
XO_TYPE_DATE
xo_tm - access the fields xo_tm.YEAR, xo_tm.MONTH, and xo_tm.DAY_OF_MONTH using the getVal method.
XO_TYPE_DOUBLE
Double
XO_TYPE_FLOAT
Double
XO_TYPE_INTEGER
Integer
XO_TYPE_LONGVARBINARY
Byte [ ]
XO_TYPE_LONGVARCHAR
String
XO_TYPE_NUMERIC
String
XO_TYPE_REAL
Float
XO_TYPE_SMALLINT
Short
XO_TYPE_TIME
xo_tm - access the fields xo_tm.HOUR, xo_tm.MINUTE, xo_tm.SECOND, and xo_tm.FRACTION using the getVal method.
XO_TYPE_TIMESTAMP
xo_tm - access the fields xo_tm.YEAR, xo_tm.MONTH, xo_tm.DAY_OF_MONTH, xo_tm.HOUR, xo_tm.MINUTE, xo_tm.SECOND, and xo_tm.FRACTION using the getVal method.
XO_TYPE_TINYINT
Byte [ ]
XO_TYPE_VARBINARY
Byte [ ]
XO_TYPE_VARCHAR
String
XO_TYPE_WCHAR
String
XO_TYPE_WLONGVARCHAR
String
XO_TYPE_WVARCHAR
String