Class TypeMap
java.lang.Object
edu.internet2.middleware.grouper.ext.org.apache.ddlutils.model.TypeMap
A class that maps SQL type names to their JDBC type ID found in
Types
and vice versa.- Version:
- $Revision: 463305 $
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The string representation of theTypes.ARRAY
constant.static final String
The string representation of theTypes.BIGINT
constant.static final String
The string representation of theTypes.BINARY
constant.static final String
The string representation of theTypes.BIT
constant.static final String
The string representation of theTypes.BLOB
constant.static final String
The string representation of theTypes.BOOLEAN
constant.static final String
The string representation of theTypes.CHAR
constant.static final String
The string representation of theTypes.CLOB
constant.static final String
The string representation of theTypes.DATALINK
constant.static final String
The string representation of theTypes.DATE
constant.static final String
The string representation of theTypes.DECIMAL
constant.static final String
The string representation of theTypes.DISTINCT
constant.static final String
The string representation of theTypes.DOUBLE
constant.static final String
The string representation of theTypes.FLOAT
constant.static final String
The string representation of theTypes.INTEGER
constant.static final String
The string representation of theTypes.JAVA_OBJECT
constant.static final String
The string representation of theTypes.LONGVARBINARY
constant.static final String
The string representation of theTypes.LONGVARCHAR
constant.static final String
The string representation of theTypes.NULL
constant.static final String
The string representation of theTypes.NUMERIC
constant.static final String
The string representation of theTypes.OTHER
constant.static final String
The string representation of theTypes.REAL
constant.static final String
The string representation of theTypes.REF
constant.static final String
The string representation of theTypes.SMALLINT
constant.static final String
The string representation of theTypes.STRUCT
constant.static final String
The string representation of theTypes.TIME
constant.static final String
The string representation of theTypes.TIMESTAMP
constant.static final String
The string representation of theTypes.TINYINT
constant.static final String
The string representation of theTypes.VARBINARY
constant.static final String
The string representation of theTypes.VARCHAR
constant. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Integer
getJdbcTypeCode
(String typeName) Returns the JDBC type code (one of theTypes
constants) that corresponds to the given JDBC type name.static String
getJdbcTypeName
(int typeCode) Returns the JDBC type name that corresponds to the given type code (one of theTypes
constants).static boolean
isBinaryType
(int jdbcTypeCode) Determines whether the given jdbc type (one of theTypes
constants) is a binary type.static boolean
isDateTimeType
(int jdbcTypeCode) Determines whether the given jdbc type (one of theTypes
constants) is a date/time type.static boolean
isNumericType
(int jdbcTypeCode) Determines whether the given jdbc type (one of theTypes
constants) is a numeric type.static boolean
isSpecialType
(int jdbcTypeCode) Determines whether the given sql type (one of theTypes
constants) is a special type.static boolean
isTextType
(int jdbcTypeCode) Determines whether the given jdbc type (one of theTypes
constants) is a text type.protected static void
registerJdbcType
(int typeCode, String typeName, JdbcTypeCategoryEnum category) Registers a jdbc type.
-
Field Details
-
ARRAY
The string representation of theTypes.ARRAY
constant.- See Also:
-
BIGINT
The string representation of theTypes.BIGINT
constant.- See Also:
-
BINARY
The string representation of theTypes.BINARY
constant.- See Also:
-
BIT
The string representation of theTypes.BIT
constant.- See Also:
-
BLOB
The string representation of theTypes.BLOB
constant.- See Also:
-
BOOLEAN
The string representation of theTypes.BOOLEAN
constant.- See Also:
-
CHAR
The string representation of theTypes.CHAR
constant.- See Also:
-
CLOB
The string representation of theTypes.CLOB
constant.- See Also:
-
DATALINK
The string representation of theTypes.DATALINK
constant.- See Also:
-
DATE
The string representation of theTypes.DATE
constant.- See Also:
-
DECIMAL
The string representation of theTypes.DECIMAL
constant.- See Also:
-
DISTINCT
The string representation of theTypes.DISTINCT
constant.- See Also:
-
DOUBLE
The string representation of theTypes.DOUBLE
constant.- See Also:
-
FLOAT
The string representation of theTypes.FLOAT
constant.- See Also:
-
INTEGER
The string representation of theTypes.INTEGER
constant.- See Also:
-
JAVA_OBJECT
The string representation of theTypes.JAVA_OBJECT
constant.- See Also:
-
LONGVARBINARY
The string representation of theTypes.LONGVARBINARY
constant.- See Also:
-
LONGVARCHAR
The string representation of theTypes.LONGVARCHAR
constant.- See Also:
-
NULL
The string representation of theTypes.NULL
constant.- See Also:
-
NUMERIC
The string representation of theTypes.NUMERIC
constant.- See Also:
-
OTHER
The string representation of theTypes.OTHER
constant.- See Also:
-
REAL
The string representation of theTypes.REAL
constant.- See Also:
-
REF
The string representation of theTypes.REF
constant.- See Also:
-
SMALLINT
The string representation of theTypes.SMALLINT
constant.- See Also:
-
STRUCT
The string representation of theTypes.STRUCT
constant.- See Also:
-
TIME
The string representation of theTypes.TIME
constant.- See Also:
-
TIMESTAMP
The string representation of theTypes.TIMESTAMP
constant.- See Also:
-
TINYINT
The string representation of theTypes.TINYINT
constant.- See Also:
-
VARBINARY
The string representation of theTypes.VARBINARY
constant.- See Also:
-
VARCHAR
The string representation of theTypes.VARCHAR
constant.- See Also:
-
-
Constructor Details
-
TypeMap
public TypeMap()
-
-
Method Details
-
getJdbcTypeCode
Returns the JDBC type code (one of theTypes
constants) that corresponds to the given JDBC type name.- Parameters:
typeName
- The JDBC type name (case is ignored)- Returns:
- The type code or
null
if the type is unknown
-
getJdbcTypeName
Returns the JDBC type name that corresponds to the given type code (one of theTypes
constants).- Parameters:
typeCode
- The type code- Returns:
- The JDBC type name (one of the constants in this class) or
null
if the type is unknown
-
registerJdbcType
protected static void registerJdbcType(int typeCode, String typeName, JdbcTypeCategoryEnum category) Registers a jdbc type.- Parameters:
typeCode
- The type code (one of theTypes
constants)typeName
- The type name (case is ignored)category
- The type category
-
isNumericType
public static boolean isNumericType(int jdbcTypeCode) Determines whether the given jdbc type (one of theTypes
constants) is a numeric type.- Parameters:
jdbcTypeCode
- The type code- Returns:
true
if the type is a numeric one
-
isDateTimeType
public static boolean isDateTimeType(int jdbcTypeCode) Determines whether the given jdbc type (one of theTypes
constants) is a date/time type.- Parameters:
jdbcTypeCode
- The type code- Returns:
true
if the type is a numeric one
-
isTextType
public static boolean isTextType(int jdbcTypeCode) Determines whether the given jdbc type (one of theTypes
constants) is a text type.- Parameters:
jdbcTypeCode
- The type code- Returns:
true
if the type is a text one
-
isBinaryType
public static boolean isBinaryType(int jdbcTypeCode) Determines whether the given jdbc type (one of theTypes
constants) is a binary type.- Parameters:
jdbcTypeCode
- The type code- Returns:
true
if the type is a binary one
-
isSpecialType
public static boolean isSpecialType(int jdbcTypeCode) Determines whether the given sql type (one of theTypes
constants) is a special type.- Parameters:
jdbcTypeCode
- The type code- Returns:
true
if the type is a special one
-