Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ddlutils.model
Class TypeMap

    java.lang.Object
      org.apache.ddlutils.model.TypeMap

    public abstract class TypeMap

extends Object

A class that maps SQL type names to their JDBC type ID found in `Types` and vice versa.

Version:
  $Revision: 463305 $

Field Summary
`static String` | `ARRAY` The string representation of the `Types.ARRAY` constant.
`static String` | `BIGINT` The string representation of the `Types.BIGINT` constant.
`static String` | `BINARY` The string representation of the `Types.BINARY` constant.
`static String` | `BIT` The string representation of the `Types.BIT` constant.
`static String` | `BLOB` The string representation of the `Types.BLOB` constant.
`static String` | `BOOLEAN` The string representation of the `Types.BOOLEAN` constant.
`static String` | `CHAR` The string representation of the `Types.CHAR` constant.
`static String` | `CLOB` The string representation of the `Types.CLOB` constant.
`static String` | `DATALINK` The string representation of the `Types.DATALINK` constant.
`static String` | `DATE` The string representation of the `Types.DATE` constant.
`static String` | `DECIMAL` The string representation of the `Types.DECIMAL` constant.
`static String` | `DISTINCT` The string representation of the `Types.DISTINCT` constant.
`static String` | `DOUBLE` The string representation of the `Types.DOUBLE` constant.
`static String` | `FLOAT` The string representation of the `Types.FLOAT` constant.
`static String` | `INTEGER` The string representation of the `Types.INTEGER` constant.
`static String` | `JAVA_OBJECT` The string representation of the `Types.JAVA_OBJECT` constant.
`static String` | `LONGVARBINARY` The string representation of the `Types.LONGVARBINARY` constant.
`static String` | `LONGVARCHAR` The string representation of the `Types.LONGVARCHAR` constant.
`static String` | `NULL` The string representation of the `Types.NULL` constant.
`static String` | `NUMERIC` The string representation of the `Types.NUMERIC` constant.
`static String` | `OTHER` The string representation of the `Types.OTHER` constant.
`static String` | `REAL` The string representation of the `Types.REAL` constant.
`static String` | `REF` The string representation of the `Types.REF` constant.
`static String` | `SMALLINT` The string representation of the `Types.SMALLINT` constant.
`static String` | `STRUCT` The string representation of the `Types.STRUCT` constant.
`static String` | `TIME` The string representation of the `Types.TIME` constant.
`static String` | `TIMESTAMP` The string representation of the `Types.TIMESTAMP` constant.
`static String` | `TINYINT` The string representation of the `Types.TINYINT` constant.
`static String` | `VARBINARY` The string representation of the `Types.VARBINARY` constant.
`static String` | `VARCHAR` The string representation of the `Types.VARCHAR` constant.

Constructor Summary
`TypeMap()`

Method Summary
`static Integer` | `getJdbcTypeCode(String typeName)` Returns the JDBC type code (one of the `Types` 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 the `Types` constants).
`static boolean` | `isBinaryType(int jdbcTypeCode)` Determines whether the given jdbc type (one of the `Types` constants) is a binary type.
`static boolean` | `isDateTimeType(int jdbcTypeCode)` Determines whether the given jdbc type (one of the `Types` constants) is a date/time type.
`static boolean` | `isNumericType(int jdbcTypeCode)` Determines whether the given jdbc type (one of the `Types` constants) is a numeric type.
`static boolean` | `isSpecialType(int jdbcTypeCode)` Determines whether the given sql type (one of the `Types` constants) is a special type.
`static boolean` | `isTextType(int jdbcTypeCode)` Determines whether the given jdbc type (one of the `Types` constants) is a text type.
`protected static void` | `registerJdbcType(int typeCode, String typeName, JdbcTypeCategoryEnum category)` Registers a jdbc type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ARRAY

    public static final String ARRAY

  The string representation of the `Types.ARRAY` constant.

  See Also:
    Constant Field Values

### BIGINT

    public static final String BIGINT

  The string representation of the `Types.BIGINT` constant.

  See Also:
    Constant Field Values

### BINARY

    public static final String BINARY

  The string representation of the `Types.BINARY` constant.

  See Also:
    Constant Field Values

### BIT

    public static final String BIT

  The string representation of the `Types.BIT` constant.

  See Also:
    Constant Field Values

