All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.db.JDBCTypes

java.lang.Object
   |
   +----org.xmlmiddleware.db.JDBCTypes

public class JDBCTypes
extends Object
JDBC type names and utilities.

All methods in this class are static. Generally, they are used only by map factories and map utilities.

This class does not consider Types.NULL to be a valid JDBC type.

Version:
2.0
Author:
Ronald Bourret, 2001

Variable Index

 o JDBCTYPE_BIGINT
The string "BIGINT".
 o JDBCTYPE_BINARY
The string "BINARY".
 o JDBCTYPE_BIT
The string "BIT".
 o JDBCTYPE_CHAR
The string "CHAR".
 o JDBCTYPE_DATE
The string "DATE".
 o JDBCTYPE_DECIMAL
The string "DECIMAL".
 o JDBCTYPE_DOUBLE
The string "DOUBLE".
 o JDBCTYPE_FLOAT
The string "FLOAT".
 o JDBCTYPE_INTEGER
The string "INTEGER".
 o JDBCTYPE_LONGVARBINARY
The string "LONGVARBINARY".
 o JDBCTYPE_LONGVARCHAR
The string "LONGVARCHAR".
 o JDBCTYPE_NUMERIC
The string "NUMERIC".
 o JDBCTYPE_OTHER
The string "OTHER".
 o JDBCTYPE_REAL
The string "REAL".
 o JDBCTYPE_SMALLINT
The string "SMALLINT".
 o JDBCTYPE_TIME
The string "TIME".
 o JDBCTYPE_TIMESTAMP
The string "TIMESTAMP".
 o JDBCTYPE_TINYINT
The string "TINYINT".
 o JDBCTYPE_TOKENS
Array containing all JDBC Types values.
 o JDBCTYPE_VARBINARY
The string "VARBINARY".
 o JDBCTYPE_VARCHAR
The string "VARCHAR".
 o JDBCTYPES
Array containing all JDBC type names.

Constructor Index

 o JDBCTypes()

Method Index

 o convertDateTimeType(int)
Convert date/time types from ODBC 2.0 values to ODBC 3.0/JDBC values.
 o getName(int)
Get the name of a JDBC type.
 o getType(String)
Get a JDBC type from a name.
 o nameIsValid(String)
Whether a name is the name of a JDBC type.
 o typeIsBinary(int)
Whether the type is a binary type.
 o typeIsChar(int)
Whether the type is a character type.
 o typeIsDateTime(int)
Whether the type is a datetime type.
 o typeIsNumeric(int)
Whether the type is a numeric type.
 o typeIsOther(int)
Whether the type is Types.OTHER.
 o typeIsValid(int)
Whether a type is a valid JDBC Types value.

Variables

 o JDBCTYPE_BIGINT
 public static String JDBCTYPE_BIGINT
The string "BIGINT".

 o JDBCTYPE_BINARY
 public static String JDBCTYPE_BINARY
The string "BINARY".

 o JDBCTYPE_BIT
 public static String JDBCTYPE_BIT
The string "BIT".

 o JDBCTYPE_CHAR
 public static String JDBCTYPE_CHAR
The string "CHAR".

 o JDBCTYPE_DATE
 public static String JDBCTYPE_DATE
The string "DATE".

 o JDBCTYPE_DECIMAL
 public static String JDBCTYPE_DECIMAL
The string "DECIMAL".

 o JDBCTYPE_DOUBLE
 public static String JDBCTYPE_DOUBLE
The string "DOUBLE".

 o JDBCTYPE_FLOAT
 public static String JDBCTYPE_FLOAT
The string "FLOAT".

 o JDBCTYPE_INTEGER
 public static String JDBCTYPE_INTEGER
The string "INTEGER".

 o JDBCTYPE_LONGVARBINARY
 public static String JDBCTYPE_LONGVARBINARY
The string "LONGVARBINARY".

 o JDBCTYPE_LONGVARCHAR
 public static String JDBCTYPE_LONGVARCHAR
