com.gbasedbt.lang

Class IfxTypes

  • java.lang.Object
    • com.gbasedbt.lang.IfxTypes


  • public class IfxTypes
    extends java.lang.Object
    The IfxTypes class contains final members for GBase 8s data types.
    See Also:
    Types
    • Field Detail

      • IFX_TYPE_CHAR

        public static final short IFX_TYPE_CHAR
        The GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s SQLREFSER8 type. Not supported by the JDBC driver.
        See Also:
        Constant Field Values
      • IFX_TYPE_LVARCHAR

        public static final short IFX_TYPE_LVARCHAR
        The GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s types.
        See Also:
        Constant Field Values
      • IFX_TYPE_CLOB

        public static final short IFX_TYPE_CLOB
        GBase 8s CLOB type. This type is an GBase 8s JDBC driver specific type and is not associated with any GBase 8s database type defined in the sqltypes.h file.
        See Also:
        Constant Field Values
      • IFX_TYPE_BLOB

        public static final short IFX_TYPE_BLOB
        GBase 8s BLOB type. This type is an GBase 8s JDBC driver specific type and is not associated with any GBase 8s 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_IDSSECURITYLABEL

        public static final short IFX_XID_IDSSECURITYLABEL
        See Also:
        Constant Field Values
      • IFX_XID_IDSCOVERINGINFO

        public static final short IFX_XID_IDSCOVERINGINFO
        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 GBase 8s types to JDBC types with JDK 1.2.
        Parameters:
        ifxType - The GBase 8s 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 GBase 8s types to JDBC types.
        Parameters:
        ifxType - The GBase 8s SQL type.
        Returns:
        Corresponding JDBC type from java.sql.Types. If no mapping is found, Types.OTHER is returned.
      • fromJavaToIfxTypeName

        public static java.lang.String fromJavaToIfxTypeName(java.lang.Class<?> clazz)
      • FromJDBCToIfxType

        public static int FromJDBCToIfxType(int jdbcType)
        Converts JDBC types to GBase 8s types.
        Parameters:
        jdbcType - The JDBC type as defined in java.sql.Types.
        Returns:
        Corresponding GBase 8s 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 GBase 8s types.
        Parameters:
        javaClassName - The fully qualified java object class name; for example, java.lang.String.
        Returns:
        Corresponding GBase 8s type. If no mapping is found, IFX_TYPE_UNKNOWN is returned.
      • FromIfxTypeToJava

        public static java.lang.String FromIfxTypeToJava(int ifxType)
        Converts GBase 8s types to JDBC types.
        Parameters:
        ifxType - The GBase 8s 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 GBase 8s types to type names.
        Parameters:
        ifxType - The GBase 8s SQL type.
        Returns:
        Corresponding GBase 8s type name. If ifxType cannot be found, "unknown" is returned.
      • IfxExTypeToName

        public static java.lang.String IfxExTypeToName(int ifxExtType)
      • 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 GBase 8s SQL type names to GBase 8s types.
        Parameters:
        name - The GBase 8s SQL type name in a string; for example, CHAR.
        Returns:
        Corresponding GBase 8s type. If no mapping is found, Types.OTHER is returned.
      • IfxTypeToDecDigits

        public static int IfxTypeToDecDigits(int ifxType,
                                             int ifxExType,
                                             int colLen)
        Returns the number of Decimal Digits for an GBase 8s type
        Parameters:
        ifxType - The GBase 8s SQL type.
        ifxExType - The GBase 8s Extended type.
        colLen - The column length to use for variable length types
        Returns:
        Number of decimal digits in the type, or 0 if unknown.
      • IfxTypeToRightDecimal

        public static int IfxTypeToRightDecimal(int ifxType,
                                                int ifxExType,
                                                int colLen)
        Returns the number of Decimal Digits to the right of the decimal for an GBase 8s type
        Parameters:
        ifxType - The GBase 8s SQL type.
        ifxExType - The GBase 8s Extended type.
        colLen - The column length to use for variable length types
        Returns:
        Number of decimal digits to the right of the decimal, or 0 if unkown/not applicable.
      • 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s 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 GBase 8s SQL type.
        Returns:
        True if the type is a Complex type, or else false.
      • getIfxTypeForExtendedTypes

        public static int getIfxTypeForExtendedTypes(int extendedId)