com.informix.lang
Class IfxTypes

java.lang.Object
  extended bycom.informix.lang.IfxTypes

public class IfxTypes
extends java.lang.Object

The IfxTypes class contains final members for Informix data types.

See Also:
Types

Field Summary
static short IFX_BIT_COLLCLIENT
          A bit mask to indicate that a particular host variable is a client collection.
static short IFX_BIT_DBOOLEAN
          A bit mask to indicate that a particular column is a distinct of a boolean.
static short IFX_BIT_DISTINCT
          A bit mask to indicate that a particular column is a distinct type.
static short IFX_BIT_NAMEDROW
          A bit mask to indicate that a particular column is a named row type.
static short IFX_BIT_NOTNULLABLE
          A bit mask to indicate that a particular column does not allow null values.
static short IFX_TYPE_BLOB
          Informix BLOB type.
static short IFX_TYPE_BOOL
          The Informix SQLBOOL type as defined in the sqltypes.h file.
static short IFX_TYPE_BYTE
          The Informix SQLBYTES type as defined in the sqltypes.h file.
static short IFX_TYPE_CHAR
          The Informix SQLCHAR type as defined in the sqltypes.h file.
static short IFX_TYPE_CLOB
          Informix CLOB type.
static short IFX_TYPE_COLLECTION
          The Informix SQLCOLLECTION type as defined in the sqltypes.h file.
static short IFX_TYPE_DATE
          The Informix SQLDATE type as defined in the sqltypes.h file.
static short IFX_TYPE_DATETIME
          The Informix SQLDTIME type as defined in the sqltypes.h file.
static short IFX_TYPE_DECIMAL
          The Informix SQLDECIMAL type as defined in the sqltypes.h file.
static short IFX_TYPE_FLOAT
          The Informix SQLFLOAT type as defined in the sqltypes.h file.
static short IFX_TYPE_IMPEXP
          The Informix SQLIMPEXP type as defined in the sqltypes.h file.
static short IFX_TYPE_IMPEXPBIN
          The Informix SQLIMPEXPBIN type as defined in the sqltypes.h file.
static short IFX_TYPE_INT
          The Informix SQLINT type as defined in the sqltypes.h file.
static short IFX_TYPE_INT8
          The Informix SQLINT8 type as defined in the sqltypes.h file.
static short IFX_TYPE_INTERVAL
          The Informix SQLINTERVAL type as defined in the sqltypes.h file.
static short IFX_TYPE_LIST
          The Informix SQLLIST type as defined in the sqltypes.h file.
static short IFX_TYPE_LVARCHAR
          The Informix SQLLVARCHAR type as defined in the sqltypes.h file.
static short IFX_TYPE_MAX
          Maximum number for Informix types.
static short IFX_TYPE_MONEY
          The Informix SQLMONEY type as defined in the sqltypes.h file.
static short IFX_TYPE_MULTISET
          The Informix SQLMULTISET type as defined in the sqltypes.h file.
static short IFX_TYPE_NCHAR
          The Informix SQLNCHAR type as defined in the sqltypes.h file.
static short IFX_TYPE_NULL
          The Informix SQLNULL type as defined in the sqltypes.h file.
static short IFX_TYPE_NVCHAR
          The Informix SQLNVCHAR type as defined in the sqltypes.h file.
static short IFX_TYPE_REFSER8
          The Informix SQLREFSER8 type.
static short IFX_TYPE_ROW
          The Informix SQLROW type as defined in the sqltypes.h file.
static short IFX_TYPE_ROWREF
          The Informix SQLROWREF type as defined in the sqltypes.h file.
static short IFX_TYPE_SENDRECV
          The Informix SQLSENDRECV type as defined in the sqltypes.h file.
static short IFX_TYPE_SERIAL
          The Informix SQLSERIAL type as defined in the sqltypes.h file.
static short IFX_TYPE_SERIAL8
          The Informix SQLSERIAL8 type as defined in the sqltypes.h file.