The string "LONGVARCHAR".

 o JDBCTYPE_NUMERIC
 public static String JDBCTYPE_NUMERIC
The string "NUMERIC".

 o JDBCTYPE_OTHER
 public static String JDBCTYPE_OTHER
The string "OTHER".

 o JDBCTYPE_REAL
 public static String JDBCTYPE_REAL
The string "REAL".

 o JDBCTYPE_SMALLINT
 public static String JDBCTYPE_SMALLINT
The string "SMALLINT".

 o JDBCTYPE_TIME
 public static String JDBCTYPE_TIME
The string "TIME".

 o JDBCTYPE_TIMESTAMP
 public static String JDBCTYPE_TIMESTAMP
The string "TIMESTAMP".

 o JDBCTYPE_TINYINT
 public static String JDBCTYPE_TINYINT
The string "TINYINT".

 o JDBCTYPE_VARBINARY
 public static String JDBCTYPE_VARBINARY
The string "VARBINARY".

 o JDBCTYPE_VARCHAR
 public static String JDBCTYPE_VARCHAR
The string "VARCHAR".

 o JDBCTYPES
 public static String JDBCTYPES[]
Array containing all JDBC type names.

 o JDBCTYPE_TOKENS
 public static final int JDBCTYPE_TOKENS[]
Array containing all JDBC Types values. In same order as JDBCTYPES.

Constructors

 o JDBCTypes
 public JDBCTypes()

Methods

 o getName
 public static String getName(int type)
Get the name of a JDBC type.

Parameters:
type - The type.
Returns:
The type name. Returns null if the name is not found.
 o getType
 public static int getType(String name)
Get a JDBC type from a name.

Parameters:
type - The name.
Returns:
The type. Returns Types.NULL if the name is not found.
 o typeIsValid
 public static boolean typeIsValid(int type)
Whether a type is a valid JDBC Types value.

This method does not consider Types.NULL to be a valid type.

Parameters:
type - The type.
Returns:
Whether the type is a valid JDBC Types value.
 o nameIsValid
 public static boolean nameIsValid(String name)
Whether a name is the name of a JDBC type.

This method only considers upper-case names to be valid. It does not consider "NULL" to be a valid name.

Parameters:
name - The name.
Returns:
Whether the name is the name of a JDBC type.
 o typeIsOther
 public static boolean typeIsOther(int type)
Whether the type is Types.OTHER.

Parameters:
type - The type.
Returns:
Whether the type is Types.OTHER.
 o typeIsBinary
 public static boolean typeIsBinary(int type)
Whether the type is a binary type.

Parameters:
type - The type.
Returns:
Whether the type is a binary type.
 o typeIsChar
 public static boolean typeIsChar(int type)
Whether the type is a character type.

Parameters:
type - The type.
Returns:
Whether the type is a character type.
 o typeIsDateTime
 public static boolean typeIsDateTime(int type)
Whether the type is a datetime type.

Parameters:
type - The type.
Returns:
Whether the type is a datetime type.
 o typeIsNumeric
 public static boolean typeIsNumeric(int type)
Whether the type is a numeric type.

Parameters:
type - The type.
Returns:
Whether the type is a numeric type.
 o convertDateTimeType
 public static int convertDateTimeType(int type)
Convert date/time types from ODBC 2.0 values to ODBC 3.0/JDBC values.

The numbers for the date/time data types changed between ODBC 2.0 and ODBC 3.0. JDBC uses the 3.0 numbers. This method converts the ODBC 2.0 values to ODBC 3.0/JDBC values. It is possible to get ODBC 2.0 values when the ODBC Driver Manager or the ODBC-JDBC bridge hasn't converted them.

Parameters:
type - The type.
Returns:
The converted type. This is the same as the input type if the type is not an ODBC 2.0 date/time type.

All Packages  Class Hierarchy  This Package  Previous  Next  Index