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
-
JDBCTYPE_BIGINT
- The string "BIGINT".
-
JDBCTYPE_BINARY
- The string "BINARY".
-
JDBCTYPE_BIT
- The string "BIT".
-
JDBCTYPE_CHAR
- The string "CHAR".
-
JDBCTYPE_DATE
- The string "DATE".
-
JDBCTYPE_DECIMAL
- The string "DECIMAL".
-
JDBCTYPE_DOUBLE
- The string "DOUBLE".
-
JDBCTYPE_FLOAT
- The string "FLOAT".
-
JDBCTYPE_INTEGER
- The string "INTEGER".
-
JDBCTYPE_LONGVARBINARY
- The string "LONGVARBINARY".
-
JDBCTYPE_LONGVARCHAR
- The string "LONGVARCHAR".
-
JDBCTYPE_NUMERIC
- The string "NUMERIC".
-
JDBCTYPE_OTHER
- The string "OTHER".
-
JDBCTYPE_REAL
- The string "REAL".
-
JDBCTYPE_SMALLINT
- The string "SMALLINT".
-
JDBCTYPE_TIME
- The string "TIME".
-
JDBCTYPE_TIMESTAMP
- The string "TIMESTAMP".
-
JDBCTYPE_TINYINT
- The string "TINYINT".
-
JDBCTYPE_TOKENS
- Array containing all JDBC Types values.
-
JDBCTYPE_VARBINARY
- The string "VARBINARY".
-
JDBCTYPE_VARCHAR
- The string "VARCHAR".
-
JDBCTYPES
- Array containing all JDBC type names.
-
JDBCTypes()
-
-
convertDateTimeType(int)
- Convert date/time types from ODBC 2.0 values to ODBC 3.0/JDBC values.
-
getName(int)
- Get the name of a JDBC type.
-
getType(String)
- Get a JDBC type from a name.
-
nameIsValid(String)
- Whether a name is the name of a JDBC type.
-
typeIsBinary(int)
- Whether the type is a binary type.
-
typeIsChar(int)
- Whether the type is a character type.
-
typeIsDateTime(int)
- Whether the type is a datetime type.
-
typeIsNumeric(int)
- Whether the type is a numeric type.
-
typeIsOther(int)
- Whether the type is Types.OTHER.
-
typeIsValid(int)
- Whether a type is a valid JDBC Types value.
JDBCTYPE_BIGINT
public static String JDBCTYPE_BIGINT
- The string "BIGINT".
JDBCTYPE_BINARY
public static String JDBCTYPE_BINARY
- The string "BINARY".
JDBCTYPE_BIT
public static String JDBCTYPE_BIT
- The string "BIT".
JDBCTYPE_CHAR
public static String JDBCTYPE_CHAR
- The string "CHAR".
JDBCTYPE_DATE
public static String JDBCTYPE_DATE
- The string "DATE".
JDBCTYPE_DECIMAL
public static String JDBCTYPE_DECIMAL
- The string "DECIMAL".
JDBCTYPE_DOUBLE
public static String JDBCTYPE_DOUBLE
- The string "DOUBLE".
JDBCTYPE_FLOAT
public static String JDBCTYPE_FLOAT
- The string "FLOAT".
JDBCTYPE_INTEGER
public static String JDBCTYPE_INTEGER
- The string "INTEGER".
JDBCTYPE_LONGVARBINARY
public static String JDBCTYPE_LONGVARBINARY
- The string "LONGVARBINARY".
JDBCTYPE_LONGVARCHAR
public static String JDBCTYPE_LONGVARCHAR
- The string "LONGVARCHAR".
JDBCTYPE_NUMERIC
public static String JDBCTYPE_NUMERIC
- The string "NUMERIC".
JDBCTYPE_OTHER
public static String JDBCTYPE_OTHER
- The string "OTHER".
JDBCTYPE_REAL
public static String JDBCTYPE_REAL
- The string "REAL".
JDBCTYPE_SMALLINT
public static String JDBCTYPE_SMALLINT
- The string "SMALLINT".
JDBCTYPE_TIME
public static String JDBCTYPE_TIME
- The string "TIME".
JDBCTYPE_TIMESTAMP
public static String JDBCTYPE_TIMESTAMP
- The string "TIMESTAMP".
JDBCTYPE_TINYINT
public static String JDBCTYPE_TINYINT
- The string "TINYINT".
JDBCTYPE_VARBINARY
public static String JDBCTYPE_VARBINARY
- The string "VARBINARY".
JDBCTYPE_VARCHAR
public static String JDBCTYPE_VARCHAR
- The string "VARCHAR".
JDBCTYPES
public static String JDBCTYPES[]
- Array containing all JDBC type names.
JDBCTYPE_TOKENS
public static final int JDBCTYPE_TOKENS[]
- Array containing all JDBC Types values. In same order as JDBCTYPES.
JDBCTypes
public JDBCTypes()
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.
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.
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.
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.
typeIsOther
public static boolean typeIsOther(int type)
- Whether the type is Types.OTHER.
- Parameters:
- type - The type.
- Returns:
- Whether the type is Types.OTHER.
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.
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.
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.
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.
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