static short IFX_TYPE_SET
          The Informix SQLSET type as defined in the sqltypes.h file.
static short IFX_TYPE_SMALLINT
          The Informix SQLSMINT type as defined in the sqltypes.h file.
static short IFX_TYPE_SMFLOAT
          The Informix SQLSMFLOAT type as defined in the sqltypes.h file.
static short IFX_TYPE_SQLUDRDEFAULT
          The Informix SQLUDRDEFAULT type as defined in the sqltypes.h file.
static short IFX_TYPE_TEXT
          The Informix SQLTEXT type as defined in the sqltypes.h file.
static short IFX_TYPE_UDTFIXED
          The Informix SQLUDTFIXED type as defined in the sqltypes.h file.
static short IFX_TYPE_UDTVAR
          The Informix SQLUDTVAR type as defined in the sqltypes.h file.
static short IFX_TYPE_UNKNOWN
          Unknown type.
static short IFX_TYPE_VARCHAR
          The Informix SQLVCHAR type as defined in the sqltypes.h file.
static short IFX_XID_BLOB
          Extended ID for BLOB types.
static short IFX_XID_BOOLEAN
          Extended ID for SQLBOOL.
static short IFX_XID_CLOB
          Extended ID for CLOB types.
static short IFX_XID_IMPEXP
          Extended ID for SQLIMPEXP.
static short IFX_XID_IMPEXPBIN
          Extended ID for SQLIMPEXPBIN.
static short IFX_XID_INDEXKEYARRAY
          Informix private
static short IFX_XID_LOLIST
          Informix private
static short IFX_XID_LVARCHAR
          Extended ID for SQLLVARCHAR.
static short IFX_XID_POINTER
          Informix private
static short IFX_XID_RTNPARAMTYPES
          Informix private
static short IFX_XID_SELFUNCARGS
          Informix private
static short IFX_XID_SENDRECV
          Extended ID for SQLSENDRECV.
static short IFX_XID_STAT
          Informix private
static java.lang.String IFX_XNAME_BLOB
          Extended type name for BLOB types.
static java.lang.String IFX_XNAME_BOOL
          Extended type name for boolean types.
static java.lang.String IFX_XNAME_CLOB
          Extended type name for BLOB types.
static java.lang.String IFX_XNAME_LVARCHAR
          Extended type name for lvarchar types.
 
Method Summary
static int FromIfxNameToIfxType(java.lang.String name)
          Converts Informix SQL type names to Informix types.
static int FromIfxToJDBC2Type(int ifxType)
          Converts Informix types to JDBC types with JDK 1.2.
static int FromIfxToJDBCType(int ifxType)
          Converts Informix types to JDBC types.
static java.lang.String FromIfxTypeToJava(int ifxType)
          Converts Informix types to JDBC types.
static int FromJavaToIfxType(java.lang.String javaClassName)
          Converts Java class types (host variable types) to Informix types.
static int FromJDBCToIfxType(int jdbcType)
          Converts JDBC types to Informix types.
static java.lang.String IfxTypeToName(int ifxType)
          Converts Informix types to type names.
static boolean isCollection(int ifxType)
          Tests if the given type is a collection type.
static boolean isComplexType(int ifxType)
          Tests if the given type is a complex type.
static boolean IsFloatTypes(int ifxType)
          Tests if the given type is a float type (either IFX_TYPE_FLOAT or IFX_TYPE_SMFLOAT).