### BLOB

    public static final String BLOB

  The string representation of the `Types.BLOB` constant.

  See Also:
    Constant Field Values

### BOOLEAN

    public static final String BOOLEAN

  The string representation of the `Types.BOOLEAN` constant.

  See Also:
    Constant Field Values

### CHAR

    public static final String CHAR

  The string representation of the `Types.CHAR` constant.

  See Also:
    Constant Field Values

### CLOB

    public static final String CLOB

  The string representation of the `Types.CLOB` constant.

  See Also:
    Constant Field Values

### DATALINK

    public static final String DATALINK

  The string representation of the `Types.DATALINK` constant.

  See Also:
    Constant Field Values

### DATE

    public static final String DATE

  The string representation of the `Types.DATE` constant.

  See Also:
    Constant Field Values

### DECIMAL

    public static final String DECIMAL

  The string representation of the `Types.DECIMAL` constant.

  See Also:
    Constant Field Values

### DISTINCT

    public static final String DISTINCT

  The string representation of the `Types.DISTINCT` constant.

  See Also:
    Constant Field Values

### DOUBLE

    public static final String DOUBLE

  The string representation of the `Types.DOUBLE` constant.

  See Also:
    Constant Field Values

### FLOAT

    public static final String FLOAT

  The string representation of the `Types.FLOAT` constant.

  See Also:
    Constant Field Values

### INTEGER

    public static final String INTEGER

  The string representation of the `Types.INTEGER` constant.

  See Also:
    Constant Field Values

### JAVA_OBJECT

    public static final String JAVA_OBJECT

  The string representation of the `Types.JAVA_OBJECT` constant.

  See Also:
    Constant Field Values

### LONGVARBINARY

    public static final String LONGVARBINARY

  The string representation of the `Types.LONGVARBINARY` constant.

  See Also:
    Constant Field Values

### LONGVARCHAR

    public static final String LONGVARCHAR

  The string representation of the `Types.LONGVARCHAR` constant.

  See Also:
    Constant Field Values

### NULL

    public static final String NULL

  The string representation of the `Types.NULL` constant.

  See Also:
    Constant Field Values

### NUMERIC

    public static final String NUMERIC

  The string representation of the `Types.NUMERIC` constant.

  See Also:
    Constant Field Values

### OTHER

    public static final String OTHER

  The string representation of the `Types.OTHER` constant.

  See Also:
    Constant Field Values

### REAL

    public static final String REAL

  The string representation of the `Types.REAL` constant.

  See Also:
    Constant Field Values

### REF

    public static final String REF

  The string representation of the `Types.REF` constant.

  See Also:
    Constant Field Values

### SMALLINT

    public static final String SMALLINT

  The string representation of the `Types.SMALLINT` constant.

  See Also:
    Constant Field Values

### STRUCT

    public static final String STRUCT

  The string representation of the `Types.STRUCT` constant.

  See Also:
    Constant Field Values

### TIME

    public static final String TIME

  The string representation of the `Types.TIME` constant.

  See Also:
    Constant Field Values

### TIMESTAMP

    public static final String TIMESTAMP

  The string representation of the `Types.TIMESTAMP` constant.

  See Also:
    Constant Field Values

### TINYINT

    public static final String TINYINT

  The string representation of the `Types.TINYINT` constant.

  See Also:
    Constant Field Values

### VARBINARY

    public static final String VARBINARY

  The string representation of the `Types.VARBINARY` constant.

  See Also:
    Constant Field Values

### VARCHAR

    public static final String VARCHAR

  The string representation of the `Types.VARCHAR` constant.

  See Also:
    Constant Field Values

Constructor Detail

### TypeMap

    public TypeMap()

Method Detail

### getJdbcTypeCode

    public static Integer getJdbcTypeCode(String typeName)

  Returns the JDBC type code (one of the `Types` 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

    public static String getJdbcTypeName(int typeCode)

  Returns the JDBC type name that corresponds to the given type code (one of the `Types` 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 the `Types` 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 the `Types` 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 the `Types` 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 the `Types` 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 the `Types` 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 the `Types` constants) is a special type.

  Parameters:
    `jdbcTypeCode` - The type code
  Returns:
    `true` if the type is a special one

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.