static boolean isString(int ifxType)
          Tests if the given type is a string type (IFX_TYPE_CHAR, IFX_TYPE_VARCHAR, IFX_TYPE_NCHAR, IFX_TYPE_NVCHAR, or IFX_TYPE_LVARCHAR.
static boolean isUDT(int ifxType)
          Tests if the given type is a user-defined type, which includes opaque types, lvarchars, and booleans.
static java.lang.String JDBCTypeToName(int jdbcType)
          Converts JDBC types to type names.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IFX_TYPE_CHAR

public static final short IFX_TYPE_CHAR
The Informix SQLCHAR type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_SMALLINT

public static final short IFX_TYPE_SMALLINT
The Informix SQLSMINT type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_INT

public static final short IFX_TYPE_INT
The Informix SQLINT type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_FLOAT

public static final short IFX_TYPE_FLOAT
The Informix SQLFLOAT type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_SMFLOAT

public static final short IFX_TYPE_SMFLOAT
The Informix SQLSMFLOAT type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_DECIMAL

public static final short IFX_TYPE_DECIMAL
The Informix SQLDECIMAL type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_SERIAL

public static final short IFX_TYPE_SERIAL
The Informix SQLSERIAL type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_DATE

public static final short IFX_TYPE_DATE
The Informix SQLDATE type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_MONEY

public static final short IFX_TYPE_MONEY
The Informix SQLMONEY type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_NULL

public static final short IFX_TYPE_NULL
The Informix SQLNULL type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_DATETIME

public static final short IFX_TYPE_DATETIME
The Informix SQLDTIME type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_BYTE

public static final short IFX_TYPE_BYTE
The Informix SQLBYTES type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_TEXT

public static final short IFX_TYPE_TEXT
The Informix SQLTEXT type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_VARCHAR

public static final short IFX_TYPE_VARCHAR
The Informix SQLVCHAR type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_INTERVAL

public static final short IFX_TYPE_INTERVAL
The Informix SQLINTERVAL type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_NCHAR

public static final short IFX_TYPE_NCHAR
The Informix SQLNCHAR type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_NVCHAR

public static final short IFX_TYPE_NVCHAR
The Informix SQLNVCHAR type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_INT8

public static final short IFX_TYPE_INT8
The Informix SQLINT8 type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_SERIAL8

public static final short IFX_TYPE_SERIAL8
The Informix SQLSERIAL8 type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_SET

public static final short IFX_TYPE_SET
The Informix SQLSET type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_MULTISET

public static final short IFX_TYPE_MULTISET
The Informix SQLMULTISET type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_LIST

public static final short IFX_TYPE_LIST
The Informix SQLLIST type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_ROW

public static final short IFX_TYPE_ROW
The Informix SQLROW type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_COLLECTION

public static final short IFX_TYPE_COLLECTION
The Informix SQLCOLLECTION type as defined in the sqltypes.h file. Not supported by the JDBC driver.

See Also:
Constant Field Values

IFX_TYPE_ROWREF

public static final short IFX_TYPE_ROWREF
The Informix SQLROWREF type as defined in the sqltypes.h file. Not supported by the JDBC driver.

See Also:
Constant Field Values

IFX_TYPE_UDTVAR

public static final short IFX_TYPE_UDTVAR
The Informix SQLUDTVAR type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_UDTFIXED

public static final short IFX_TYPE_UDTFIXED
The Informix SQLUDTFIXED type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_REFSER8

public static final short IFX_TYPE_REFSER8
The Informix SQLREFSER8 type. Not supported by the JDBC driver.

See Also:
Constant Field Values

IFX_TYPE_LVARCHAR

public static final short IFX_TYPE_LVARCHAR
The Informix SQLLVARCHAR type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_SENDRECV

public static final short IFX_TYPE_SENDRECV
The Informix SQLSENDRECV type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_BOOL

public static final short IFX_TYPE_BOOL
The Informix SQLBOOL type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_IMPEXP

public static final short IFX_TYPE_IMPEXP
The Informix SQLIMPEXP type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_IMPEXPBIN

public static final short IFX_TYPE_IMPEXPBIN
The Informix SQLIMPEXPBIN type as defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_SQLUDRDEFAULT

public static final short IFX_TYPE_SQLUDRDEFAULT
The Informix SQLUDRDEFAULT type as defined in the sqltypes.h file. Not supported by the JDBC driver.

See Also:
Constant Field Values

IFX_TYPE_UNKNOWN

public static final short IFX_TYPE_UNKNOWN
Unknown type.

See Also:
Constant Field Values

IFX_TYPE_MAX

public static final short IFX_TYPE_MAX
Maximum number for Informix types.

See Also:
Constant Field Values

IFX_TYPE_CLOB

public static final short IFX_TYPE_CLOB
Informix CLOB type. This type is an Informix JDBC driver specific type and is not associated with any Informix database type defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_TYPE_BLOB

public static final short IFX_TYPE_BLOB
Informix BLOB type. This type is an Informix JDBC driver specific type and is not associated with any Informix database type defined in the sqltypes.h file.

See Also:
Constant Field Values

IFX_BIT_NOTNULLABLE

public static final short IFX_BIT_NOTNULLABLE
A bit mask to indicate that a particular column does not allow null values.

See Also:
Constant Field Values

IFX_BIT_DISTINCT

public static final short IFX_BIT_DISTINCT
A bit mask to indicate that a particular column is a distinct type.

See Also:
Constant Field Values

IFX_BIT_NAMEDROW

public static final short IFX_BIT_NAMEDROW
A bit mask to indicate that a particular column is a named row type.

See Also:
Constant Field Values

IFX_BIT_COLLCLIENT

public static final short IFX_BIT_COLLCLIENT
A bit mask to indicate that a particular host variable is a client collection.

See Also:
Constant Field Values

IFX_BIT_DBOOLEAN

public static final short IFX_BIT_DBOOLEAN
A bit mask to indicate that a particular column is a distinct of a boolean.

See Also:
Constant Field Values

IFX_XID_LVARCHAR

public static final short IFX_XID_LVARCHAR
Extended ID for SQLLVARCHAR.

See Also:
Constant Field Values

IFX_XID_SENDRECV

public static final short IFX_XID_SENDRECV
Extended ID for SQLSENDRECV.

See Also:
Constant Field Values

IFX_XID_IMPEXP

public static final short IFX_XID_IMPEXP
Extended ID for SQLIMPEXP.

See Also:
Constant Field Values

IFX_XID_IMPEXPBIN

public static final short IFX_XID_IMPEXPBIN
Extended ID for SQLIMPEXPBIN.

See Also:
Constant Field Values

IFX_XID_BOOLEAN

public static final short IFX_XID_BOOLEAN
Extended ID for SQLBOOL.

See Also:
Constant Field Values

IFX_XID_POINTER

public static final short IFX_XID_POINTER
Informix private

See Also:
Constant Field Values

IFX_XID_INDEXKEYARRAY

public static final short IFX_XID_INDEXKEYARRAY
Informix private

See Also:
Constant Field Values

IFX_XID_RTNPARAMTYPES

public static final short IFX_XID_RTNPARAMTYPES
Informix private

See Also:
Constant Field Values

IFX_XID_SELFUNCARGS

public static final short IFX_XID_SELFUNCARGS
Informix private

See Also:
Constant Field Values

IFX_XID_BLOB

public static final short IFX_XID_BLOB
Extended ID for BLOB types.

See Also:
Constant Field Values

IFX_XID_CLOB

public static final short IFX_XID_CLOB
Extended ID for CLOB types.

See Also:
Constant Field Values

IFX_XID_LOLIST

public static final short IFX_XID_LOLIST
Informix private

See Also:
Constant Field Values

IFX_XID_STAT

public static final short IFX_XID_STAT
Informix private

See Also:
Constant Field Values

IFX_XNAME_BLOB

public static final java.lang.String IFX_XNAME_BLOB
Extended type name for BLOB types.

See Also:
Constant Field Values

IFX_XNAME_CLOB

public static final java.lang.String IFX_XNAME_CLOB
Extended type name for BLOB types.

See Also:
Constant Field Values

IFX_XNAME_BOOL

public static final java.lang.String IFX_XNAME_BOOL
Extended type name for boolean types.

See Also:
Constant Field Values

IFX_XNAME_LVARCHAR

public static final java.lang.String IFX_XNAME_LVARCHAR
Extended type name for lvarchar types.

See Also:
Constant Field Values
Method Detail

FromIfxToJDBC2Type

public static int FromIfxToJDBC2Type(int ifxType)
Converts Informix types to JDBC types with JDK 1.2.

Parameters:
ifxType - The Informix SQL type.
Returns:
Corresponding JDBC type from java.sql.Types. If no mapping is found, Types.OTHER is returned.

FromIfxToJDBCType

public static int FromIfxToJDBCType(int ifxType)
Converts Informix types to JDBC types.

Parameters:
ifxType - The Informix SQL type.
Returns:
Corresponding JDBC type from java.sql.Types. If no mapping is found, Types.OTHER is returned.

FromJDBCToIfxType

public static int FromJDBCToIfxType(int jdbcType)
Converts JDBC types to Informix types.

Parameters:
jdbcType - The JDBC type as defined in java.sql.Types.
Returns:
Corresponding Informix type. If no mapping is found, IFX_TYPE_UNKNOWN is returned.

FromJavaToIfxType

public static int FromJavaToIfxType(java.lang.String javaClassName)
Converts Java class types (host variable types) to Informix types.

Parameters:
javaClassName - The fully qualified java object class name; for example, java.lang.String.
Returns:
Corresponding Informix type. If no mapping is found, IFX_TYPE_UNKNOWN is returned.

FromIfxTypeToJava

public static java.lang.String FromIfxTypeToJava(int ifxType)
Converts Informix types to JDBC types.

Parameters:
ifxType - The Informix SQL type.
Returns:
Corresponding JDBC type from java.sql.Types. If no mapping is found, "unknown" is returned.

IfxTypeToName

public static java.lang.String IfxTypeToName(int ifxType)
Converts Informix types to type names.

Parameters:
ifxType - The Informix SQL type.
Returns:
Corresponding Informix type name. If ifxType cannot be found, "unknown" is returned.

JDBCTypeToName

public static java.lang.String JDBCTypeToName(int jdbcType)
Converts JDBC types to type names.

Parameters:
jdbcType - The JDBC type as defined in java.sql.Types.
Returns:
Corresponding JDCB type name. If an invalid JDBC type is passed in, "unknown" is returned.

FromIfxNameToIfxType

public static int FromIfxNameToIfxType(java.lang.String name)
Converts Informix SQL type names to Informix types.

Parameters:
name - The Informix SQL type name in a string; for example, CHAR.
Returns:
Corresponding Informix type. If no mapping is found, Types.OTHER is returned.

IsFloatTypes

public static boolean IsFloatTypes(int ifxType)
Tests if the given type is a float type (either IFX_TYPE_FLOAT or IFX_TYPE_SMFLOAT).

Parameters:
ifxType - The Informix SQL type.
Returns:
True if the type is FLOAT or SMALLFLOAT, or else false.

isString

public static boolean isString(int ifxType)
Tests if the given type is a string type (IFX_TYPE_CHAR, IFX_TYPE_VARCHAR, IFX_TYPE_NCHAR, IFX_TYPE_NVCHAR, or IFX_TYPE_LVARCHAR.

Parameters:
ifxType - The Informix SQL type.
Returns:
True if the type is a String type, or else false.

isUDT

public static boolean isUDT(int ifxType)
Tests if the given type is a user-defined type, which includes opaque types, lvarchars, and booleans.

Parameters:
ifxType - The Informix SQL type.
Returns:
True if the type is LVARCHAR, BOOLEAN, or user-defined, or else false.

isCollection

public static boolean isCollection(int ifxType)
Tests if the given type is a collection type.

Parameters:
ifxType - The Informix SQL type.
Returns:
True if the type is a Collection type, or else false.

isComplexType

public static boolean isComplexType(int ifxType)
Tests if the given type is a complex type.

Parameters:
ifxType - The Informix SQL type.
Returns:
True if the type is a Complex type, or else false.